/* Request Page */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.request-workspace {
  grid-template-columns: minmax(420px, 1fr) minmax(320px, 390px);
  align-items: start;
  width: 100%;
  min-width: 0;
}

.tabs {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 16px;
  overflow-x: auto;
}

.request-group-tabs {
  justify-content: center;
  margin-bottom: 8px;
  background:
    linear-gradient(180deg, #172033, #22304a);
  border-color: #516b98;
  box-shadow: inset 0 -2px 0 rgba(255, 203, 5, 0.72);
}

.request-group-tabs .tab-button {
  color: #dbe8ff;
}

.request-group-tabs .tab-button.is-active {
  color: #172033;
  background: var(--yellow);
  box-shadow:
    0 1px 2px rgba(33, 56, 109, 0.2),
    inset 0 -3px 0 #ffffff;
}

.category-tabs {
  margin-bottom: 16px;
}

.release-notice {
  display: grid;
  gap: 4px;
  margin: 0 0 14px;
  padding: 12px 14px;
  color: var(--navy);
  background: #fff9d8;
  border: 1px solid #d6aa00;
  border-radius: var(--radius);
  line-height: 1.42;
}

.release-notice strong {
  font-size: 13px;
  text-transform: uppercase;
}

.release-notice span {
  color: var(--muted);
  font-size: 13px;
}

.release-notice a {
  color: var(--blue);
  font-weight: 900;
}

.topbar,
.page-banner,
main,
.catalog-panel,
.request-panel,
.model-grid,
.pokemon-catalog,
.pokedex-list {
  max-width: 100%;
}

main {
  min-width: 0;
}

.catalog-panel,
.request-panel,
.model-grid,
.pokemon-catalog,
.pokedex-list {
  width: 100%;
  min-width: 0;
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 14px;
}

.model-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  min-height: 356px;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition:
    border-color 140ms ease,
    transform 140ms ease,
  box-shadow 140ms ease;
}

.model-card.is-selected,
.model-card:hover,
.model-card:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 12px 24px rgba(42, 117, 187, 0.16);
  transform: translateY(-1px);
}

.model-card[data-model-details-id],
.pokemon-row[data-model-details-id] {
  cursor: pointer;
}

.model-card.is-custom {
  border-style: dashed;
}

.model-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #eef5ff;
}

.model-media img {
  width: 100%;
  height: 100%;
  padding: 10px;
  object-fit: contain;
}

.model-body {
  display: grid;
  gap: 10px;
  align-content: space-between;
  padding: 13px;
}

.model-body h3 {
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.34rem);
  font-weight: 950;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.model-actions {
  display: grid;
}

.use-print-action {
  min-height: 38px;
  width: 100%;
  white-space: nowrap;
  cursor: pointer;
}

.model-body p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.creator-credit {
  display: block;
  margin-top: 7px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.selection-summary {
  padding: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.selection-summary strong,
.selection-summary span {
  display: block;
}

.selection-summary strong {
  font-size: clamp(1.02rem, 0.96rem + 0.28vw, 1.18rem);
  font-weight: 950;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.selection-summary span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.form-grid,
.custom-fields {
  display: grid;
  gap: 12px;
}

.custom-tab-panel {
  display: grid;
  max-width: none;
}

.custom-tab-card {
  grid-template-columns: 1fr;
  min-height: 0;
  width: 100%;
}

.custom-tab-card .model-media {
  min-height: 320px;
  aspect-ratio: 16 / 7;
  background: #172033;
}

.custom-tab-card .model-media img {
  padding: 0;
  object-fit: cover;
  object-position: center 48%;
}

.custom-tab-card .model-body {
  grid-template-columns: minmax(0, 1fr);
  padding: 18px;
  background:
    linear-gradient(180deg, #ffffff, #f8fbff);
}

.segmented {
  width: 100%;
  margin-bottom: 12px;
}

.segment {
  flex: 1;
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.item-options select.option-select {
  min-height: 46px;
  padding: 10px 42px 10px 12px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--blue) 50%) calc(100% - 19px) 50% / 7px 7px no-repeat,
    linear-gradient(135deg, var(--blue) 50%, transparent 50%) calc(100% - 14px) 50% / 7px 7px no-repeat,
    linear-gradient(180deg, #ffffff, #f8fbff);
  border-color: #aebbd2;
  box-shadow:
    inset 0 -1px 0 rgba(42, 117, 187, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.7);
  font-weight: 800;
}

.item-options select.option-select:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(42, 117, 187, 0.08);
}

.item-options select.option-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(42, 117, 187, 0.14);
}

.item-options select.option-select.is-placeholder,
.item-options select.option-select:invalid {
  color: var(--muted);
  font-weight: 700;
}

.item-options select.option-select option {
  color: var(--ink);
  font-weight: 700;
}

.field-trio {
  display: grid;
  grid-template-columns: 1fr 84px 120px;
  gap: 10px;
}

.shipping-fields {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: #fff9d8;
  border: 1px solid #efd46d;
  border-radius: var(--radius);
}

.shipping-helper {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.field-helper {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.color-warning {
  padding: 9px 10px;
  color: #7a4b00;
  background: #fff6bf;
  border: 1px solid #ffd64a;
  border-radius: 7px;
}

.item-options,
.order-items-list {
  display: grid;
  gap: 10px;
}

.item-options {
  padding: 12px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.option-fieldset {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.option-fieldset legend {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.request-addons-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.request-addon-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.request-addon-check input {
  width: auto;
}

.request-addon-check span {
  overflow-wrap: anywhere;
  font-weight: 800;
}

.request-addon-check strong {
  color: var(--blue);
  white-space: nowrap;
}

.order-items-head,
.order-item-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.order-items-head {
  color: var(--muted);
  font-size: 13px;
}

.order-item-row {
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.order-item-row.is-editing {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(42, 117, 187, 0.12);
}

.order-item-row div {
  min-width: 0;
}

.order-item-row strong,
.order-item-row small {
  display: block;
}

.order-item-row small {
  margin-top: 2px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.order-item-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}

.compact-empty {
  padding: 10px;
}

.is-locked {
  color: var(--muted);
  background: #f5f8ff;
}

.model-grid.is-pokemon-list {
  display: block;
}

.pokemon-catalog {
  display: grid;
  gap: 14px;
}

.pokemon-custom-card {
  grid-template-columns: 128px 1fr;
  grid-template-rows: auto;
  min-height: 0;
}

.pokemon-custom-card .model-media {
  height: 100%;
  min-height: 126px;
  aspect-ratio: auto;
}

.pokedex-list {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
}

.catalog-pagination {
  display: flex;
  grid-column: 1 / -1;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.pagination-summary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  overflow-wrap: anywhere;
}

.pagination-button {
  display: inline-flex;
  min-width: 96px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--navy);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font-weight: 900;
}

.pagination-button:not(:disabled):hover {
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
}

.pagination-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.pokemon-row {
  display: grid;
  grid-template-columns: 76px minmax(180px, 1fr) minmax(76px, auto) minmax(118px, auto);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  padding: 11px 14px;
  text-align: left;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.pokemon-row,
.pokemon-row > * {
  min-width: 0;
}

.pokemon-row.has-repository {
  grid-template-columns: 76px minmax(220px, 1fr) minmax(150px, 0.7fr) minmax(76px, auto) minmax(118px, auto);
}

.pokemon-row:last-child {
  border-bottom: 0;
}

.pokemon-row:hover,
.pokemon-row.is-selected {
  background: #fff9d8;
}

.dex-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 8px;
  color: var(--navy);
  background: var(--yellow);
  border: 1px solid #d6aa00;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.pokemon-row-main strong,
.pokemon-row-main small {
  display: block;
}

.pokemon-row-main strong {
  font-size: clamp(1.05rem, 0.98rem + 0.32vw, 1.26rem);
  font-weight: 950;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.pokemon-row-main small {
  margin-top: 4px;
  color: var(--ink);
  font-size: clamp(0.94rem, 0.9rem + 0.2vw, 1.08rem);
  font-weight: 850;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.pokemon-row-meta span,
.pokemon-row-repository {
  color: var(--muted);
  font-size: 12px;
}

.pokemon-title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pokemon-title-line .pokemon-types {
  display: inline-flex;
}

.pokemon-row-repository {
  display: grid;
  gap: 3px;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pokemon-row-repository span:first-child {
  color: var(--ink);
  font-weight: 800;
}

.pokemon-row-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
  font-size: 13px;
}

.pokemon-row-actions {
  display: grid;
  justify-items: end;
}

.pokemon-types,
.modal-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.type-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #172033;
  background: #edf2f7;
  font-size: 12px;
  font-weight: 900;
}

.type-grass {
  background: #8bd46e;
}

.type-poison {
  color: #ffffff;
  background: #9b5de5;
}

.type-bug {
  background: #a7c957;
}

.type-fire {
  color: #ffffff;
  background: #f25f4c;
}

.type-flying {
  background: #a7c7ff;
}

.type-water {
  color: #ffffff;
  background: #2a75bb;
}

.type-ground {
  background: #dec07b;
}

.type-rock {
  color: #ffffff;
  background: #8d6e63;
}

.type-electric {
  background: var(--yellow);
}

.type-normal {
  background: #d7d2c8;
}

.type-fairy {
  background: #f7a8cf;
}

.type-fighting {
  color: #ffffff;
  background: #c2410c;
}

.type-ice {
  background: #a7f3ff;
}

.type-ghost {
  color: #ffffff;
  background: #5b4b8a;
}

.type-dragon {
  color: #ffffff;
  background: #4f46e5;
}

.type-steel {
  background: #cbd5e1;
}

.type-psychic {
  color: #ffffff;
  background: #e05297;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(23, 32, 51, 0.55);
}

.pokemon-modal {
  position: relative;
  width: min(900px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: auto;
  background: #ffffff;
  border: 3px solid var(--yellow);
  border-radius: var(--radius);
  box-shadow: 0 28px 70px rgba(23, 32, 51, 0.34);
}

.confirmation-modal {
  position: relative;
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: auto;
  padding: 24px;
  background: #ffffff;
  border: 3px solid var(--yellow);
  border-radius: var(--radius);
  box-shadow: 0 28px 70px rgba(23, 32, 51, 0.34);
}

.confirmation-header {
  padding-right: 44px;
  margin-bottom: 16px;
}

.confirmation-header h2 {
  margin-bottom: 4px;
  font-size: 34px;
}

.confirmation-header p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.confirmation-details {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.confirmation-details div {
  grid-template-columns: 128px minmax(0, 1fr);
  padding: 10px 12px;
  background: #ffffff;
}

.confirmation-details div:nth-child(odd) {
  background: #f8fbff;
}

.confirmation-details dd {
  overflow-wrap: anywhere;
}

.confirmation-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

.order-limit-dialog {
  width: min(520px, 100%);
  padding: 22px;
  background: #ffffff;
  border: 3px solid var(--yellow);
  border-radius: var(--radius);
  box-shadow: 0 28px 70px rgba(23, 32, 51, 0.34);
}

.order-limit-dialog p {
  color: var(--muted);
  line-height: 1.55;
}

.order-limit-dialog .primary-action {
  width: 100%;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: var(--red);
  border: 0;
  border-radius: 50%;
  font-weight: 900;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
}

.pokemon-modal-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1fr);
  gap: 0;
}

.pokemon-art-panel {
  position: relative;
  display: grid;
  min-height: 390px;
  place-items: center;
  overflow: hidden;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 203, 5, 0.48), rgba(231, 241, 255, 0.95)),
    #eef5ff;
  isolation: isolate;
}

.pokemon-art-panel > * {
  position: relative;
  z-index: 1;
}

.pokemon-art-panel img {
  max-height: 330px;
  object-fit: contain;
}

.no-image {
  display: grid;
  width: min(260px, 100%);
  min-height: 180px;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  background: #ffffff;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  font-weight: 900;
  text-align: center;
}

.pokemon-info-panel {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  overflow: hidden;
  padding: 30px;
  background: #ffffff;
  isolation: isolate;
}

.pokemon-info-panel > * {
  position: relative;
  z-index: 1;
}

.pokemon-modal-grid.is-n3d-approved .pokemon-art-panel::before {
  position: absolute;
  bottom: 18px;
  left: 18px;
  z-index: 2;
  width: min(118px, 32%);
  aspect-ratio: 1.2;
  background:
    url("../../assets/n3d/n3d-approved-seller-plaque.png") center / 88% auto no-repeat,
    rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(95, 111, 135, 0.22);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.16);
  opacity: 0.92;
  pointer-events: none;
  content: "";
}

.pokemon-info-panel h2 {
  font-size: 30px;
}

.detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
}

.detail-list a {
  color: var(--blue);
  font-weight: 900;
}

@media (max-width: 1220px) {
  .request-workspace {
    grid-template-columns: 1fr;
  }

  .request-panel,
  .queue-panel {
    position: static;
  }

  .custom-tab-card .model-media {
    min-height: 300px;
    aspect-ratio: 16 / 8;
  }
}

@media (max-width: 900px) {
  .request-workspace {
    gap: 12px;
  }

  .page-banner {
    width: auto;
    margin: 12px 12px 0;
    padding: 0;
  }

  .model-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  }

  .custom-tab-card .model-media {
    min-height: 280px;
    aspect-ratio: 16 / 9;
  }

  .custom-tab-card .model-media img {
    object-position: center;
  }

  .pokemon-row,
  .pokemon-row.has-repository {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .pokemon-row-repository,
  .pokemon-row-meta,
  .pokemon-row-actions {
    grid-column: 2;
    justify-items: start;
  }

  .pokemon-row-actions .use-print-action {
    width: auto;
  }
}

@media (max-width: 720px) {
  .request-workspace {
    width: 100%;
  }

  .catalog-panel,
  .request-panel {
    padding: 14px;
    overflow: hidden;
  }

  .tabs {
    width: 100%;
    flex-wrap: nowrap;
    padding-bottom: 6px;
    overflow-x: auto;
  }

  .request-group-tabs,
  .category-tabs {
    margin-bottom: 10px;
  }

  .tab-button {
    flex: 0 0 auto;
  }

  .model-grid {
    grid-template-columns: 1fr;
  }

  .field-pair,
  .field-trio {
    grid-template-columns: 1fr;
  }

  .order-items-head,
  .order-item-row {
    align-items: stretch;
    flex-direction: column;
  }

  .order-item-row .row-action {
    width: 100%;
  }

  .order-item-actions {
    display: grid;
    width: 100%;
  }

  .custom-tab-card .model-media {
    min-height: 220px;
    aspect-ratio: 4 / 3;
  }

  .custom-tab-card .model-media img {
    object-position: center;
  }

  .pokemon-modal {
    max-height: calc(100dvh - 24px);
  }

  .pokemon-modal-grid {
    grid-template-columns: 1fr;
  }

  .pokemon-art-panel {
    min-height: 280px;
    padding: 22px;
  }

  .pokemon-art-panel img {
    max-height: 240px;
  }

  .pokemon-modal-grid.is-n3d-approved .pokemon-art-panel::before {
    bottom: 12px;
    left: 12px;
    width: min(104px, 34%);
    opacity: 0.9;
  }

  .pokemon-info-panel {
    padding: 22px;
  }

  .pokemon-row,
  .pokemon-row.has-repository {
    grid-template-columns: 72px 1fr;
  }

  .pokemon-row-repository,
  .pokemon-row-meta,
  .pokemon-row-actions {
    grid-column: 2;
    justify-items: start;
  }

  .pokemon-title-line {
    align-items: flex-start;
  }

  .catalog-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-button {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .page-banner {
    margin-right: 10px;
    margin-left: 10px;
  }

  .catalog-pagination {
    padding: 10px;
  }

  .catalog-panel,
  .request-panel {
    border-radius: 7px;
  }

  .custom-tab-card .model-media {
    min-height: 190px;
  }

  .model-card {
    min-height: 0;
  }

  .pokemon-row,
  .pokemon-row.has-repository {
    grid-template-columns: 1fr;
  }

  .dex-number,
  .pokemon-row-repository,
  .pokemon-row-meta,
  .pokemon-row-actions {
    grid-column: 1;
    justify-self: start;
  }

  .pokemon-row-actions,
  .pokemon-row-actions .use-print-action {
    width: 100%;
  }
}

@media print {
  .confirmation-modal {
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .confirmation-header {
    padding-right: 0;
    margin-bottom: 12px;
  }

  .confirmation-header h2 {
    font-size: 28px;
  }

  .confirmation-details {
    border-color: #cfd8e6;
  }

  .confirmation-details div {
    break-inside: avoid;
    page-break-inside: avoid;
    grid-template-columns: 132px 1fr;
    padding: 6px 8px;
  }
}



