/* Orders, checkout and printable invoices. */
.orders-shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.orders-shortcut > span:first-child {
  min-width: 0;
}
.orders-shortcut strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 500;
}
.orders-shortcut .muted {
  display: block;
  line-height: 1.7;
}
.orders-shortcut > span:last-child {
  flex-shrink: 0;
  color: var(--blue);
  font-size: 24px;
}
.orders-shortcut:focus-visible {
  outline: 2px solid #9bbaff;
  outline-offset: 4px;
}
.order-overview {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
  margin-bottom: 32px;
}
.order-overview #orders-count {
  display: block;
  font-size: 56px;
  font-weight: 400;
  color: #bbceff;
  margin-bottom: 16px;
}
.order-overview .account-panel > span:last-child {
  color: var(--muted);
  font-size: 14px;
}
.order-help h2 {
  margin-bottom: 24px;
}
.order-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  margin: 24px 0;
}
.order-table {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #122037;
}
.order-table table {
  width: 100%;
}
.order-table small {
  display: block;
  color: var(--muted);
  margin-top: 8px;
}
.order-table td:first-child a {
  color: #c3d3ff;
  overflow-wrap: anywhere;
}
.status-pill[data-state="delivered"] {
  color: #afe1cc;
  border-color: #426e66;
}
.status-pill[data-state="cancelled"] {
  color: #e9bdbd;
  border-color: #79515d;
}
.empty-order-mark {
  display: block;
  font-size: 42px;
  color: var(--blue);
  margin-bottom: 24px;
}
.commerce-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 26px;
  margin: 28px 0;
  border: 1px solid #3d5680;
  border-radius: 10px;
  background: linear-gradient(105deg, #243754b3, #172a444d);
}
.commerce-banner p {
  font-size: 14px;
  color: #b8c7df;
  line-height: 1.7;
  margin: 4px 0 0;
}
.commerce-banner strong {
  font-weight: 500;
}
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: start;
}
.checkout-section + .checkout-section {
  margin-top: 24px;
}
.step-heading {
  display: flex;
  gap: 18px;
  align-items: baseline;
  margin-bottom: 28px;
}
.step-heading > span {
  font-size: 13px;
  color: #95ade0;
  letter-spacing: 0.12em;
}
.step-heading h2 {
  margin: 0 0 8px;
}
.step-heading p {
  margin: 0;
  font-size: 14px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field-grid > div {
  min-width: 0;
}
.field-grid .full {
  grid-column: 1/-1;
}
.account-panel .field-grid label {
  margin-top: 0;
}
.field-grid label .muted {
  font-size: inherit;
}
.account-panel select,
.account-panel textarea {
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  font: inherit;
  font-size: 16px;
  color: #edf4ff;
  background: #0d1a2e;
  border: 1px solid #3d5478;
  border-radius: 6px;
  color-scheme: dark;
}
.account-panel textarea {
  resize: vertical;
}
.account-panel select:focus,
.account-panel textarea:focus {
  outline: 2px solid #9bbaff;
  outline-offset: 3px;
}
.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.account-panel .payment-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 14px;
  margin: 0;
  border: 1px solid #344966;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.payment-option:has(input:checked) {
  background: #29416a88;
  border-color: #839eff;
}
.payment-option:has(input:focus-visible) {
  outline: 2px solid #a1baff;
  outline-offset: 3px;
}
.payment-option:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}
.payment-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.payment-option strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
.payment-option small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: #9bafce;
}
.payment-symbol {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 32px;
  font-size: 25px;
  color: #aec1f8;
}
.radio-dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin-left: auto;
  border: 1px solid #7289ad;
  border-radius: 50%;
}
.payment-option:has(input:checked) .radio-dot {
  background: #93adff;
  border-color: #93adff;
  box-shadow: inset 0 0 0 3px #213959;
}
.payment-explanation {
  margin-top: 24px;
  color: #b7c7e1;
  font-size: 14px;
  line-height: 1.8;
}
.payment-explanation > strong {
  color: #e0eaff;
}
.payment-explanation .button {
  margin-top: 12px;
}
.checkout-summary {
  position: sticky;
  top: 110px;
}
.checkout-summary h2 {
  margin: 0 0 12px;
}
.summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line, #d4dae4);
  font-size: 14px;
}
.summary-item strong {
  font-weight: 500;
}
.summary-item > strong {
  white-space: nowrap;
}
.summary-item span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
}
.discount-field {
  margin: 24px 0;
}
.discount-field .copy-field {
  gap: 8px;
}
.discount-field .button {
  padding: 12px 16px;
}
.commerce-totals {
  margin: 24px 0;
  font-size: 14px;
}
.commerce-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0;
}
.commerce-totals dt {
  color: var(--muted);
}
.commerce-totals dd {
  margin: 0;
  text-align: right;
}
.commerce-totals .total {
  font-size: 19px;
  padding: 20px 0 0;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}
.commerce-totals .total dt {
  color: #e3eaff;
}
#place-order {
  width: 100%;
  justify-content: space-between;
}
.checkout-summary .text-link {
  display: inline-block;
  font-size: 13px;
  margin-top: 16px;
}
.checkout-summary .input-hint a {
  color: #b9cbff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.order-status-card {
  margin-bottom: 28px;
}
.order-status-card .section-row {
  margin: 0;
  align-items: center;
  gap: 20px;
}
.order-status-card .panel-kicker {
  margin-bottom: 14px;
}
.order-status-card h2 {
  font-size: clamp(26px, 3vw, 36px);
  margin-bottom: 12px;
}
.shipping-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  margin: 42px 0 20px;
}
.shipping-steps li {
  position: relative;
  color: #8596b3;
  font-size: 12px;
}
.shipping-steps li::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 34px;
  right: 0;
  height: 1px;
  background: #3a4c69;
}
.shipping-steps li:last-child::before {
  display: none;
}
.shipping-steps li > span {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 15px;
  border: 1px solid #52617f;
  border-radius: 50%;
  background: #152239;
  font-size: 11px;
}
.shipping-steps strong {
  font-weight: 400;
  padding-right: 8px;
  display: block;
}
.shipping-steps .complete {
  color: #c4d4ff;
}
.shipping-steps .complete > span {
  border-color: #809cf4;
  color: #d6e1ff;
  background: #273f6c;
}
.shipping-steps .current > span {
  box-shadow: 0 0 0 5px #809cf418;
}
.shipping-steps .complete::before {
  background: #718bd0;
}
.shipping-steps .current::before {
  background: #3a4c69;
}
.carrier-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  margin-top: 26px;
  border-top: 1px solid var(--line);
  color: #b4c6e4;
  font-size: 14px;
}
.order-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 28px;
}
.order-columns .account-panel {
  margin-bottom: 24px;
}
.order-columns .account-panel p {
  color: #b3c3dd;
  line-height: 1.8;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.order-columns .account-panel h2 {
  font-size: 24px;
  overflow-wrap: anywhere;
}
.payment-instructions {
  white-space: pre-wrap;
}
.proof-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}
.proof-list li {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 14px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.proof-list a {
  color: #bdcfff;
}
.order-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.order-timeline li {
  position: relative;
  padding: 0 0 24px 23px;
  border-left: 1px solid #3c5276;
}
.order-timeline li::before {
  position: absolute;
  content: "";
  width: 7px;
  height: 7px;
  background: #8aa6ef;
  border-radius: 50%;
  top: 5px;
  left: -4px;
}
.order-timeline li:last-child {
  padding-bottom: 0;
}
.order-timeline time {
  color: #829cc6;
  font-size: 11px;
}
.order-timeline p {
  margin: 8px 0 0;
}
.setup-details {
  margin: 28px 0;
}
.setup-details summary {
  cursor: pointer;
  color: #d4e1ff;
  font-size: 18px;
}
.setup-details[open] summary {
  margin-bottom: 28px;
}
.settings-group {
  margin: 0;
  border-top: 1px solid var(--line);
}
.settings-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
}
.settings-group > summary::-webkit-details-marker { display: none; }
.settings-group > summary::after { content: "+"; color: var(--muted); font-size: 22px; }
.settings-group[open] > summary::after { content: "−"; }
.settings-group > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.settings-summary { display: grid; gap: 6px; min-width: 0; }
.settings-summary strong { font-weight: 500; }
.settings-note { color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.settings-body { padding: 0 0 26px; min-width: 0; }
.settings-body > :first-child { margin-top: 0; }
.manual-service > summary { padding: 18px 0; }
.manual-service .settings-body { padding: 0 0 20px; }
.settings-help { margin: 18px 0 0; }
.settings-help > summary { color: var(--muted); font-size: 13px; cursor: pointer; }
.settings-help code { overflow-wrap: anywhere; }
#provider-form { margin: 20px 0 30px; }
#buyer-payment-methods { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 14px; }
#buyer-payment-methods .checkbox-label { margin: 0; }
#provider-form fieldset { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
#provider-form legend { font-size: 14px; }
#shipping-settings .settings-body fieldset { min-width: 0; }
#shipping-settings .customization-actions { padding-top: 24px; border-top: 1px solid var(--line); }
#payments .form-status:empty, #shipping-settings .form-status:empty,
#tax-reporting-status:empty { display: none; }
.catalog-edit-row {
  display: grid;
  grid-template-columns: minmax(160px, 2fr) 1fr 1fr auto auto;
  align-items: end;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.catalog-edit-row > div:first-child {
  align-self: center;
}
.catalog-edit-row small {
  display: block;
  color: var(--muted);
  margin-top: 8px;
}
.catalog-edit-row .checkbox-label {
  align-self: center;
}
.catalog-edit-row label {
  margin-top: 0;
}
.order-columns + .setup-details {
  margin-top: 12px;
}
.invoice-document {
  margin: 0;
  color: #17283e;
  background: #e9edf4;
  font:
    14px/1.6 system-ui,
    sans-serif;
}
.invoice-document * {
  box-sizing: border-box;
}
.invoice-document main {
  max-width: 900px;
  margin: 40px auto;
  background: #fff;
  padding: 50px;
  box-shadow: 0 12px 50px #18284116;
}
.invoice-document h1 {
  margin: 0 0 12px;
  font-size: 36px;
  line-height: 1.2;
  font-weight: 500;
}
.invoice-document h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5a6e88;
}
.invoice-document a {
  color: #254bbb;
  overflow-wrap: anywhere;
}
.invoice-top {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 26px;
  border-bottom: 2px solid #819aed;
}
.invoice-top > div:last-child {
  text-align: right;
}
.invoice-brand {
  font-size: 25px;
  font-weight: 650;
  margin: 0 0 16px;
}
.invoice-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 0;
}
.invoice-controls button {
  border: 0;
  border-radius: 6px;
  padding: 12px 18px;
  color: #fff;
  background: #28468c;
  cursor: pointer;
  font: inherit;
}
.invoice-address {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 24px 0 36px;
}
.invoice-document table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.invoice-document th,
.invoice-document td {
  padding: 14px 10px;
  text-align: right;
  border-bottom: 1px solid #d8e0ea;
}
.invoice-document th:first-child,
.invoice-document td:first-child {
  text-align: left;
  padding-left: 0;
}
.invoice-document th {
  background: #f3f6fa;
  font-weight: 500;
}
.invoice-totals {
  margin: 24px 0 40px auto;
  max-width: 320px;
}
.invoice-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 6px 0;
}
.invoice-totals dd {
  margin: 0;
}
.invoice-totals > div:last-child {
  border-top: 1px solid #d8e0ea;
  margin-top: 12px;
  padding-top: 15px;
  font-size: 18px;
  font-weight: 600;
}
.invoice-document footer {
  border-top: 1px solid #d8e0ea;
  margin-top: 32px;
  padding-top: 24px;
  font-size: 12px;
  color: #596e89;
}
@media (max-width: 1000px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
  .checkout-summary {
    position: static;
  }
  .catalog-edit-row {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
  .catalog-edit-row .checkbox-label {
    margin: 0;
  }
}
@media (max-width: 700px) {
  .order-overview,
  .order-columns {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .order-overview {
    margin-bottom: 24px;
  }
  .commerce-banner {
    align-items: flex-start;
    padding: 20px;
    gap: 14px;
  }
  .checkout-grid {
    gap: 20px;
  }
  .payment-methods {
    grid-template-columns: 1fr;
  }
  .field-grid {
    gap: 18px 12px;
  }
  .step-heading {
    gap: 12px;
  }
  .shipping-steps {
    grid-template-columns: 1fr;
    gap: 0;
    margin: 28px 0 0;
  }
  .shipping-steps li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 22px;
  }
  .shipping-steps li > span {
    margin: 0;
    flex-shrink: 0;
  }
  .shipping-steps li::before {
    top: 34px;
    bottom: 0;
    width: 1px;
    height: auto;
    left: 16px;
    right: auto;
  }
  .order-status-card .section-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .catalog-edit-row {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .catalog-edit-row > div:first-child {
    grid-column: 1/-1;
  }
  .catalog-edit-row .button {
    grid-column: 2;
  }
  .order-pagination {
    justify-content: center;
    gap: 12px;
  }
  .invoice-document main {
    margin: 0;
    padding: 24px 20px;
  }
  .invoice-top {
    flex-direction: column;
  }
  .invoice-top > div:last-child {
    text-align: left;
  }
  .invoice-address {
    gap: 16px;
  }
}
@media print {
  @page {
    margin: 15mm;
  }
  .invoice-document {
    color: #111;
    background: #fff;
    font-size: 10pt;
  }
  .invoice-document main {
    box-shadow: none;
    margin: 0;
    padding: 0;
    max-width: none;
  }
  .invoice-controls {
    display: none;
  }
  .invoice-top {
    flex-direction: row;
  }
  .invoice-top > div:last-child {
    text-align: right;
  }
  .invoice-document a {
    color: inherit;
  }
  .invoice-document tr,
  .invoice-address,
  .invoice-totals {
    break-inside: avoid;
  }
  .invoice-document h2 {
    break-after: avoid;
  }
}

.checkbox-label[hidden] {
  display: none !important;
}
body:is(
    [data-page="checkout"],
    [data-page="orders"],
    [data-page="order"],
    [data-page="manage-orders"]
  )
  .button.secondary {
  background: #1b2d48;
  border: 1px solid #4a6087;
  color: #d7e4ff;
  border-radius: 6px;
}
body:is(
    [data-page="checkout"],
    [data-page="orders"],
    [data-page="order"],
    [data-page="manage-orders"]
  )
  .button.secondary:hover {
  background: #293f62;
  border-color: #7e9bcf;
}

.crypto-payment-card {
  margin-top: 1.5rem;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.crypto-payment-card header {
  text-align: center;
  margin-bottom: 2rem;
}
.crypto-payment-card h3 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 0.5rem 0;
}
.crypto-value {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 1rem;
  margin-top: 0.8rem;
  background: color-mix(in srgb, var(--blue) 10%, transparent);
  border-radius: 8px;
}
.crypto-value strong {
  font-size: clamp(1.4rem, 3vw, 2rem);
  overflow-wrap: anywhere;
}
.crypto-value button {
  margin-left: auto;
}
.crypto-address {
  padding: 1rem;
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.crypto-address code {
  display: block;
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
  margin: 0.8rem 0;
  user-select: all;
}
.crypto-address .text-link {
  display: inline-block;
  margin-left: 1rem;
}
#paypal-connection-form code,
#crypto-connection-form code {
  overflow-wrap: anywhere;
}

.admin-order-cards {
  display: grid;
  gap: 20px;
}
.admin-order-cards .account-panel {
  margin: 0;
}
.admin-order-cards small {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
}
.order-quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.shipping-steps {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
