/*
 * Nextuin — shared customer-facing theme.
 * Design source of truth: request.php / OrderToSend.php ("Order Delivered" / "Order Queued" pages).
 * Used by every page a customer sees: index.php, order-status.php, error.php, canceled.php,
 * PendingOrder.php, ordererToRedeem.php, terms.html, request.php, OrderToSend.php.
 */

:root {
  --bg-1: #050714;
  --bg-2: #12132d;
  --card: rgba(9, 23, 38, 0.92);
  --line: rgba(117, 246, 255, 0.18);
  --text: #f0f6ff;
  --muted: #9cb0d1;
  --cyan: #16e0f3;
  --blue: #3d8cff;
  --purple: #8f4cff;
  --pink: #ec2bd7;
  --green: #54f0ba;
  --warning: #ffd166;
  --danger: #ff6b6b;
}

* { box-sizing: border-box; }

/* Minimal Bootstrap-compatible spacing utilities — these pages no longer load
   Bootstrap's CSS, but some inline markup still uses its margin classes. */
.me-1 { margin-right: .25rem; }
.me-2 { margin-right: .5rem; }
.ms-1 { margin-left: .25rem; }
.ms-2 { margin-left: .5rem; }
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: 1rem; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: 1rem; }

html, body {
  margin: 0;
  min-height: 100vh;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(236,43,215,.13), transparent 30%),
    radial-gradient(circle at 90% 85%, rgba(61,140,255,.16), transparent 32%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--cyan); }
a:hover { color: var(--pink); }

.page {
  width: min(760px, calc(100% - 28px));
  margin: 0 auto;
  padding: 34px 0 50px;
}

.page-wide {
  width: min(1040px, calc(100% - 28px));
}

.brand {
  display: block;
  width: fit-content;
  font-size: clamp(26px, 7vw, 42px);
  font-weight: 900;
  letter-spacing: .14em;
  margin: 0 0 22px;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 20px rgba(22,224,243,.16);
  text-decoration: none;
}

/* Main card */
.wait-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(82, 224, 241, .22);
  border-radius: 32px;
  padding: clamp(22px, 5vw, 42px);
  background:
    linear-gradient(180deg, rgba(7,47,60,.88), rgba(23,8,31,.94)),
    var(--card);
  box-shadow:
    0 26px 70px rgba(0,0,0,.38),
    inset 0 0 0 1px rgba(255,255,255,.025);
}

.wait-card::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: conic-gradient(
    from 180deg,
    transparent,
    rgba(22,224,243,.10),
    transparent,
    rgba(236,43,215,.10),
    transparent
  );
  animation: rotateGlow 12s linear infinite;
  pointer-events: none;
}

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

.content { position: relative; z-index: 1; }

.status-icon {
  width: 92px;
  height: 92px;
  margin: 0 auto 20px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--cyan), var(--blue), var(--pink));
  box-shadow: 0 16px 42px rgba(56, 115, 255, .35);
  animation: softPulse 2.2s ease-in-out infinite;
  color: #07121b;
  font-size: 34px;
}

@keyframes softPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 16px 42px rgba(56,115,255,.30); }
  50% { transform: scale(1.035); box-shadow: 0 20px 54px rgba(236,43,215,.30); }
}

.status-icon svg {
  width: 50px;
  height: 50px;
  stroke: #07121b;
  stroke-width: 5.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-icon.icon-warn {
  background: linear-gradient(145deg, var(--warning), #ff8c42);
}

.status-icon.icon-danger {
  background: linear-gradient(145deg, var(--danger), var(--pink));
}

.status-icon.icon-ok {
  background: linear-gradient(145deg, var(--green), var(--cyan));
}

h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(26px, 6.5vw, 44px);
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.15;
}

h2 {
  color: var(--text);
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 800;
}

.subtitle {
  max-width: 620px;
  margin: 16px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: clamp(14px, 3.6vw, 17px);
  line-height: 1.65;
}

.highlight { color: var(--text); font-weight: 800; }

/* Status chip (small pill above the title) */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 auto 14px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  width: fit-content;
}

.status-chip.chip-ok {
  color: #d3ffef;
  background: rgba(84,240,186,.12);
  border: 1px solid rgba(84,240,186,.32);
}

.status-chip.chip-wait {
  color: #bdeeff;
  background: rgba(22,224,243,.10);
  border: 1px solid rgba(22,224,243,.28);
}

.status-chip.chip-warn {
  color: #ffe9ac;
  background: rgba(255,209,102,.12);
  border: 1px solid rgba(255,209,102,.32);
}

.status-chip.chip-danger {
  color: #ffd4d4;
  background: rgba(255,107,107,.12);
  border: 1px solid rgba(255,107,107,.32);
}

.status-chip .chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.status-chip-wrap {
  display: flex;
  justify-content: center;
}

/* Countdown / delivery-progress block */
.countdown-wrap {
  margin-top: 26px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(3, 9, 18, .58);
  border: 1px solid rgba(22,224,243,.14);
}

.countdown-label {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  margin-bottom: 13px;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.time-box {
  padding: 15px 8px 13px;
  text-align: center;
  border-radius: 17px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.06);
}

.time-value {
  display: block;
  font-size: clamp(26px, 7vw, 42px);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, var(--cyan), #75a7ff, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.time-unit {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.progress-shell {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  margin-top: 18px;
  background: rgba(255,255,255,.07);
}

.progress-bar {
  position: relative;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--pink));
  transition: width .9s ease;
}

.progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.45) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: shimmer 1.8s linear infinite;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

.stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 13px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

.spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-radius: 50%;
  border: 2px solid rgba(22,224,243,.25);
  border-top-color: var(--cyan);
  animation: spin .8s linear infinite;
}

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

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 25px;
}

.step {
  position: relative;
  min-width: 0;
  text-align: center;
  color: #7183a3;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.dot {
  width: 14px;
  height: 14px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #26334a;
  box-shadow: 0 0 0 4px rgba(38,51,74,.24);
}

.step.done, .step.active { color: #dbe9ff; }
.step.done .dot { background: var(--green); box-shadow: 0 0 0 4px rgba(84,240,186,.14); }
.step.active .dot {
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(22,224,243,.15), 0 0 22px rgba(22,224,243,.55);
  animation: dotPulse 1.3s ease-in-out infinite;
}

@keyframes dotPulse {
  50% { transform: scale(1.25); }
}

.deadline-reached .status-icon {
  background: linear-gradient(145deg, var(--warning), #ff8c42);
}
.deadline-reached .stage { color: var(--warning); }
.deadline-reached .progress-bar { background: linear-gradient(90deg, var(--warning), #ff8c42); }
.deadline-reached .notice {
  border-color: rgba(255,140,66,.28);
  background: rgba(255,140,66,.10);
  color: #ffe0c7;
}

/* Notice / callout box */
.notice {
  margin-top: 25px;
  padding: 18px 19px;
  border-radius: 18px;
  border: 1px solid rgba(255,209,102,.22);
  background: rgba(255,209,102,.075);
  color: #ffe9ac;
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
}

.notice.notice-ok {
  border-color: rgba(84,240,186,.28);
  background: rgba(84,240,186,.08);
  color: #d3ffef;
}

.notice.notice-danger {
  border-color: rgba(255,107,107,.3);
  background: rgba(255,107,107,.1);
  color: #ffd4d4;
}

.notice strong { color: #fff3cb; }
.notice-ok strong { color: #eafff6; }
.notice-danger strong { color: #ffe9e9; }

/* Meta grid (Order ID / Product / etc.) */
.order-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.meta-box {
  min-width: 0;
  padding: 14px 15px;
  border-radius: 15px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.05);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.meta-box:hover {
  transform: translateY(-2px);
  border-color: rgba(22,224,243,.28);
  background: rgba(255,255,255,.05);
}

.meta-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.meta-value {
  margin-top: 5px;
  color: var(--text);
  font-size: 14px;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}

/* Key / account data reveal box */
.key-box {
  margin-top: 18px;
  padding: 16px 17px;
  border-radius: 18px;
  background: rgba(3, 9, 18, .58);
  border: 1px dashed rgba(22,224,243,.35);
}

.key-value {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 800;
  word-break: break-word;
  color: var(--text);
}

/* Proof media gallery */
.media-box {
  margin-top: 18px;
  padding: 16px 17px;
  border-radius: 18px;
  background: rgba(3, 9, 18, .58);
  border: 1px solid rgba(255,255,255,.08);
}

.media-shots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.media-shot {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: #000;
  transition: transform .15s ease, border-color .15s ease;
}

.media-shot:hover {
  transform: translateY(-2px);
  border-color: rgba(22,224,243,.4);
}

.media-video {
  display: block;
  width: 100%;
  max-height: 420px;
  margin-top: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: #000;
}

.media-shots-grid + .media-video {
  margin-top: 14px;
}

/* Buttons */
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.actions.actions-wrap {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.btn {
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  padding: 13px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}

.btn:hover { transform: translateY(-2px); filter: brightness(1.05); color: inherit; }

.btn-primary {
  color: #06111d;
  background: linear-gradient(100deg, var(--cyan), var(--blue), var(--pink));
}
.btn-primary:hover { color: #06111d; }

.btn-secondary {
  color: #a9b6cf;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.075);
}
.btn-secondary:hover { color: #dbe9ff; }

.btn-secondary.locked {
  cursor: not-allowed;
  opacity: .62;
}

.small-note {
  margin: 15px 0 0;
  text-align: center;
  color: #7487a8;
  font-size: 12px;
  line-height: 1.45;
}

/* Forms (activation form, status checker, etc.) */
.field { margin-top: 16px; }
.field:first-child { margin-top: 0; }

.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: #cfe0ff;
  letter-spacing: .02em;
  margin-bottom: 7px;
}

.field-input {
  width: 100%;
  background: rgba(3, 9, 18, .6);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--text);
  border-radius: 14px;
  padding: 13px 15px;
  font: inherit;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field-input::placeholder { color: #5f6f92; }

.field-input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(22,224,243,.16);
}

textarea.field-input { resize: vertical; min-height: 90px; }

.field-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

.field-check input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--cyan);
  flex-shrink: 0;
}

.field-error {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--danger);
  display: none;
}

.field-input.is-invalid { border-color: var(--danger); }
.field-input.is-invalid ~ .field-error,
.field.is-invalid .field-error { display: block; }

/* Footer */
.site-footer {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center;
  color: #7487a8;
  font-size: 12px;
  line-height: 1.8;
}

.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--cyan); text-decoration: underline; }

/* Simple content card (for longer pages like Terms) */
.content-card {
  border: 1px solid rgba(82, 224, 241, .18);
  border-radius: 24px;
  padding: clamp(20px, 4vw, 34px);
  background:
    linear-gradient(180deg, rgba(7,47,60,.55), rgba(23,8,31,.6)),
    var(--card);
  box-shadow: 0 26px 70px rgba(0,0,0,.32);
}

.content-card h2 {
  margin-top: 26px;
  margin-bottom: 8px;
  color: var(--cyan);
}
.content-card h2:first-child { margin-top: 0; }

.content-card p,
.content-card li {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}

@media (max-width: 560px) {
  .page { width: min(100% - 18px, 760px); padding-top: 18px; }
  .wait-card, .content-card { border-radius: 24px; padding: 22px 16px; }
  .actions, .order-meta { grid-template-columns: 1fr; }
  .steps { gap: 4px; }
  .step { font-size: 8px; }
}
