/* Voting page, ported from docs/dancing-with-the-stars-vote4.html. */
*{box-sizing:border-box}html,body{margin:0}body{padding-top:env(safe-area-inset-top,0px)}[hidden]{display:none!important}img{max-width:100%}

/* Brand fonts. Helvetica Neue Medium is the only Latin weight supplied, so every Latin weight maps to it (no fake bold). */
@font-face { font-family: "DWTS Latin"; src: url("/assets/media/fonts/dwts-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "DWTS Arabic"; src: url("/assets/media/fonts/dwts-arabic-regular.woff2") format("woff2"); font-weight: 100 549; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "DWTS Arabic"; src: url("/assets/media/fonts/dwts-arabic-bold.woff2") format("woff2"); font-weight: 550 900; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }

/* Layout: one phone-width column on the branded black ground — logo, 3-up star grid, sticky gold submit bar. Single dark look by design. */
:root {
  --ink: #0a070a;
  --ink-2: #140f12;
  --gold: #c9a15a;
  --gold-hi: #f2d38f;
  --text: #f4ede2;
  --muted: #a89a86;
  --f-latin: "DWTS Latin", "DWTS Arabic", "Helvetica Neue", Arial, sans-serif;
  --f-arabic: "DWTS Arabic", "DWTS Latin", "Geeza Pro", Tahoma, sans-serif;
  color-scheme: dark;
}
html, body { min-height: 100%; }
body {
  background: var(--ink) url("/assets/media/background.jpg") top center / 100% auto no-repeat fixed;
  color: var(--text);
  font-family: var(--f-latin);
  -webkit-tap-highlight-color: transparent;
}
.app {
  max-width: 560px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 28px 140px;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.logo { width: min(86%, 380px); height: auto; display: block; }

.grid {
  list-style: none; margin: 0; padding: 0; width: 100%;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 3vw, 16px);
}
.star {
  appearance: none; border: 0; background: none; padding: 0; margin: 0;
  width: 100%; display: block; position: relative; cursor: pointer;
  border-radius: 9px;
  transition: transform .22s ease, filter .22s ease, opacity .22s ease;
}
.star img { width: 100%; height: auto; display: block; border-radius: 9px; }
.star:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.grid.has-pick .star:not(.on) { opacity: .45; filter: grayscale(.5); }
.star.on {
  transform: scale(1.05);
  filter: drop-shadow(0 0 2px var(--gold-hi)) drop-shadow(0 0 14px rgba(242, 211, 143, .65));
  z-index: 1;
}
.check {
  position: absolute; top: -7px; right: -7px;
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold));
  color: var(--ink); display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.6);
  transform: scale(0); transition: transform .2s ease;
}
.check svg { width: 15px; height: 15px; }
.star.on .check { transform: scale(1); }

/* Not selectable right now (voting not open, already voted, sending). */
.star[aria-disabled="true"] { cursor: default; }
/* Can't receive votes this round (taken out by the producers, or outside the Danger Zone): grayed out, whatever else is going on. */
.star.off, .grid.has-pick .star.off:not(.on) { opacity: .3; filter: grayscale(1) brightness(.75); cursor: not-allowed; }

/* Danger Zone: the round's 2 or 3 nominated stars, first and highlighted; everyone else stays below, grayed out. */
.zone {
  width: 100%;
  border: 1px solid rgba(229, 88, 75, .75); border-radius: 16px;
  background: radial-gradient(120% 70% at 50% 0%, rgba(150, 26, 30, .45), transparent 70%), rgba(20, 15, 18, .9);
  box-shadow: 0 0 30px rgba(229, 88, 75, .22);
  padding: 14px 8px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  animation: rise .35s ease both;
}
.zone-title { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.2; }
.zone-en { font-size: 17px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #ff9d8f; }
.zone-ar { font-family: var(--f-arabic); font-size: 18px; font-weight: 700; color: var(--text); }
.zone-sub { margin: 0; text-align: center; font-size: 12px; letter-spacing: .03em; color: var(--muted); }
.zone-sub span { font-family: var(--f-arabic); font-size: 13px; }
.zone .grid { gap: 10px; margin-top: 6px; }
.zone .grid.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 74%; }
.zone .star:not(.off) img { box-shadow: 0 0 0 1px rgba(229, 88, 75, .6), 0 6px 18px rgba(0, 0, 0, .55); }

.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: 16px;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--ink) 55%, rgba(10,7,10,0));
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hint { font-size: 12px; letter-spacing: .04em; color: var(--muted); text-align: center; min-height: 1.3em; }
.hint b { color: var(--gold-hi); font-weight: 600; }
.submit {
  appearance: none; border: 0; background: none; padding: 0; cursor: pointer;
  width: min(49.1%, 189px); border-radius: 14px;
  padding-block: 8px; /* keeps the tap area at least 44px tall on small phones */
  transition: transform .15s ease, opacity .2s ease, filter .2s ease;
}
.submit img { width: 100%; height: auto; display: block; }
.submit:disabled { opacity: .35; filter: grayscale(.6); cursor: not-allowed; }
.submit:not(:disabled):active { transform: scale(.97); }
.submit:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 4px; }
.submit.busy { opacity: .6; pointer-events: none; }

/* Turnstile shows itself only when a visitor must interact (300x65). */
.ts-slot { display: flex; justify-content: center; max-width: 100%; }
.ts-slot.active { padding-bottom: 2px; }

/* Voting status under the logo: not open yet, paused, closed, countdowns. */
.status {
  width: 100%; text-align: center;
  border: 1px solid rgba(201,161,90,.45); border-radius: 14px;
  background: rgba(20, 15, 18, .85);
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 4px;
  animation: rise .35s ease both;
}
.status p { margin: 0; }
.status .en { font-size: 16px; font-weight: 600; letter-spacing: .02em; color: var(--gold-hi); text-wrap: balance; }
.status .en b { font-variant-numeric: tabular-nums; }
.status .ar { font-family: var(--f-arabic); font-size: 17px; line-height: 1.5; color: var(--text); }
.status .sub { font-size: 12px; letter-spacing: .03em; color: var(--muted); }
.status .sub span { font-family: var(--f-arabic); font-size: 13px; }

.noscript { margin: 0; text-align: center; color: var(--gold-hi); font-size: 14px; }

.overlay {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(5, 3, 5, .86); backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.msg:focus { outline: none; } /* the box takes focus so screen readers announce it; no ring needed on the box */
.msg {
  width: min(100%, 360px); text-align: center;
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  border: 1px solid var(--gold); border-radius: 18px;
  padding: 28px 22px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  box-shadow: 0 0 40px rgba(201, 161, 90, .25);
  animation: rise .35s ease both;
}
.msg img.pick { width: 112px; height: auto; border-radius: 8px; }
.msg h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: .02em; text-wrap: balance; color: var(--gold-hi); }
.msg p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text); }
.msg .ar { font-family: var(--f-arabic); font-size: 17px; line-height: 1.6; }
.msg .thanks { font-size: min(14px, 3.9vw); }
.msg .line1 { white-space: nowrap; }
.msg .thanks b { color: var(--gold-hi); font-weight: inherit; }
.rule { width: 56px; height: 2px; background: var(--gold); border: 0; margin: 2px 0; }
.ghost {
  appearance: none; background: none; cursor: pointer;
  border: 1px solid var(--gold); color: var(--gold-hi);
  font: 600 14px/1 var(--f-latin); letter-spacing: .02em;
  padding: 11px 18px; border-radius: 999px;
}
.ghost:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.err, .msg h2.err { color: #f0a08a; }

@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
