/* ============================================
   COMMON CSS VARIABLES & BASE STYLES
   ============================================ */

:root {
  /* ── ClearPic Design System v2.2 tokens (STYLE_GUIDE.md) ── */
  /* primary */
  --org:    #1a6cff;   /* clearpicBlue — data & structure only: links, IDs, active state. NOT the CTA colour. */
  --ink:    #0a0f1c;   /* midnight — primary text, headings, dark nav + dark surfaces */

  /* call to action */
  --cta:    #d97706;   /* amber 600 — every primary button */
  --cta-h:  #b45309;   /* amber 700 — hover */

  /* surfaces */
  --snow:   #fafbfc;
  --wash:   #f0f2f7;
  --line:   #e8eaf0;
  --hairline: #eef0f5;

  /* text */
  --slate:  #5a6178;
  --muted:  #8b91a8;

  /* semantic */
  --green:  #22c55e;
  --amber:  #f59e0b;
  --red:    #ef4444;
  --cyan:   #0ea5e9;
  --person: #7c5cfc;

  /* ── legacy aliases — load-bearing for inline style= attributes in markup ── */
  --primary: var(--org);
  --primary-hover: var(--cta-h);
  --primary-light: var(--wash);
  --dark-bg: var(--ink);
  --bg-body: var(--snow);
  --card-bg: #ffffff;
  --text-main: var(--ink);
  --text-secondary: var(--slate);
  --text-muted: var(--muted);
  --border: var(--line);
  --radius: 4px;
  --radius-lg: 0;
  --shadow-sm: none;
  --shadow-md: none;
  --success: var(--green);

  --container-max: 1100px;
  --container-padding: 24px;
  --card-padding: 32px;
  --card-padding-sm: 24px;
  --card-margin-bottom: 30px;
  --card-hover-lift: -4px;
  --gap-xs: 8px;
  --gap-sm: 12px;
  --gap-md: 24px;
  --gap-lg: 40px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-14: 56px;
  --space-15: 60px;
  --space-20: 80px;
  --section-padding-y: 80px;
  --section-padding-y-sm: 30px;
  --hero-padding-bottom: 56px;
  --content-max-narrow: 600px;
  --footer-inner-max: 475px;
  --nav-padding-y: 16px;
  --icon-size: 40px;
  --icon-size-sm: 20px;
  --min-column-width: 150px;
  --flag-icon-width: 1.25em;
  --flag-icon-height: 0.9375em;

  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 15px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 32px;
  --font-size-3xl: 48px;
  --font-size-hero-sm: 36px;
  --line-height-tight: 1.3;
  --line-height-logo: 20px;
  --font-size-logo: 19px;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base Typography */
body {
  font-family: "DM Sans", sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.03em;
}

/* Micro-label — the typographic atom of the system */
.ml {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.2s;
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Navigation — dark ink nav, the v2.2 signature element */
nav {
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  height: 58px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

nav .container {
  width: 100%;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.logo-word {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--org);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-beta {
  align-self: flex-start;
  margin-top: 1px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(26, 108, 255, 0.16);
  border: 1px solid rgba(26, 108, 255, 0.32);
  color: #7fb0ff;
  font-weight: 600;
  font-size: 9.5px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.back-link {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
}

.back-link:hover {
  color: #fff;
}

/* Cards */
.mb-0 {
  margin-bottom: 0 !important;
}

.card {
  background: var(--card-bg);
  border-radius: 0;
  padding: var(--card-padding);
  border: 1px solid var(--line);
  box-shadow: none;
  margin-bottom: var(--card-margin-bottom);
}

/* Typography */
h2 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-4);
  color: var(--text-main);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
}

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
  font-size: var(--font-size-base);
}

/* Footer — matches main_landing FooterSection */
.site-footer {
  background: #070b14;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 60px 0 40px;
  margin-top: 60px;
}

/* normalize width even on pages with a narrower local .container (order-status) */
.site-footer .container {
  max-width: var(--container-max);
  padding: 0 var(--container-padding);
}

.footer-grid {
  display: grid;
  grid-template-columns: 200px repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand img {
  height: 24px;
  width: auto;
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.6;
  font-weight: 300;
  margin: 0;
}

.footer-heading {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.footer-col a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #fff;
}

.footer-col .footer-legal-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.7;
  font-weight: 300;
  margin: 0;
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 12px;
  text-decoration: none;
  transition: border-color 0.2s;
}

.footer-badge:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.footer-badge-flag {
  font-size: 16px;
}

.footer-badge-label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-badge-name {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  white-space: nowrap;
}

.footer-coverage {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-coverage-label {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 6px;
}

.footer-coverage span:not(.footer-coverage-label) {
  font-size: 18px;
  line-height: 1;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.2);
  font-weight: 300;
}

.footer-bottom a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  transition: color 0.2s;
}

.footer-bottom a:hover {
  color: #fff;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 48px 0 32px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 36px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

li {
  list-style: none;
}
.disabled {
  opacity: 0.7;
  cursor: not-allowed !important;
}

input[type="checkbox"]:disabled {
  cursor: not-allowed;
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--cta);
}

.btn-submit.loading {
  position: relative;
  color: transparent;
}

.btn-submit.loading::after {
  content: "";
  position: absolute;
  width: var(--icon-size-sm);
  height: var(--icon-size-sm);
  top: 50%;
  left: 50%;
  margin-left: calc(var(--icon-size-sm) / -2);
  margin-top: calc(var(--icon-size-sm) / -2);
  border: 2px solid var(--card-bg);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

/* ── Notice / Info Cards ── */

.notice-card {
  border-radius: 0;
  padding: 20px 24px;
  margin-bottom: var(--card-margin-bottom);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.notice-card-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1.4;
}

.notice-card-body h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}

.notice-card-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

/* Notice variants: neutral spec-document panels — amber/red are reserved
   for data semantics, never UI decoration (STYLE_GUIDE v2.2) */
.notice-card.notice-unavailable,
.notice-card.notice-limited,
.notice-card.notice-restricted {
  background: var(--wash);
  border: 1px solid var(--line);
}

.notice-card.notice-unavailable h3,
.notice-card.notice-limited h3,
.notice-card.notice-restricted h3 { color: var(--ink); }

.notice-card.notice-unavailable p,
.notice-card.notice-limited p,
.notice-card.notice-restricted p  { color: var(--slate); }

main > .notice-card:first-child {
  margin-top: 40px;
}

/* ── Support Button & Modal ── */

.support-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  background: var(--dark-bg);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transition: background 0.15s, transform 0.15s;
}

.support-fab:hover {
  background: #1e1e38;
  transform: translateY(-1px);
}

.support-fab svg {
  flex-shrink: 0;
}

.support-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.45);
  align-items: center;
  justify-content: center;
}

.support-overlay.is-open {
  display: flex;
}

.support-dialog {
  background: #fff;
  border-radius: 4px;
  width: 100%;
  max-width: 420px;
  margin: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  overflow: hidden;
}

.support-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.support-dialog-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}

.support-dialog-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0 2px;
  transition: color 0.1s;
}

.support-dialog-close:hover {
  color: var(--text-main);
}

.support-dialog-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.support-dialog-body label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 5px;
}

.support-dialog-body input,
.support-dialog-body textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
  resize: none;
}

.support-dialog-body input:focus,
.support-dialog-body textarea:focus {
  border-color: var(--ink);
}

.support-dialog-body textarea {
  height: 100px;
}

.support-dialog-footer {
  padding: 0 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-submit-btn {
  width: 100%;
  padding: 11px;
  background: var(--cta);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.support-submit-btn:hover {
  background: var(--cta-h);
}

.support-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.support-success-msg {
  display: none;
  text-align: center;
  padding: 28px 24px;
  font-size: 15px;
  color: var(--text-main);
  line-height: 1.5;
}

.support-error-msg {
  font-size: 13px;
  color: #dc2626;
  display: none;
}

@media (max-width: 600px) {
  .support-fab {
    bottom: 16px;
    right: 16px;
    padding: 9px 14px;
    font-size: 13px;
  }

  .support-overlay {
    align-items: flex-end;
  }

  .support-dialog {
    max-width: 100%;
    margin: 0;
    border-radius: 16px 16px 0 0;
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
  }

  .support-dialog-body {
    overflow-y: auto;
    flex: 1;
  }

  .support-dialog-body textarea {
    height: 80px;
  }
}

.portal-link-btn {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.2s ease;
}
.portal-link-btn:hover {
  color: #fff;
}
.cart-count-badge {
  background: var(--cta);
  color: #fff;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 2px;
}
