/* CREST Guided Tour — Ball Tagging stage (Wagon Wheel + Ball Analysis) */

.bt-stage {
  width: 100%; height: 100%;
  background: radial-gradient(ellipse at top, #0c1019 0%, #060810 60%);
  padding: 22px 28px;
  overflow-y: auto;
  display: flex; flex-direction: column;
  gap: 16px;
  position: relative;
}

/* ── Banner ──────────────────────────────────────────────────────────── */
.bt-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px;
  background: linear-gradient(135deg, #0c1019 0%, #0a0e16 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 18px 22px;
  position: relative;
  overflow: hidden;
}
.bt-banner::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,0.55), transparent);
}
.bt-banner-left { flex: 1; min-width: 0; }
.bt-banner-eye {
  font: 700 10px var(--tw-body), sans-serif; letter-spacing: 0.20em;
  color: #F59E0B; margin-bottom: 4px;
}
.bt-banner-title {
  font: 300 22px var(--tw-body), sans-serif; letter-spacing: -0.3px;
  color: #fff; line-height: 1.15;
  margin-bottom: 4px;
}
.bt-banner-sub {
  font-size: 12.5px; color: #94A3B8; line-height: 1.5;
  max-width: 580px;
}
.bt-banner-sub b { color: #fff; font-weight: 700; }

.bt-banner-right {
  display: flex; flex-direction: column; align-items: stretch;
  gap: 10px; min-width: 260px;
}
.bt-banner-progress { display: flex; flex-direction: column; gap: 6px; }
.bt-banner-prog-row {
  display: flex; justify-content: space-between; gap: 12px;
  font: 800 10px var(--tw-body), sans-serif; letter-spacing: 0.14em;
  color: #6B7A92;
}
.bt-banner-prog-row .is-done { color: #22C55E; }
.bt-banner-prog-bar {
  height: 4px; background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden;
}
.bt-banner-prog-bar > div {
  height: 100%;
  background: linear-gradient(90deg, #3B82F6, #F59E0B);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.bt-banner-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font: 800 11px var(--tw-body), sans-serif; letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 0; cursor: pointer;
}
.bt-banner-cta.locked {
  background: rgba(255,255,255,0.03);
  color: #6B7A92;
  border: 1px dashed rgba(255,255,255,0.10);
  cursor: not-allowed;
}
.bt-banner-cta.gold {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #060810;
  box-shadow:
    0 0 0 1px rgba(245,158,11,0.40),
    0 12px 28px -10px rgba(245,158,11,0.65);
  animation: btCtaPulse 2.4s ease-in-out infinite;
}
@keyframes btCtaPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(245,158,11,0.40), 0 12px 28px -10px rgba(245,158,11,0.65); }
  50%      { box-shadow: 0 0 0 1px rgba(245,158,11,0.65), 0 16px 36px -10px rgba(245,158,11,0.80); }
}

/* ── Tabs ────────────────────────────────────────────────────────────── */
.bt-tabs { display: flex; gap: 10px; }
.bt-tab {
  flex: 1;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: #0a0e16;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  color: #6B7A92;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.bt-tab:hover { color: #fff; border-color: rgba(255,255,255,0.14); }
.bt-tab.is-active {
  background: linear-gradient(135deg, #112038 0%, #0a0e16 100%);
  border-color: rgba(59,130,246,0.45);
  color: #fff;
  box-shadow: 0 12px 28px -10px rgba(59,130,246,0.40);
}
.bt-tab.is-done {
  border-color: rgba(34,197,94,0.30);
}
.bt-tab.is-active.is-done {
  border-color: rgba(34,197,94,0.55);
  box-shadow: 0 12px 28px -10px rgba(34,197,94,0.40);
}
.bt-tab-num {
  font: 800 11px ui-monospace, monospace;
  color: #5C6B82;
  background: rgba(255,255,255,0.04);
  padding: 4px 8px; border-radius: 4px;
}
.bt-tab.is-active .bt-tab-num { color: #FCD34D; background: rgba(245,158,11,0.14); }
.bt-tab.is-done   .bt-tab-num { color: #22C55E; background: rgba(34,197,94,0.14); }
.bt-tab-name {
  font: 800 12px var(--tw-body), sans-serif; letter-spacing: 0.14em;
  flex: 1;
}
.bt-tab-tick {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 999px;
  background: #22C55E;
  color: #060810;
  font: 800 12px var(--tw-body), sans-serif;
  box-shadow: 0 0 12px rgba(34,197,94,0.40);
}

/* ── Card ─────────────────────────────────────────────────────────────── */
.bt-body { flex: 1; min-height: 0; }
.bt-card {
  background: #0a0e16;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.bt-card.is-confirmed { border-color: rgba(34,197,94,0.40); }

.bt-card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.bt-card-eye {
  font: 700 10px var(--tw-body), sans-serif; letter-spacing: 0.20em;
  color: #94A3B8;
  background: rgba(255,255,255,0.04);
  padding: 4px 10px; border-radius: 4px;
  text-transform: uppercase;
}
.bt-card-title {
  font: 300 18px var(--tw-body), sans-serif; letter-spacing: -0.3px;
  color: #fff;
  flex: 1;
}
.bt-card-title b { font-weight: 800; }
.bt-card-to { color: #5C6B82; font-weight: 500; margin: 0 4px; }
.bt-card-runs { color: #FCD34D; font-weight: 700; margin-left: 6px; }
.bt-card-saved {
  font: 800 10px var(--tw-body), sans-serif; letter-spacing: 0.16em;
  background: rgba(34,197,94,0.14); color: #22C55E;
  padding: 4px 10px; border-radius: 4px;
}

.bt-card-body {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  padding: 20px;
}
@media (max-width: 980px) {
  .bt-card-body { grid-template-columns: 1fr; }
}

/* ── Pitch container — wraps the asset image + the Grid/Zones toggles ── */
.bt-pitch-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}
/* ── Pitch + wagon visuals — the CREST V3 app's own assets ───────────── */
.bt-pitch-asset, .bt-wheel-asset {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #0c1019;
  border: 1px solid rgba(255,255,255,0.06);
  cursor: crosshair;
}
.bt-pitch-asset { aspect-ratio: 680 / 650; }
/* Square — field_wagon_wheel.jpg is 700×700. */
.bt-wheel-asset { aspect-ratio: 1 / 1; touch-action: none; }
.bt-pitch-asset img, .bt-wheel-asset img {
  display: block; width: 100%; height: 100%; object-fit: contain;
  user-select: none; -webkit-user-drag: none;
}
.bt-pitch-svg, .bt-wheel-svg { display: block; width: 100%; height: auto; }

/* Ball overlay — real cricket-ball PNG asset, repositioned on click */
.bt-pitch-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.bt-pitch-dot-halo {
  position: absolute; left: -10px; top: -10px;
  width: 20px !important; height: 20px !important; border-radius: 999px;
  background: radial-gradient(circle, rgba(252,211,77,0.55) 0%, rgba(252,211,77,0) 70%);
  animation: btPitchDot 1.6s ease-in-out infinite;
}
.bt-pitch-dot-ball {
  display: block;
  width: 14px !important; height: 14px !important;
  min-width: 14px; min-height: 14px;
  max-width: 14px; max-height: 14px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.65));
  user-select: none; -webkit-user-drag: none;
}
@keyframes btPitchDot {
  0%, 100% { transform: scale(1);   opacity: 0.9; }
  50%      { transform: scale(1.3); opacity: 0.45; }
}

/* Wagon overlay — sits over the wheel image with interactive sector paths */
.bt-wheel-overlay {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.bt-wheel-overlay path:hover {
  fill: rgba(245,158,11,0.18) !important;
  stroke: rgba(245,158,11,0.55) !important;
}
.bt-tickbox {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(15,23,42,0.85);
  border: 1px solid rgba(59,130,246,0.40);
  color: #fff;
  font: 700 10px var(--tw-body), sans-serif; letter-spacing: 0.10em;
  padding: 4px 8px; border-radius: 6px;
}
.bt-pitch-tags {
  position: absolute; top: 10px; right: 10px;
  display: flex; gap: 6px;
  z-index: 1;
}
.bt-pitch-hint {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  background: rgba(6, 8, 16, 0.78);
  border: 1px solid rgba(255,255,255,0.10);
  color: #CBD5E1;
  font-size: 11.5px;
  padding: 6px 12px; border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}
.bt-pitch-hint b { color: #FCD34D; font-weight: 700; }
.bt-tickbox input[type="checkbox"] {
  accent-color: #3B82F6;
  width: 12px; height: 12px;
  margin: 0;
}

/* ── Wagon wheel container ────────────────────────────────────────────── */
.bt-wheel-wrap {
  display: flex; flex-direction: column; gap: 10px;
}
.bt-wheel-svg {
  display: block; width: 100%; height: auto;
  border-radius: 10px;
  background: #0c1019;
  border: 1px solid rgba(255,255,255,0.06);
}
.bt-wheel-helper {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #CBD5E1;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
}
.bt-wheel-helper b { color: #FCD34D; }

/* ── Chip groups ──────────────────────────────────────────────────────── */
.bt-chips-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bt-field-row { display: flex; flex-direction: column; gap: 6px; }
.bt-field-lab {
  font: 700 10px var(--tw-body), sans-serif; letter-spacing: 0.18em;
  color: #94A3B8;
  display: flex; align-items: center; gap: 8px;
  text-transform: uppercase;
}
.bt-field-lab-note {
  font: 500 9px var(--tw-body), sans-serif; letter-spacing: 0.10em;
  color: #5C6B82;
  text-transform: none; margin-left: auto;
}
.bt-chip.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.bt-req {
  background: rgba(245,158,11,0.16); color: #F59E0B;
  font: 700 9px var(--tw-body), sans-serif; letter-spacing: 0.12em;
  padding: 2px 6px; border-radius: 3px;
  text-transform: lowercase;
}
.bt-chip-row {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.bt-chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: #CBD5E1;
  font: 600 12px var(--tw-body), sans-serif;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.bt-chip:hover { color: #fff; border-color: rgba(255,255,255,0.25); transform: translateY(-1px); }

.bt-chip.is-active.bt-chip-tone-gold {
  background: #3B82F6;
  border-color: #3B82F6;
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(59,130,246,0.55);
}
.bt-chip.is-active.bt-chip-tone-blue {
  background: #3B82F6;
  border-color: #3B82F6;
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(59,130,246,0.55);
}
.bt-chip.is-active.bt-chip-tone-neutral {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.30);
  color: #fff;
}
.bt-chip.bt-chip-tone-green {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.30);
  color: #4ADE80;
}
.bt-chip.bt-chip-tone-green.is-active {
  background: #22C55E; color: #060810; border-color: #22C55E;
}
.bt-chip.bt-chip-tone-red {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.30);
  color: #FCA5A5;
}
.bt-chip.bt-chip-tone-red.is-active {
  background: #EF4444; color: #fff; border-color: #EF4444;
}

/* ── Card foot / confirm ─────────────────────────────────────────────── */
.bt-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.bt-foot-status { font-size: 12px; color: #94A3B8; }
.bt-foot-status b { color: #fff; font-weight: 700; }
.bt-foot-incomplete { color: #F59E0B; font-weight: 600; }
.bt-confirm {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font: 800 11px var(--tw-body), sans-serif; letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer; border: 0;
  transition: all 0.15s ease;
}
.bt-confirm-blue {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: #fff;
  box-shadow: 0 12px 28px -10px rgba(59,130,246,0.55);
}
.bt-confirm-blue:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -10px rgba(59,130,246,0.70); }
.bt-confirm-gold {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #060810;
  box-shadow: 0 12px 28px -10px rgba(245,158,11,0.55);
}
.bt-confirm-gold:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -10px rgba(245,158,11,0.70); }
.bt-confirm.is-disabled { opacity: 0.40; cursor: not-allowed; box-shadow: none; }
.bt-confirm.is-confirmed {
  background: rgba(34,197,94,0.14) !important;
  color: #22C55E !important;
  box-shadow: 0 0 0 1px rgba(34,197,94,0.40) !important;
  cursor: default;
}

/* ── Foot ─────────────────────────────────────────────────────────────── */
.bt-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 4px;
}
.bt-foot-back, .bt-foot-skip {
  background: transparent; border: 1px solid rgba(255,255,255,0.10);
  color: #94A3B8;
  padding: 8px 14px; border-radius: 999px;
  font: 700 11px var(--tw-body), sans-serif; letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s ease;
}
.bt-foot-back:hover, .bt-foot-skip:hover { color: #fff; border-color: rgba(255,255,255,0.30); background: rgba(255,255,255,0.04); }
.bt-foot-skip { border-style: dashed; font-weight: 600; text-transform: none; letter-spacing: 0; }

/* ── Mobile portrait — stack the banner so the 260px right block can't crush
   the title, and tighten the stage/tabs. ─────────────────────────────────── */
@media (max-width: 720px) {
  .bt-stage { padding: 14px 12px; gap: 12px; }
  .bt-banner { flex-direction: column; align-items: stretch; gap: 14px; padding: 14px 16px; }
  .bt-banner-right { min-width: 0; }
  .bt-banner-title { font-size: 19px; }
  .bt-tabs { gap: 8px; }
  .bt-tab { padding: 11px 12px; }
  .bt-tab-name { font-size: 11px; letter-spacing: 0.08em; }
  .bt-card-body { padding: 14px; gap: 16px; }
  .bt-card-head { padding: 12px 14px; }
}

/* Mobile — bigger chip tap targets + let the pitch hint wrap. */
@media (max-width: 720px) {
  .bt-chip { padding: 9px 13px; min-height: 40px; }
  .bt-pitch-hint { white-space: normal; text-align: center; max-width: 92%; line-height: 1.35; }
}
