/* =============================================================
   SBT Prize Wheel – Frontend Styles
   Matches the standalone HTML design exactly
   ============================================================= */

:root {
  --sbt-navy:    #0B132B;
  --sbt-blue:    #1481C5;
  --sbt-blue-lt: #E1F2FE;
  --sbt-lime:    #DBFE87;
  --sbt-charcoal:#403F4C;
  --sbt-white:   #FFFFFF;
  --sbt-muted:   #8B9AB0;
  --sbt-border:  rgba(255,255,255,0.1);
}

/* Wrapper */
.sbt-wrap {
  font-family: 'Geologica', sans-serif;
  font-weight: 300;
  color: var(--sbt-white);
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  position: relative;
}

/* Animated background behind the widget */
.sbt-wrap::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(20,129,197,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(20,129,197,0.1)  0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 60% 40%, rgba(219,254,135,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}
.sbt-wrap::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(20,129,197,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,129,197,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: -1;
}

/* ── Header ── */
.sbt-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 40px;
  animation: sbt-fadeDown 0.6s ease both;
}

.sbt-logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(20,129,197,0.15);
  border: 1px solid rgba(20,129,197,0.35);
  border-radius: 100px;
  padding: 8px 20px;
  margin-bottom: 28px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sbt-lime);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.sbt-logo-badge::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--sbt-lime);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--sbt-lime);
  animation: sbt-pulse 2s infinite;
}
@keyframes sbt-pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.6; transform:scale(1.3); }
}
.sbt-h1 {
  font-size: clamp(36px, 7vw, 58px);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--sbt-white);
}
.sbt-h1 .gold { color: var(--sbt-lime); }
.sbt-subtitle {
  font-size: 17px;
  color: var(--sbt-muted);
  font-weight: 300;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 24px;
}
.sbt-subtitle .hl { color: var(--sbt-lime); }
.sbt-ipad-emoji {
  font-size: 72px;
  display: block;
  animation: sbt-float 3s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(20,129,197,0.4));
  margin: 0 auto 8px;
}
@keyframes sbt-float {
  0%,100% { transform:translateY(0); }
  50%      { transform:translateY(-10px); }
}
.sbt-draw-badge {
  display: inline-block;
  background: var(--sbt-lime);
  color: var(--sbt-navy);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 100px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 32px;
}

/* ── Trust bar ── */
.sbt-trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  animation: sbt-fadeUp 0.7s 0.2s ease both;
}
.sbt-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--sbt-muted);
}
.sbt-trust-item .sbt-icon { color: var(--sbt-lime); font-size: 15px; }

/* ── Card ── */
.sbt-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--sbt-border);
  border-radius: 24px;
  padding: 40px 36px;
  backdrop-filter: blur(20px);
  animation: sbt-fadeUp 0.7s 0.3s ease both;
  margin-bottom: 24px;
}
@media (max-width: 500px) { .sbt-card { padding: 28px 20px; } }

/* ── Step dots ── */
.sbt-step-indicator { display:flex; gap:6px; margin-bottom:28px; }
.sbt-step {
  height: 4px; border-radius: 2px;
  background: var(--sbt-border); flex: 1;
  transition: background 0.4s ease;
}
.sbt-step.active { background: var(--sbt-blue); }
.sbt-step.done   { background: var(--sbt-lime); }

/* ── Form headings ── */
.sbt-form-heading    { font-size:22px; font-weight:700; margin-bottom:8px; color:var(--sbt-white); }
.sbt-form-subheading { font-size:14px; color:var(--sbt-muted); margin-bottom:28px; line-height:1.5; }

/* ── Field grid ── */
.sbt-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 500px) { .sbt-field-row { grid-template-columns: 1fr; } }

.sbt-field { display:flex; flex-direction:column; gap:6px; }
.sbt-field label {
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.7); letter-spacing: 0.02em;
}
.sbt-req { color: var(--sbt-lime); margin-left: 2px; }

/* Inputs & selects */
.sbt-field input:not([type="checkbox"]),
.sbt-field select {
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 13px 16px;
  font-family: 'Geologica', sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: var(--sbt-white);
  outline: none;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.sbt-field input::placeholder { color: rgba(255,255,255,0.25); }
.sbt-field input:not([type="checkbox"]):focus,
.sbt-field select:focus {
  border-color: var(--sbt-blue);
  background: rgba(20,129,197,0.1);
  box-shadow: 0 0 0 4px rgba(20,129,197,0.15);
}
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.5); cursor: pointer;
}
.sbt-field select option { background: #0B132B; color: white; }

.sbt-select-wrap { position: relative; }
.sbt-select-wrap::after {
  content: '▾';
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.4); pointer-events: none; font-size: 14px;
}

/* User stepper */
.sbt-users-ctrl {
  display: flex; align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sbt-users-ctrl:focus-within {
  border-color: var(--sbt-blue);
  box-shadow: 0 0 0 4px rgba(20,129,197,0.15);
}
.sbt-users-ctrl button {
  background: rgba(255,255,255,0.08); border: none; color: white;
  width: 44px; height: 46px; font-size: 20px; cursor: pointer;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; font-family: inherit;
}
.sbt-users-ctrl button:first-child { border-radius: 10px 0 0 10px; }
.sbt-users-ctrl button:last-child  { border-radius: 0 10px 10px 0; }
.sbt-users-ctrl button:hover { background: rgba(255,255,255,0.15); }
.sbt-users-ctrl input {
  border: none !important; box-shadow: none !important;
  background: transparent !important;
  text-align: center; flex: 1; min-width: 0;
  pointer-events: none;
}

/* Field errors */
.sbt-error { font-size:12px; color:#F87171; margin-top:4px; display:none; }
.sbt-has-error input:not([type="checkbox"]),
.sbt-has-error select { border-color: #F87171 !important; }
.sbt-has-error .sbt-error { display: block; }

.sbt-form-error {
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.3);
  border-radius: 10px; padding: 12px 14px;
  font-size: 14px; color: #F87171; margin-bottom: 14px; display: none;
}

/* Consent */
.sbt-consent {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 20px 0; padding: 16px;
  background: rgba(219,254,135,0.05);
  border: 1px solid rgba(219,254,135,0.15); border-radius: 12px;
}
.sbt-consent input[type="checkbox"] {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; min-width: 22px;
  border-radius: 6px; border: 2px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.06); cursor: pointer;
  padding: 0; margin-top: 1px; position: relative; flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.sbt-consent input[type="checkbox"]:checked {
  background: var(--sbt-blue); border-color: var(--sbt-blue);
}
.sbt-consent input[type="checkbox"]:checked::after {
  content: ''; position: absolute;
  left: 5px; top: 2px; width: 7px; height: 12px;
  border: 2.5px solid #fff; border-top: none; border-left: none;
  transform: rotate(45deg); display: block;
}
.sbt-consent label {
  font-size: 12.5px; color: var(--sbt-muted); line-height: 1.5; font-weight: 300;
}
.sbt-consent label a { color: var(--sbt-lime); text-decoration: none; }

/* Submit button */
.sbt-btn-submit {
  width: 100%; background: var(--sbt-blue); border: none; border-radius: 14px;
  padding: 17px 24px; font-family: 'Geologica', sans-serif;
  font-size: 17px; font-weight: 700; color: white; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  letter-spacing: 0.02em;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 8px 32px rgba(20,129,197,0.45);
  position: relative; overflow: hidden;
  white-space: normal !important; word-break: break-word !important; text-align: center;
}
@media (max-width: 500px) {
  .sbt-btn-submit { font-size: 14px !important; padding: 14px 16px; gap: 6px; }
  .sbt-spin-icon  { flex-shrink: 0; }
}
.sbt-btn-submit::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.sbt-btn-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(20,129,197,0.55); }
.sbt-btn-submit:hover::before { opacity: 1; }
.sbt-btn-submit:active { transform: translateY(0); }
.sbt-btn-submit:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.sbt-spin-icon { font-size: 22px; animation: sbt-spinIcon 2s linear infinite; }
@keyframes sbt-spinIcon { to { transform: rotate(360deg); } }

/* ── Wheel section ── */
.sbt-wheel-heading {
  font-size: clamp(28px, 6vw, 44px); font-weight: 900;
  line-height: 1.1; margin-bottom: 10px; color: var(--sbt-white);
  text-align: center;
}
.sbt-wheel-heading .name-hl { color: var(--sbt-lime); }
.sbt-wheel-sub {
  font-size: 16px; color: var(--sbt-muted); font-weight: 300;
  text-align: center; margin-bottom: 28px;
}
.sbt-wheel-wrap {
  position: relative; display: inline-block; margin-bottom: 32px;
  display: flex; justify-content: center;
}
.sbt-wheel-pointer {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  z-index: 10; font-size: 32px;
  filter: drop-shadow(0 4px 8px rgba(245,158,11,0.6));
  animation: sbt-bounce 1s ease-in-out infinite;
}
@keyframes sbt-bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-4px); }
}
#sbt-canvas {
  display: block; border-radius: 50%; max-width: 100%;
  box-shadow:
    0 0 0 6px rgba(255,255,255,0.08),
    0 0 0 12px rgba(20,129,197,0.2),
    0 20px 60px rgba(0,0,0,0.5),
    0 0 80px rgba(20,129,197,0.25);
}
.sbt-wheel-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 54px; height: 54px;
  background: linear-gradient(135deg, #0B132B, var(--sbt-blue));
  border-radius: 50%; border: 4px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  z-index: 5; pointer-events: none;
}
.sbt-btn-spin {
  background: var(--sbt-lime); border: none; border-radius: 16px;
  padding: 18px 48px; font-family: 'Geologica', sans-serif;
  font-size: 19px; font-weight: 700; color: var(--sbt-navy); cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 8px 32px rgba(219,254,135,0.35);
  letter-spacing: 0.03em;
  display: inline-flex; align-items: center; gap: 10px;
}
.sbt-btn-spin:hover    { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(219,254,135,0.45); }
.sbt-btn-spin:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.sbt-spin-center { text-align: center; margin-top: 8px; }

/* ── Result section ── */
.sbt-result-card {
  background: rgba(20,129,197,0.05);
  border: 1px solid rgba(20,129,197,0.3);
  border-radius: 20px; padding: 48px 36px;
  position: relative; overflow: hidden;
  transition: background 0.4s, border-color 0.4s;
  text-align: center;
}
.sbt-result-card::before {
  content: ''; position: absolute; inset: -50%;
  background: radial-gradient(ellipse 60% 40% at 50% 50%, rgba(20,129,197,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.sbt-result-card.bonus {
  border-color: rgba(219,254,135,0.35);
  background: rgba(219,254,135,0.04);
}
.sbt-result-icon {
  font-size: 80px; margin-bottom: 20px; display: block;
  animation: sbt-popIn 0.5s 0.2s cubic-bezier(0.175,0.885,0.32,1.275) both;
}
@keyframes sbt-popIn {
  from { transform: scale(0) rotate(-20deg); opacity: 0; }
  to   { transform: scale(1) rotate(0);      opacity: 1; }
}
.sbt-result-title {
  font-size: clamp(26px,5vw,38px); font-weight: 900;
  margin-bottom: 12px; color: var(--sbt-lime);
}
.sbt-result-tag {
  display: inline-block; background: var(--sbt-lime); color: var(--sbt-navy);
  font-weight: 700; font-size: 14px; padding: 8px 20px;
  border-radius: 100px; margin-bottom: 24px;
}
.sbt-result-msg {
  font-size: 16px; color: var(--sbt-muted); font-weight: 300;
  line-height: 1.7; max-width: 420px; margin: 0 auto 24px;
}
.sbt-result-info {
  background: rgba(20,129,197,0.1); border: 1px solid rgba(20,129,197,0.25);
  border-radius: 12px; padding: 16px 20px;
  font-size: 14px; font-weight: 300; color: var(--sbt-muted); line-height: 1.6;
}

/* ── Footer ── */
.sbt-footer {
  text-align: center; font-size: 12px;
  color: rgba(255,255,255,0.2); margin-top: 40px; line-height: 1.6;
}
.sbt-footer a { color: rgba(255,255,255,0.35); text-decoration: none; }

/* ── Animations ── */
@keyframes sbt-fadeDown {
  from { opacity:0; transform:translateY(-20px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes sbt-fadeUp {
  from { opacity:0; transform:translateY(30px); }
  to   { opacity:1; transform:translateY(0); }
}