/*
  Tribal UI utility + components layer
  This project uses Tailwind CDN, but many templates rely on semantic classes
  like .card, .btn, .text-yellow, etc. This file provides those building blocks.
*/

:root{
  --tribal-blue: #183a67;
  --tribal-blue-light: #8b9cb3;
  --tribal-dark: #07111e;
  --tribal-text: #e7ebef;
  --tribal-yellow: #c4ff00;
  --tribal-green: #27ae60;
  --tribal-red: #E7352C;
}

/* Type helpers */
.font-ui { font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji"; }
.text-muted { color: rgba(231,235,239,0.70); }
.text-yellow { color: var(--tribal-yellow); }
.text-blue-light { color: var(--tribal-blue-light); }
.text-red { color: var(--tribal-red); }

/* =========================================================
   SECTION TITLE (Canonical TEXT title system)
   Single source of truth for all section titles (except HERO)
   ========================================================= */
.section-title{
  font-family: 'Tribal Bold', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 2rem;
  margin: 0 0 2rem 0;
}
.section-title--left{ text-align: left; }
.section-title--center{ text-align: center; }
.section-title--right{ text-align: right; }

/* Fade/gradient active only when fade_intensity !== none (renderer adds class + --section-title-gradient) */
.section-title--fade{
  color: transparent !important;
  background: var(--section-title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Legacy utility classes used in templates */
.bg-green { background: var(--tribal-green); color: var(--tribal-dark); }
.bg-red { background: var(--tribal-red); color: #fff; }
.bg-yellow { background: var(--tribal-yellow); color: var(--tribal-dark); }
.bg-blue-light { background: var(--tribal-blue-light); color: var(--tribal-dark); }

/* Tailwind-like slashed utilities used in markup */
.bg-yellow\/20 { background: rgba(196,255,0,0.20); }
.bg-blue-light\/20 { background: rgba(139,156,179,0.20); }
.bg-red\/20 { background: rgba(231,53,44,0.20); }
.bg-green\/20 { background: rgba(39,174,96,0.20); }

.hover\:bg-blue-light\/20:hover { background: rgba(139,156,179,0.20); }
.hover\:bg-red\/20:hover { background: rgba(231,53,44,0.20); }
.hover\:underline:hover { text-decoration: underline; }

/* Card */
.card{
  background: linear-gradient(180deg, rgba(7,17,30,0.70) 0%, rgba(7,17,30,0.55) 100%);
  border: 1px solid rgba(139,156,179,0.22);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.82rem;
  line-height: 1;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
  user-select:none;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{
  background: var(--tribal-yellow);
  color: var(--tribal-dark);
  box-shadow: 0 10px 24px rgba(196,255,0,0.22);
}
.btn-primary:hover{
  background: rgba(196,255,0,0.92);
  box-shadow: 0 12px 30px rgba(196,255,0,0.28);
}
.btn-secondary{
  background: rgba(196,255,0,0.08);
  color: var(--tribal-yellow);
  border: 1px solid rgba(196,255,0,0.28);
}
.btn-secondary:hover{
  background: rgba(196,255,0,0.12);
  border-color: rgba(196,255,0,0.42);
}
.btn[disabled], .btn:disabled{
  opacity: .55;
  cursor: not-allowed;
}

/* Inputs */
input[type="text"], input[type="email"], input[type="password"], input[type="url"], textarea, select{
  background: rgba(7,17,30,0.55);
  border: 1px solid rgba(139,156,179,0.25);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--tribal-text);
  outline: none;
}
input:focus, textarea:focus, select:focus{
  border-color: rgba(196,255,0,0.55);
  box-shadow: 0 0 0 3px rgba(196,255,0,0.14);
}
label{ color: rgba(231,235,239,0.85); }

/* Badges */
.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 0.72rem;
  line-height: 1.2;
}

/* Tables */
table{ border-collapse: collapse; }
thead th{
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .72rem;
  color: rgba(231,235,239,0.65);
}

/* =========================================================
   Account: "My Pre-Orders" (feature-flagged)
   - No hard-coded texts here; only layout + CSS animations.
   ========================================================= */

.tribal-preorders__header { margin-bottom: 16px; }
.tribal-preorders__cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 768px) { .tribal-preorders__cards { grid-template-columns: 1fr 1fr; } }

.preorder-card{
  border: 1px solid rgba(231,235,239,0.16);
  background: rgba(7,17,30,0.35);
  border-radius: 16px;
  padding: 14px 14px 12px;
}
.preorder-card-title{ font-weight: 900; color: var(--tribal-text); }
.preorder-card-variant{ margin-top: 4px; font-size: 0.85rem; color: rgba(231,235,239,0.70); }
.preorder-card-eta{ margin-top: 8px; font-size: 0.85rem; color: rgba(231,235,239,0.80); }

.preorder-disclaimer{
  margin-top: 10px;
  font-size: 0.82rem;
  color: rgba(231,235,239,0.70);
}

.preorder-timeline{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 10px;
}
.preorder-step{ display:flex; flex-direction:column; align-items:center; gap:6px; min-width: 66px; }
.preorder-step-label{ font-size: 0.72rem; text-align:center; color: rgba(231,235,239,0.72); }
.preorder-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(139,156,179,0.55);
  border: 1px solid rgba(231,235,239,0.22);
}
.preorder-line{
  flex: 1 1 auto;
  height: 2px;
  background: rgba(139,156,179,0.35);
  border-radius: 999px;
}

.preorder-step.is-complete .preorder-dot{ background: rgba(196,255,0,0.85); border-color: rgba(196,255,0,0.55); }
.preorder-line.is-complete{ background: rgba(196,255,0,0.55); }

@keyframes preorderPulse {
  0% { box-shadow: 0 0 0 0 rgba(196,255,0,0.22); transform: scale(1); }
  70% { box-shadow: 0 0 0 10px rgba(196,255,0,0.0); transform: scale(1.08); }
  100% { box-shadow: 0 0 0 0 rgba(196,255,0,0.0); transform: scale(1); }
}
.preorder-step.is-active .preorder-dot{
  background: rgba(196,255,0,1);
  border-color: rgba(196,255,0,0.70);
  animation: preorderPulse 1.6s ease-in-out infinite;
}
.preorder-step.is-active .preorder-step-label{ color: rgba(231,235,239,0.92); }

@keyframes preorderFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.preorder-fade-in{ animation: preorderFadeIn 220ms ease-out both; }

.preorder-explanation{ margin-top: 8px; }
.preorder-explanation-title{ font-size: 0.86rem; font-weight: 800; color: rgba(231,235,239,0.92); }
.preorder-explanation-desc{ margin-top: 2px; font-size: 0.84rem; color: rgba(231,235,239,0.70); }

.preorder-cancelled .preorder-dot{ background: rgba(231,53,44,0.85); border-color: rgba(231,53,44,0.55); }
