/* Eventstream universal controls (themed) */



/* === Custom Controls (171 test only) === */
.es-ctrls {
  position: absolute;
  left: 12px; right: 12px; bottom: calc(var(--bottom-ui) + 10px);
  display: none;
  grid-template-columns: auto 1fr auto auto auto;
  gap: .5rem;
  align-items: center;
  padding: .5rem .75rem;
  background: rgba(15,15,20,.85);
  backdrop-filter: blur(6px);
  border: 1px solid #222;
  border-radius: 10px;
  z-index: 1000; /* above media (6) and fade (7), below thumbs (15) */
}


.es-ctrls.on { display: grid; }


.es-ctrls button {
  border: 0; background: #222; color: #fff;
  padding: .4rem .6rem; border-radius: 8px; cursor: pointer; font-size: .92rem;
}


.es-ctrls button:hover { background: #2d2d2d; }


.es-ctrls input[type="range"] { width: 100%; cursor: pointer; }


.es-ctrls .es-time { color: #ddd; font-variant-numeric: tabular-nums; font-size: .9rem; }




/* Toggle button for controls */
.es-ctrls-toggle{
  position:absolute;
  right:12px;
  bottom:calc(var(--bottom-ui) + 12px);
  z-index:2100;
  padding:.35rem .5rem;
  font-size:1rem;
  line-height:1;
  background:rgba(20,20,24,.9);
  color:#fff;
  border:1px solid #222;
  border-radius:8px;
  cursor:pointer;
}


.es-ctrls-toggle:hover{ background:rgba(30,30,36,.95); }




/* === Eventstream Dark Solar Theme for Custom Controls === */
.es-ctrls {
  /* existing positioning preserved */
  background: linear-gradient(180deg, rgba(10,12,16,0.78), rgba(10,12,16,0.92));
  border: 1px solid rgba(80, 120, 160, 0.25);
  box-shadow: 0 6px 24px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.05);
}



.es-ctrls .es-time {
  color: #cfd8e3;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  letter-spacing: 0.2px;
}



.es-ctrls button {
  background: rgba(22,26,34,0.95);
  color: #e8f0ff;
  border: 1px solid rgba(90,130,170,0.25);
  box-shadow: 0 2px 10px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
  transition: transform .06s ease, background .15s ease, box-shadow .15s ease;
}


.es-ctrls button:hover {
  background: rgba(30,36,48,0.98);
  box-shadow: 0 3px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
}


.es-ctrls button:active { transform: translateY(1px) scale(0.98); }


.es-ctrls button:focus-visible {
  outline: 2px solid #66a2ff;
  outline-offset: 2px;
  border-color: rgba(110,150,210,0.6);
}



/* Seek slider styling */
.es-ctrls input[type="range"].es-seek,
.es-ctrls input[type="range"]#esSeek171,
.es-ctrls input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 10px;
  background: linear-gradient(90deg, rgba(70,120,200,0.25), rgba(120,180,255,0.25));
  border-radius: 999px;
  border: 1px solid rgba(90,130,170,0.25);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.45);
}


.es-ctrls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #eaf2ff, #bcd4ff 55%, #6aa0ff 100%);
  border: 1px solid rgba(60,100,160,0.6);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  cursor: pointer;
}


.es-ctrls input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #eaf2ff, #bcd4ff 55%, #6aa0ff 100%);
  border: 1px solid rgba(60,100,160,0.6);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  cursor: pointer;
}


.es-ctrls input[type="range"]::-moz-range-track {
  height: 10px;
  background: linear-gradient(90deg, rgba(70,120,200,0.25), rgba(120,180,255,0.25));
  border-radius: 999px;
  border: 1px solid rgba(90,130,170,0.25);
}



/* Toggle button */
.es-ctrls-toggle {
  background: rgba(12,14,20,0.94);
  color: #e8f0ff;
  border: 1px solid rgba(90,130,170,0.3);
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}


.es-ctrls-toggle:hover { background: rgba(16,20,28,0.96); }


.es-ctrls-toggle:focus-visible {
  outline: 2px solid #66a2ff;
  outline-offset: 2px;
  border-color: rgba(110,150,210,0.6);
}



/* Mobile ergonomics */
@media (hover: none), (pointer: coarse) {
  .es-ctrls { padding: .65rem .9rem; gap: .65rem; }


  .es-ctrls button { padding: .6rem .8rem; font-size: 1.05rem; border-radius: 10px; }


  .es-ctrls input[type="range"]::-webkit-slider-thumb { width: 20px; height: 20px; }


  .es-ctrls input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; }




/* === High-specificity theme overrides (ensure they win) === */
.stage .es-ctrls {
  background: linear-gradient(180deg, rgba(10,12,16,0.78), rgba(10,12,16,0.92)) !important;
  border: 1px solid rgba(80,120,160,0.25) !important;
  box-shadow: 0 6px 24px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.05) !important;
}



.stage .es-ctrls .es-time {
  color: #cfd8e3 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5) !important;
  letter-spacing: 0.2px !important;
}



.stage .es-ctrls button {
  background: rgba(22,26,34,0.95) !important;
  color: #e8f0ff !important;
  border: 1px solid rgba(90,130,170,0.25) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06) !important;
  transition: transform .06s ease, background .15s ease, box-shadow .15s ease !important;
}


.stage .es-ctrls button:hover {
  background: rgba(30,36,48,0.98) !important;
  box-shadow: 0 3px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}


.stage .es-ctrls button:active { transform: translateY(1px) scale(0.98) !important; }


.stage .es-ctrls button:focus-visible {
  outline: 2px solid #66a2ff !important;
  outline-offset: 2px !important;
  border-color: rgba(110,150,210,0.6) !important;
}



/* Range styling (seek) */
.stage .es-ctrls input[type="range"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  height: 10px !important;
  background: linear-gradient(90deg, rgba(70,120,200,0.25), rgba(120,180,255,0.25)) !important;
  border-radius: 999px !important;
  border: 1px solid rgba(90,130,170,0.25) !important;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.45) !important;
}


.stage .es-ctrls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 16px !important; height: 16px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 30% 30%, #eaf2ff, #bcd4ff 55%, #6aa0ff 100%) !important;
  border: 1px solid rgba(60,100,160,0.6) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4) !important;
  cursor: pointer !important;
}


.stage .es-ctrls input[type="range"]::-moz-range-thumb {
  width: 16px !important; height: 16px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 30% 30%, #eaf2ff, #bcd4ff 55%, #6aa0ff 100%) !important;
  border: 1px solid rgba(60,100,160,0.6) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4) !important;
  cursor: pointer !important;
}


.stage .es-ctrls input[type="range"]::-moz-range-track {
  height: 10px !important;
  background: linear-gradient(90deg, rgba(70,120,200,0.25), rgba(120,180,255,0.25)) !important;
  border-radius: 999px !important;
  border: 1px solid rgba(90,130,170,0.25) !important;
}



/* Toggle button */
.stage .es-ctrls-toggle {
  background: rgba(12,14,20,0.94) !important;
  color: #e8f0ff !important;
  border: 1px solid rgba(90,130,170,0.3) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35) !important;
}


.stage .es-ctrls-toggle:hover { background: rgba(16,20,28,0.96) !important; }


.stage .es-ctrls-toggle:focus-visible {
  outline: 2px solid #66a2ff !important;
  outline-offset: 2px !important;
  border-color: rgba(110,150,210,0.6) !important;
}



/* Mobile ergonomics */
@media (hover: none), (pointer: coarse) {
  .stage .es-ctrls { padding: .65rem .9rem !important; gap: .65rem !important; }


  .stage .es-ctrls button { padding: .6rem .8rem !important; font-size: 1.05rem !important; border-radius: 10px !important; }