/* Bigg Boss 20 fan vote page (bigg-boss-20-voting.html). Builds on style.css + page.css. */

.bb-hero { padding-bottom: clamp(56px, 7vw, 96px); }

/* ---------- Leaderboard ---------- */
.bb-board-sec { padding: clamp(56px, 7vw, 100px) 0; }
.bb-board-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 26px; }
.bb-board-head .sp-h2 { margin: 0; }
.bb-live { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--ink); color: var(--cream); }
.bb-dot { width: 9px; height: 9px; border-radius: 50%; background: #8a8fa8; }
.bb-live.on .bb-dot { background: var(--lime); animation: bb-pulse 1.8s ease-out infinite; }
.bb-live.err .bb-dot { background: var(--orange); }
@keyframes bb-pulse { 0% { box-shadow: 0 0 0 0 rgba(200,255,94,.7); } 100% { box-shadow: 0 0 0 10px rgba(200,255,94,0); } }

.bb-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bb-row {
  display: grid; grid-template-columns: 40px 52px minmax(0, 1fr) minmax(0, 1.1fr) 86px; align-items: center; gap: 14px;
  padding: 10px 16px 10px 10px; border-radius: 20px; background: #fff; border: 1.5px solid rgba(11,16,48,.08);
  will-change: transform;
}
.bb-row.lead { background: var(--blue); color: var(--cream-2); border-color: var(--blue); }
.bb-rank {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-stretch: 100%; font-weight: 900; font-size: 17px; background: rgba(11,16,48,.07);
}
.bb-row:nth-child(1) .bb-rank { background: var(--orange); color: var(--ink); }
.bb-row:nth-child(2) .bb-rank { background: var(--sky); color: var(--ink); }
.bb-row:nth-child(3) .bb-rank { background: var(--lime); color: var(--ink); }
.bb-ava { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, var(--a, var(--orange)), var(--b, var(--blue))); flex: none; }
.bb-ava img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.bb-ava span { font-family: var(--display); font-stretch: 110%; font-weight: 900; font-size: 18px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.bb-who { min-width: 0; }
.bb-who b { display: block; font-family: var(--display); font-stretch: 100%; font-weight: 900; text-transform: uppercase; font-size: 17px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-who small { display: block; font-size: 13px; font-weight: 600; opacity: .6; margin-top: 2px; }
.bb-row.lead .bb-who small { opacity: .8; }
.bb-crown { margin-left: 6px; }
.bb-bar { height: 12px; border-radius: 99px; background: rgba(11,16,48,.08); overflow: hidden; }
.bb-row.lead .bb-bar { background: rgba(255,244,222,.2); }
.bb-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--blue); transition: width .8s var(--ease); }
.bb-row.lead .bb-bar i { background: var(--orange); }
.bb-num { text-align: right; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bb-num b { display: block; font-family: var(--display); font-stretch: 100%; font-weight: 900; font-size: 20px; }
.bb-num small { font-size: 13px; font-weight: 700; opacity: .8; }
.bb-row.bump .bb-num b { animation: bb-bump .6s var(--ease); }
@keyframes bb-bump { 30% { transform: scale(1.25); color: var(--orange); } }
.bb-row.skeleton { height: 74px; background: linear-gradient(90deg, #fff 30%, #f6ecd8 50%, #fff 70%) 0 0 / 300% 100%; animation: bb-shimmer 1.4s linear infinite; }
@keyframes bb-shimmer { to { background-position: -150% 0; } }
.bb-board-note { margin-top: 18px; font-size: 14px; opacity: .8; }

/* ---------- Contestant cards ---------- */
.bb-vote-sec .sp-h2 { margin-bottom: 14px; }
.bb-vote-sec .sp-lead { margin-bottom: 36px; }
.bb-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.bb-card { display: flex; flex-direction: column; border-radius: 28px; overflow: hidden; background: var(--cream-2); color: var(--ink); transition: transform .4s var(--ease); }
.bb-card:hover { transform: translateY(-4px) rotate(-.6deg); }
.bb-photo { position: relative; aspect-ratio: 4 / 5; background: #d9cdb3; overflow: hidden; }
.bb-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.bb-photo-none { display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.25), transparent 55%), linear-gradient(150deg, var(--a), var(--b)); }
.bb-initials { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(64px, 9vw, 104px); color: #fff; text-shadow: 0 4px 24px rgba(0,0,0,.3); letter-spacing: -.02em; }
.bb-tag, .bb-rank-chip {
  position: absolute; top: 12px; padding: 7px 12px; border-radius: 99px;
  font-family: var(--display); font-stretch: 80%; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .02em;
}
.bb-tag { right: 12px; background: var(--lime); color: var(--ink); }
.bb-rank-chip { left: 12px; background: var(--ink); color: var(--cream); }
.bb-rank-chip.top { background: var(--orange); color: var(--ink); }
.bb-card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.bb-name { font-family: var(--display); font-stretch: 110%; font-weight: 900; text-transform: uppercase; font-size: 22px; line-height: 1; color: var(--blue); }
.bb-role { opacity: .6; }
.bb-card-votes { font-size: 15px; margin: 4px 0 12px; font-variant-numeric: tabular-nums; }
.bb-card-votes b { font-weight: 800; }
.bb-vote-btn { margin-top: auto; }
.bb-vote-btn:disabled { opacity: .5; cursor: progress; transform: none; }
.bb-noscript { margin-top: 20px; font-weight: 700; }

.bb-fine .sp-legal h3 { font-family: var(--display); font-stretch: 115%; font-weight: 900; text-transform: uppercase; font-size: clamp(19px, 2vw, 24px); line-height: 1; color: var(--blue); margin: 36px 0 10px; }
.bb-fine .sp-legal h3:first-child { margin-top: 0; }
.bb-credits { font-size: 14px; }

/* ---------- Vote dialog ---------- */
.bb-dialog {
  width: min(440px, calc(100vw - 32px)); padding: 28px; border: 0; border-radius: 30px;
  background: var(--cream-2); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,.55);
}
.bb-dialog::backdrop { background: rgba(11,16,48,.6); backdrop-filter: blur(3px); }
.bb-dialog[open] { animation: bb-pop .35s var(--ease); }
@keyframes bb-pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.bb-dlg-close-form { position: absolute; top: 14px; right: 14px; margin: 0; }
.bb-dlg-x { width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(11,16,48,.07); font-size: 22px; line-height: 1; cursor: pointer; }
.bb-dlg-x:hover { background: var(--orange); }
.bb-dlg-who { display: flex; align-items: center; gap: 16px; margin: 0 40px 24px 0; }
.bb-ava-lg { width: 72px; height: 72px; }
.bb-ava-lg span { font-size: 24px; }
.bb-dlg-kicker { opacity: .55; }
.bb-dlg-title { font-family: var(--display); font-stretch: 110%; font-weight: 900; text-transform: uppercase; font-size: 26px; line-height: 1; color: var(--blue); margin-top: 4px; }
.bb-form { display: grid; gap: 10px; }
.bb-label { font-weight: 800; font-size: 15px; }
.bb-phone-field { display: flex; align-items: stretch; border: 2px solid rgba(11,16,48,.2); border-radius: 18px; background: #fff; overflow: hidden; transition: border-color .2s; }
.bb-phone-field:focus-within { border-color: var(--blue); }
.bb-phone-field.bad { border-color: var(--orange); }
.bb-cc { display: grid; place-items: center; padding: 0 14px; font-weight: 800; background: rgba(11,16,48,.05); border-right: 2px solid rgba(11,16,48,.1); }
.bb-phone-field input { flex: 1; min-width: 0; border: 0; padding: 16px 14px; font: inherit; font-size: 20px; font-weight: 700; letter-spacing: .04em; color: var(--ink); background: transparent; outline: none; font-variant-numeric: tabular-nums; }
.bb-msg { min-height: 22px; font-size: 14px; font-weight: 700; }
.bb-msg.bad { color: #c23a12; }
.bb-msg.info { color: var(--blue); }
.bb-form .chip:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.bb-consent { font-size: 13px; opacity: .6; text-align: center; }
.bb-done { display: grid; gap: 14px; text-align: center; }
.bb-done-big { font-family: var(--display); font-stretch: 115%; font-weight: 900; text-transform: uppercase; font-size: 30px; color: var(--blue); }

@media (max-width: 720px) {
  .bb-row { grid-template-columns: 34px 44px minmax(0, 1fr) auto; grid-template-areas: "rank ava who num" "rank ava bar bar"; gap: 6px 12px; padding: 10px 14px 12px 10px; }
  .bb-rank { grid-area: rank; width: 34px; height: 34px; font-size: 15px; }
  .bb-row > .bb-ava { grid-area: ava; width: 44px; height: 44px; }
  .bb-who { grid-area: who; }
  .bb-who b { white-space: normal; font-size: 16px; }
  .bb-bar { grid-area: bar; height: 8px; }
  .bb-num { grid-area: num; }
  .bb-num b { font-size: 18px; }
  .bb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bb-card { border-radius: 22px; }
  .bb-card-body { padding: 14px 12px 14px; }
  .bb-name { font-size: 17px; }
  .bb-role { font-size: 11px; }
  .bb-dialog { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .bb-row, .bb-bar i, .bb-card, .bb-dialog[open] { transition: none; animation: none; }
  .bb-live.on .bb-dot, .bb-row.bump .bb-num b, .bb-row.skeleton { animation: none; }
}
