/* ===== dropsept live poll — shared styles =====
   Palette pulled directly from the live dropsept.co.il site:
   white content, navy text, electric-blue brand, crimson-pink accent,
   dark-navy header/footer chrome. Swap nothing unless the brand book differs. */

/* ============================================================
   BRAND TOKENS — exact values from dropsept.co.il
   ============================================================ */
:root{
  --brand:#0626FA;        /* DROPSEPT electric blue (primary) */
  --brand-deep:#041FCB;   /* darker blue — hover / active */
  --brand-soft:#E7EAFE;   /* tinted blue surface */
  --accent:#C50751;       /* crimson-pink (logo droplet) */
  --accent-soft:#FBE6EE;  /* tinted pink surface */

  --navy:#091723;         /* dark chrome — header / footer */
  --navy-2:#0E2747;       /* secondary navy */
  --navy-3:#194674;       /* navy-blue headings / links */

  /* surfaces */
  --bg:#F4F7FC;           /* page background — soft off-white */
  --bg-2:#EEF2FB;         /* inset fields / subtle panels */
  --surface:#FFFFFF;      /* cards */
  --panel:#FFFFFF;        /* alias kept for markup compatibility */
  --panel-2:#EEF2FB;      /* secondary buttons / chips */
  --line:#DCE4F0;         /* borders */

  /* text */
  --text:#0E2747;         /* navy — exact site body text */
  --muted:#5E748C;        /* secondary text */
  --brand-ink:#FFFFFF;    /* text on brand fill */
  --live:#12A150;         /* live / success green */
  --danger:#D64545;       /* destructive */

  --radius:18px;
  --shadow:0 16px 44px rgba(9,23,35,.12);
  --shadow-sm:0 4px 16px rgba(9,23,35,.08);

  /* answer option palette (A..H) — anchored on brand, all carry WHITE text */
  --c1:#0626FA; --c2:#C50751; --c3:#194674; --c4:#0E9AA0;
  --c5:#6B3FD6; --c6:#E0791A; --c7:#2E8B49; --c8:#1F6FB2;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  direction:rtl;
  font-family:"Open Sans","Open Sans Hebrew",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  line-height:1.55;
}
.display{font-weight:800;letter-spacing:.005em}

a{color:var(--brand);text-decoration:none}
button{font-family:inherit}

.wrap{max-width:1100px;margin:0 auto;padding:24px}
.wrap-narrow{max-width:560px;margin:0 auto;padding:20px}

/* ---------- header (minimal, no logo) — just holds status badges ---------- */
.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;
  margin-bottom:22px;flex-wrap:wrap;min-height:8px}

/* ---------- cards ---------- */
.panel{background:var(--surface);
  border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-sm)}
.pad{padding:22px}
.stack{display:flex;flex-direction:column;gap:14px}
.row{display:flex;gap:12px;align-items:center}
/* NOTE: elements use class="row wrap" where "wrap" means flex-wrap. That name
   collides with the page container ".wrap" (margin:0 auto; max-width; padding),
   which would wrongly center/clamp these rows. Reset that bleed here. */
.row.wrap{flex-wrap:wrap;max-width:none;margin:0;padding:0}
.spread{justify-content:space-between}
.grow{flex:1}

/* ---------- buttons ---------- */
.btn{appearance:none;border:1px solid var(--line);background:var(--panel-2);color:var(--text);
  padding:13px 18px;border-radius:13px;font-size:16px;font-weight:600;cursor:pointer;
  transition:transform .08s ease,filter .15s ease,background .15s ease,box-shadow .15s ease;
  display:inline-flex;align-items:center;gap:9px;justify-content:center}
.btn:hover{background:#E4EAF6}
.btn:active{transform:translateY(1px)}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn-primary{background:var(--brand);color:var(--brand-ink);border-color:transparent;
  box-shadow:0 8px 22px rgba(6,38,250,.28)}
.btn-primary:hover{background:var(--brand-deep)}
.btn-live{background:var(--live);color:#fff;border-color:transparent;
  box-shadow:0 8px 20px rgba(18,161,80,.22)}
.btn-live:hover{filter:brightness(1.05)}
.btn-danger{background:#fff;color:var(--danger);border-color:rgba(214,69,69,.4)}
.btn-danger:hover{background:#FCEDED}
.btn-ghost{background:transparent;border-color:var(--line)}
.btn-ghost:hover{background:var(--bg-2)}
.btn-sm{padding:9px 13px;font-size:14px;border-radius:11px}
.btn-block{width:100%}

/* ---------- inputs ---------- */
label.field{display:block;font-size:13px;color:var(--muted);margin-bottom:6px;font-weight:600}
input[type=text],textarea{
  width:100%;background:var(--bg-2);border:1px solid var(--line);color:var(--text);
  padding:12px 14px;border-radius:12px;font-size:16px;font-family:inherit}
input::placeholder,textarea::placeholder{color:#9DB0C0}
input:focus,textarea:focus{outline:none;border-color:var(--brand);background:#fff;
  box-shadow:0 0 0 3px rgba(6,38,250,.16)}
textarea{resize:vertical;min-height:48px}

/* ---------- badges ---------- */
.badge{display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:600;
  padding:6px 12px;border-radius:999px;background:var(--panel-2);border:1px solid var(--line);color:var(--muted)}
.badge.live{color:var(--live);border-color:rgba(18,161,80,.35);background:rgba(18,161,80,.08)}
.badge .pulse{width:9px;height:9px;border-radius:50%;background:var(--live);
  animation:pulse 1.4s ease-out infinite}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(18,161,80,.55)}70%{box-shadow:0 0 0 9px rgba(18,161,80,0)}100%{box-shadow:0 0 0 0 rgba(18,161,80,0)}}

/* ---------- code display ---------- */
.code-big{font-weight:800;font-size:clamp(34px,7vw,60px);letter-spacing:.16em;
  color:var(--brand);background:var(--brand-soft);border:1px dashed rgba(6,38,250,.4);border-radius:14px;
  padding:10px 22px;display:inline-block}

/* ---------- question text ---------- */
.qtext{font-weight:800;font-size:clamp(22px,3.4vw,40px);line-height:1.2;margin:0;color:var(--text)}
.qmeta{color:var(--muted);font-size:14px;font-weight:600}

/* ---------- answer options (player) ---------- */
.opts{display:grid;gap:12px}
.opt{appearance:none;border:none;cursor:pointer;color:#fff;font-weight:700;font-size:18px;
  text-align:right;padding:18px 18px;border-radius:15px;background:var(--c);
  display:flex;align-items:center;gap:14px;transition:transform .08s ease,filter .15s ease,box-shadow .15s ease;
  box-shadow:0 8px 20px rgba(9,23,35,.18)}
.opt:hover{filter:brightness(1.07)}
.opt:active{transform:scale(.985)}
.opt[disabled]{opacity:.55;cursor:default}
.opt.chosen{outline:4px solid var(--text);outline-offset:2px;box-shadow:0 10px 26px rgba(9,23,35,.3)}
.opt .tag{width:34px;height:34px;flex:none;border-radius:9px;background:rgba(255,255,255,.24);
  display:grid;place-items:center;font-weight:800;font-size:18px;color:#fff}

/* ---------- result bars ----------
   Readability: the LABEL + count sit on the white card (navy text, always
   legible), and the colored proportion bar sits beneath them — no text is
   ever overlaid on a colored fill. Works on mobile and on the projection. */
.bars{display:flex;flex-direction:column;gap:12px}
.bar{display:flex;flex-direction:column-reverse;gap:10px;position:relative;
  background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:13px 16px}
/* light track behind the colored fill, so short bars are still comparable */
.bar::before{content:"";display:block;position:absolute;z-index:0;
  inset:auto 16px 13px 16px;height:var(--barh,18px);background:var(--bg-2);border-radius:999px}
.bar-fill{position:relative;z-index:1;height:var(--barh,18px);width:0;background:var(--c);
  border-radius:999px;min-width:8px;
  transition:width .7s cubic-bezier(.22,1,.36,1)}
.bar-row{position:static;display:flex;align-items:center;justify-content:space-between;
  gap:12px;padding:0;color:var(--text)}
.bar-label{flex:1;min-width:0;display:flex;align-items:center;gap:11px;
  font-weight:700;font-size:17px;color:var(--text)}
.bar-label .tag{width:30px;height:30px;flex:none;border-radius:8px;display:grid;place-items:center;
  font-weight:800;color:#fff}
.bar-val{font-weight:800;font-size:20px;color:var(--text)}
.bar-pct{color:var(--muted);font-size:14px;margin-inline-start:8px;font-weight:600}

/* ---------- countdown ring ---------- */
.ring{position:relative;width:120px;height:120px;flex:none}
.ring svg{transform:rotate(-90deg)}
.ring .track{stroke:var(--line)}
.ring .prog{stroke:var(--brand);stroke-linecap:round;transition:stroke-dashoffset 1s linear}
.ring .num{position:absolute;inset:0;display:grid;place-items:center;
  font-weight:800;font-size:42px;color:var(--text)}

/* ---------- misc ---------- */
.center{text-align:center}
.muted{color:var(--muted)}
.hr{height:1px;background:var(--line);border:0;margin:18px 0}
.hide{display:none!important}
.qr-card{background:#fff;border-radius:16px;padding:14px;display:inline-block;
  border:1px solid var(--line);box-shadow:var(--shadow-sm)}
.qr-card img{display:block;width:260px;height:260px;border-radius:8px}
.big-num{font-weight:800;font-size:clamp(40px,9vw,90px);line-height:1;color:var(--text)}
.dots{display:flex;gap:6px;justify-content:center}
.dots i{width:9px;height:9px;border-radius:50%;background:var(--brand);opacity:.5;animation:blink 1.2s infinite}
.dots i:nth-child(2){animation-delay:.2s}.dots i:nth-child(3){animation-delay:.4s}
@keyframes blink{0%,100%{opacity:.25}50%{opacity:1}}

/* ---------- guide boxes ---------- */
.guide-box{border-right:4px solid var(--brand);
  background:linear-gradient(135deg,var(--brand-soft),transparent 70%)}
.guide-header{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.guide-step-badge{background:var(--brand);color:var(--brand-ink);font-size:12px;font-weight:700;
  padding:4px 11px;border-radius:999px;white-space:nowrap}
.guide-title{font-weight:700;font-size:17px}
.guide-desc{margin:0;color:var(--muted);font-size:15px;line-height:1.6}
.guide-next{font-size:14px;color:var(--muted);padding:8px 12px;background:rgba(6,38,250,.05);
  border-radius:10px;border:1px solid var(--line)}
.guide-next strong{color:var(--text)}
.guide-inline{font-size:14px;color:var(--muted);padding:9px 13px;background:var(--brand-soft);
  border-radius:10px;border:1px solid rgba(6,38,250,.22);margin-bottom:4px;line-height:1.5}
.guide-inline-label{display:inline-block;background:var(--brand);color:var(--brand-ink);
  font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;margin-left:8px;vertical-align:middle}
.guide-steps{display:flex;gap:8px;flex-wrap:wrap}
.gs{font-size:13px;padding:5px 13px;border-radius:999px;border:1px solid var(--line);
  color:var(--muted);background:#fff;white-space:nowrap}
.gs.active{background:var(--brand);color:var(--brand-ink);border-color:transparent;font-weight:700}
.gs.done{color:var(--live);border-color:rgba(18,161,80,.3);text-decoration:line-through;opacity:.75}

/* ---------- medical answer markers ----------
   Replace the A/B/C letter tags with eye-care / antiseptic themed icons.
   Pure CSS: the letter stays in the DOM (untouched by JS) but is hidden,
   and a white line-icon is drawn via ::after. Applies to both the player's
   option buttons and the result bars, keyed by position so they always match. */
.opt .tag,.bar-label .tag{color:transparent;font-size:0;position:relative}
.opt .tag{background:rgba(0,0,0,.18)}
.opt .tag::after,.bar-label .tag::after{content:"";position:absolute;inset:0;
  background-position:center;background-repeat:no-repeat;background-size:58%}
.opt:nth-child(1) .tag::after,.bar:nth-child(1) .tag::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3c3 4 5 6.5 5 9a5 5 0 0 1-10 0c0-2.5 2-5 5-9z'/%3E%3C/svg%3E")}
.opt:nth-child(2) .tag::after,.bar:nth-child(2) .tag::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E")}
.opt:nth-child(3) .tag::after,.bar:nth-child(3) .tag::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")}
.opt:nth-child(4) .tag::after,.bar:nth-child(4) .tag::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5c0 4.5-3 7.5-7 9-4-1.5-7-4.5-7-9V6z'/%3E%3C/svg%3E")}
.opt:nth-child(5) .tag::after,.bar:nth-child(5) .tag::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h4l2-5 4 10 2-5h6'/%3E%3C/svg%3E")}
.opt:nth-child(6) .tag::after,.bar:nth-child(6) .tag::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='9' width='18' height='6' rx='3'/%3E%3Cpath d='M12 9v6'/%3E%3C/svg%3E")}
.opt:nth-child(7) .tag::after,.bar:nth-child(7) .tag::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3h6M10 3v6l-4.5 9a2.5 2.5 0 0 0 2.3 3.6h8.4a2.5 2.5 0 0 0 2.3-3.6L14 9V3'/%3E%3C/svg%3E")}
.opt:nth-child(8) .tag::after,.bar:nth-child(8) .tag::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4a2 2 0 0 1 2 2v8a4 4 0 1 1-4 0V6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E")}

/* ---------- lobby / end celebratory motion (CSS only) ---------- */
@keyframes pop{0%{transform:scale(.6);opacity:0}60%{transform:scale(1.12)}100%{transform:scale(1);opacity:1}}
@keyframes floaty{0%,100%{transform:translateY(0)}50%{transform:translateY(-9px)}}
#lobbyBox .big-num,#waiting .big-num{animation:floaty 2.4s ease-in-out infinite}
#endBox .big-num{animation:pop .6s cubic-bezier(.22,1,.36,1) both}

@media (prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important}
}

@media (max-width:640px){
  .wrap{padding:16px}
  .qr-card img{width:200px;height:200px}
}
