/* ============= Global 1 ================== */
.points-overlay {
  white-space: nowrap;
}

.sb-panel {
  position: fixed;
  right: 30px;
  top: 20px;
  z-index: var(--z-panel);
  display: inline-flex;
  gap: 8px;
  padding: 12px;
  border-radius: var(--panel-radius);
  background: rgba(5, 5, 15, 0.75);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.65);
  overflow: hidden;       /* clip the internal blur */
  isolation: isolate;     /* keep its own stacking context */
  cursor: grab;
}

.sb-panel::before {
  content: '';
  position: absolute;
  inset: -25%;            /* extend beyond edges for softer blur */
  z-index: -1;
  border-radius: inherit;

  /* "fake glass" texture – you can tweak */
  background:
    radial-gradient(circle at 0% 0%,   rgba(255,255,255,0.25), transparent 45%),
    radial-gradient(circle at 100% 0%, rgba(255,255,255,0.15), transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(0,0,0,0.55),       transparent 35%);
  
  filter: blur(54px);     /* ⬅ blur only THIS layer, not the video */
  opacity: 0.7;
}

.sb-panel:active {
  cursor: grabbing;
}

/* buttons & icons stay as you had */
.sb-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 2px;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.sb-panel button .sb-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.sb-panel[data-visible="0"] { display: none; }

.sb-panel .is-auto { background: rgba(255,255,255,.15); }

.sb-panel [data-act][data-on="1"]:not([data-act="fullscreen"]),
.sb-panel [data-act].is-on:not([data-act="fullscreen"]),
.sb-panel [data-act][aria-pressed="true"]:not([data-act="fullscreen"]) {
  transform: translateY(1px);
  filter: brightness(0.6);
  /*outline: 2px solid var(--accent, #00b3ff);*/
}

.sb-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
}

.sb-panel button .sb-icon {
  width: 20px;
  height: 20px;
  display: block;
}

#backgroundVideo,
.bg-video {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  min-height: 100%;
  object-fit: cover;
  pointer-events: none;   /* no clicks, no UI */
}

/* Use small-viewport height if available (iOS safe area) */
@supports (height: 100svh) {
  #backgroundVideo,
  .bg-video { height: 100svh; }
}

.row-wrap.frog-up   { transform: scale(1.06); opacity: 1; z-index: 500;    /* transition: transform 1s ease, opacity 1s ease; */ }
.row-wrap.frog-down { transform: scale(0.94); opacity: 0.70; /* transition: transform 1s ease, opacity 1s ease; */ }

/* ---------- RESPONSIVE POLISH ----------
   Keeps layout logic intact; adjusts typography & rail width on smaller canvases. */
@media (max-width: 1440px){
  :root{
    --sb-width:           1200px;
    --sb-width-collapsed: 920px;
    --onecol-content-w:   920px;
    --onecol-stack-w:     435px;
  }
}

@media (max-width: 1280px){
  :root{
    --base-font-size:   13.5px;
    --status-font-size: 26px;
    --onecol-stack-w:   420px;
  }
}

@media (max-width: 1180px){
  /* If you ever want the code/name swap automatically purely via CSS: 
     you can rely on JS (already implemented), but here’s a safe fallback */
  .country-name { display:none; }
  .country-code { display:block; }
}

/* Slightly tighter */
@media (max-width: 1440px){
  :root{
    --col-left-w:   435px;
    --col-right-w:  435px;
    --col-info-w:   280px;

    /* unified stack rail can slim a bit too */
    --onecol-stack-w: 435px;
  }
}

/* Ultra tight (still two columns, just denser) */
@media (max-width: 1000px){
  :root{
    --sb-width: 95%;
    --sb-width-collapsed: 95%;
    --col-left-w:   49%;
    --col-right-w:  49%;
    --col-info-w:   220px;
    --onecol-content-w: 95%;
    --onecol-stack-w: 49%;
    --current-points-right:40px;
  }
}

/* ============= Global 2 ================== */
/* Audio drawer (hidden by default) */
#sb-panel .sb-audio{
  display: none;
  border-top: 1px solid rgba(255,255,255,.15);
  width: 100%;
  box-sizing: border-box;
}

#sb-panel.audio-open .sb-audio{
  display: block;
}

/* Expand the panel when audio is open */
#sb-panel.audio-open{
  width: 272px;   /* adjust to taste */
}

/* Layout */
#sb-panel .sb-audio-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0;
}

#sb-panel .sb-audio-label{
  font-size: 12px;
  opacity: .9;
  white-space: nowrap;
}

#sb-panel .sb-audio-ctl{
  display: flex;
  align-items: center;
  gap: 8px;
}

#sb-panel .sb-audio-ctl input[type="range"]{
  width: 100px;
}

#sb-panel .sb-audio-val{
  font-size: 12px;
  min-width: 38px;
  text-align: right;
  opacity: .85;
}


/* --- Collapsed header: progress bar + counter (40px) --- */
/*
#grid > .voting-status.status-bar{
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 2px;
  padding: 6px 12px;
  line-height: 1;
}

#grid > .voting-status.status-bar .vs-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

#grid > .voting-status.status-bar .vs-name{
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#grid > .voting-status.status-bar .vs-count{
  font-size: 12px;
  font-weight: 700;
  opacity: .95;
  white-space: nowrap;
}

#grid > .voting-status.status-bar .vs-bar{
  height: 4px;
  width: 100%;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  overflow: hidden;
}

#grid > .voting-status.status-bar .vs-bar > i{
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: rgba(255,255,255,.85);
}
*/
/* --- Non-collapsed: side column (300×170) --- *//*
.voting-status.info-side{
  display:flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  padding: 16px 18px;
}

.voting-status.info-side .vs-top{
  display:flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.voting-status.info-side .vs-name{
  font-size: 28px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voting-status.info-side .vs-count{
  font-size: 16px;
  font-weight: 700;
  opacity: .95;
}

.voting-status.info-side .vs-bar{
  height: 10px;
  width: 100%;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  overflow: hidden;
}

.voting-status.info-side .vs-bar > i{
  display:block;
  height:100%;
  width:0%;
  border-radius: inherit;
  background: rgba(255,255,255,.85);
} */

/* =========================
   Voting progress UI (open + collapsed)
   ========================= */

/* Base (works in both places) */
.voting-status .vs-bar{
  width: 100%;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  overflow: hidden;
}
.voting-status .vs-bar > i{
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: rgba(255,255,255,.85);
}

/* Collapsed top bar (40px) */
#grid > .voting-status.status-bar{
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 2px;
  padding: 6px 12px;
  line-height: 1;
}
#grid > .voting-status.status-bar .vs-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}
#grid > .voting-status.status-bar .vs-name{
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#grid > .voting-status.status-bar .vs-count{
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  opacity: .95;
}
#grid > .voting-status.status-bar .vs-bar{ height: 4px; }

/* Open side column (300×170) */
#col-info .voting-status.info-side{
  display:flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  padding: 16px 18px;
}
#col-info .voting-status.info-side .vs-top{
  display:flex;
  flex-direction: column;
  gap: 6px;
  min-width:0;
}
#col-info .voting-status.info-side .vs-name{
  font-size: 26px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#col-info .voting-status.info-side .vs-count{
  font-size: 16px;
  font-weight: 700;
  opacity: .95;
}
#col-info .voting-status.info-side .vs-bar{ height: 10px; }


/* =========== Global 3 =========== */

.jury-voting-intro{
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .45s ease;
  overflow: hidden;
}

.jury-voting-intro.is-visible{
  opacity: 1;
}

.jury-voting-intro.is-leaving{
  opacity: 0;
}

.jury-voting-intro__bg{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(166,107,190,.28) 0%, rgba(0,0,0,0) 42%),
    linear-gradient(135deg, rgba(8,8,18,.76), rgba(20,8,36,.77));
  backdrop-filter: blur(10px);
}

.jury-voting-intro__content{
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 30px;
  transform: scale(.92) translateY(20px);
  opacity: 0;
  transition: transform .55s cubic-bezier(.2,.8,.2,1), opacity .55s ease;
}

.jury-voting-intro.is-visible .jury-voting-intro__content{
  transform: scale(1) translateY(0);
  opacity: 1;
}

.jury-voting-intro__label{
  font-family: 'es_buildregular', sans-serif;
  font-size: clamp(16px, 2vw, 28px);
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
  margin-bottom: 24px;
}

.jury-voting-intro__main{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.jury-voting-intro__flag{
  width: clamp(120px, 18vw, 220px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 24px;
  box-shadow:
    0 20px 60px rgba(0,0,0,.45),
    0 0 0 1px rgba(255,255,255,.14);
  animation: juryVotingIntroFlag 1.1s cubic-bezier(.2,.8,.2,1);
}

.jury-voting-intro__name{
  font-family: 'es_buildmedium', sans-serif;
  font-size: clamp(36px, 6vw, 92px);
  line-height: 1;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 10px 30px rgba(0,0,0,.45);
  animation: juryVotingIntroName 1.1s cubic-bezier(.2,.8,.2,1);
}

@keyframes juryVotingIntroFlag{
  0%{
    transform: scale(.72) rotate(-8deg);
    opacity: 0;
    filter: blur(8px);
  }
  100%{
    transform: scale(1) rotate(0);
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes juryVotingIntroName{
  0%{
    transform: translateY(24px);
    opacity: 0;
  }
  100%{
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 768px){
  .jury-voting-intro__content{
    padding: 24px 18px;
  }

  .jury-voting-intro__flag{
    border-radius: 18px;
  }
}
