.mtg-shop-upload {
  display: flow-root;
  clear: both;
  height: auto;
  max-height: none;
  overflow: visible;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #ddd;
}
.mtg-shop-upload > label { display: block; font-weight: 600; margin-bottom: .5rem; }
.mtg-shop-total {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  margin-bottom: 1rem;
}
.mtg-shop-total > span:first-child { font-weight: 600; }
/* Assigned by the #281 controller only; its enabled input still submits quantity. */
.mtg-shop-native-quantity { display: none !important; }
.mtg-shop-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.mtg-shop-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .7rem 1.25rem;
  border: 0;
  border-radius: 5px;
  background: #235f85;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.mtg-shop-pick:hover { background: #174867; color: #fff; }
.mtg-shop-pick:focus-visible, .mtg-shop-quantity button:focus-visible,
.mtg-shop-image-trash:focus-visible {
  outline: 3px solid #f0a84b;
  outline-offset: 2px;
}
.mtg-shop-pick:disabled { opacity: .55; cursor: wait; }
#mtg-shop-previews {
  display: grid;
  grid-auto-rows: auto;
  gap: .75rem;
  height: auto;
  max-height: none;
  overflow: visible;
  margin-top: .8rem;
}
.mtg-shop-image-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem .8rem;
  min-width: 0;
  min-height: 76px;
  height: auto;
  padding: .45rem;
  border: 1px solid #e3e3e3;
  border-radius: 5px;
}
.mtg-shop-image-row img {
  display: block;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  object-fit: contain;
}
.mtg-shop-image-trash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 6px;
  border: 1px solid #bbb;
  border-radius: 5px;
  background: #fff;
  color: #8b2731;
  cursor: pointer;
}
.mtg-shop-image-trash svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mtg-shop-image-trash:disabled { opacity: .45; cursor: not-allowed; }
.mtg-shop-image-row > span {
  min-width: 0;
  flex: 1 1 12rem;
  overflow-wrap: anywhere;
}
.mtg-shop-image-row label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0;
}
.mtg-shop-quantity { display: inline-flex; align-items: center; gap: .45rem; }
.mtg-shop-quantity button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #bbb;
  border-radius: 5px;
  background: #f7f7f7;
  color: #222;
  font: inherit;
  font-size: 1.35rem;
  cursor: pointer;
}
.mtg-shop-quantity button:disabled { opacity: .45; cursor: not-allowed; }
.mtg-shop-quantity output {
  min-width: 2rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
}
#mtg-shop-status { clear: both; margin: .8rem 0; }
#mtg-shop-upload-progress { display: grid; gap: .5rem; margin-top: .8rem; }
.mtg-shop-upload-progress { display: grid; gap: .25rem; min-width: 0; }
.mtg-shop-upload-progress span { overflow-wrap: anywhere; }
.mtg-shop-upload-progress progress {
  display: block;
  width: 100%;
  height: .7rem;
  accent-color: #235f85;
}
#mtg-shop-upload-summary { margin-top: .8rem; font-size: .9rem; }
@media (max-width: 520px) {
  .mtg-shop-image-row > span { flex-basis: calc(100% - 150px); }
  .mtg-shop-image-row label { width: 100%; }
}
