/* /home/hkiugcom/website.airplay/assets/audit/audit_widgets.css */
/* ------------------------------------------------------------
   Mini 24h listener curve (button)
   ------------------------------------------------------------ */

/* === LC24H MINI SIZE VARS === */
:root{
  --lc24h-mini-minw: 180px; /* <-- muuta tähän: nykyinen leveys * 1.10 */
}

/* Mini 24h listener curve (button) */
.lc24h-mini{
  min-width: var(--lc24h-mini-minw);
}

.lc24h-mini {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 9px 11px;              /* n. -10 % */
  border-radius: 14px;
  background: rgba(21,25,38,0.45);
  border: 1px solid #23283a;
  cursor: pointer;
  transition: filter 120ms ease;
}

.lc24h-mini:hover { 
  filter: brightness(1.05); 
}

.lc24h-mini-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-bottom: 5px;
}

.lc24h-mini-title {
  font-size: 12px;                /* hieman pienempi */
  font-weight: 700;
  line-height: 1;
  color: #e6e8ef;
  white-space: nowrap;
}

.lc24h-mini-mode {
  font-size: 11px;                /* hieman pienempi */
  font-weight: 600;
  color: #9ca3af;
  line-height: 1;
}

.lc24h-mini-open {
  opacity: 0.75;
  display: flex;
  align-items: center;
}

.lc24h-mini-open svg { 
  width: 15px;                    /* hieman pienempi */
  height: 15px; 
  display: block; 
}

.lc24h-mini-canvas {
  width: 100%;
  height: 30px;                   /* 33px -> 30px */
  position: relative;
}

#lc24hMiniCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Mobile: reduce mini curve height ~25% (44px -> 33px) */
@media (max-width: 639px) {
  .lc24h-mini-canvas { height: 33px; }
}

#lc24hMiniCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ------------------------------------------------------------
   Modal header: title first, station + PROFILE pill second
   ------------------------------------------------------------ */
.lc24h-prof-pill {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 6px 10px;
  border: 1px solid #2b3247;
  background: rgba(21, 25, 38, 0.35);
  border-radius: 999px;
  user-select: none;
  white-space: nowrap;
}

.lc24h-prof-pill.is-on { display: inline-flex; }

.lc24h-prof-pill .t {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e6e8ef;
}

/* canvas in modal */
#lc24hCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Toggle pills in modal */
.lc24h-toggle {
  display: inline-flex;
  border: 1px solid #2b3247;
  background: rgba(21, 25, 38, 0.45);
  border-radius: 999px;
  overflow: hidden;
}

.lc24h-toggle-btn {
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9aa3b2;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.lc24h-toggle-btn.is-active {
  color: #e6e8ef;
  background: rgba(230, 232, 239, 0.08);
}

/* --- lc24h legend (KISS) --- */
.lc24h-legend {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-left: 6px;
}

@media (max-width: 640px) {
  .lc24h-legend { display: none; }
}

.lc24h-legend-box {
  border: 1px solid rgba(43, 50, 71, 0.9);
  background: rgba(10, 12, 18, 0.55);
  border-radius: 12px;
  padding: 8px 10px;
  min-width: 170px;
  line-height: 1.15;
}

.lc24h-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.lc24h-legend-sub {
  margin-top: 6px;
  font-size: 10px;
  color: rgba(154, 163, 178, 0.78);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

#lc24hRefSubtitle.is-error { color: rgba(248, 113, 113, 0.95); }

.lc24h-legend-avg .lc24h-toggle { max-width: 100%; }

.lc24h-ref-row { gap: 6px; }

/* Overlay close button + legend bits */
.lc24h-close-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  padding: 6px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(17, 24, 39, 0.65);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.lc24h-close-overlay:hover { background: rgba(17, 24, 39, 0.82); }

.lc24h-legend-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.lc24h-legend-title-text {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: rgba(209, 213, 219, 0.85);
}

.lc24h-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  display: inline-block;
}

/* SWAP: avg <-> ref */
.lc24h-dot-avg { background: #4fc3f7; }   /* sininen */
.lc24h-dot-ref { background: #facc15; }   /* keltainen */

.lc24h-ref-sub {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(156, 163, 175, 0.9);
}

/* ------------------------------------------------------------
   Date nav controls (single source of truth)
   ------------------------------------------------------------ */
.lc24h-ref-nav {
  height: 32px;
  width: 32px;
  border-radius: 10px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(15, 23, 42, 0.35);
  color: rgba(230, 232, 239, 0.92);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lc24h-ref-nav:hover { background: rgba(15, 23, 42, 0.55); }

.lc24h-ref-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.lc24h-ref-date {
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(2, 6, 23, 0.35);
  color: rgba(230, 232, 239, 0.92);
  font-size: 12px;
  font-weight: 700;
  padding: 0 10px;
}

.lc24h-ref-date::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.75;
}

.ap-new-play {
  outline: 1px solid rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.12) inset;
  background: rgba(56, 189, 248, 0.06) !important;
  transition: background 320ms ease;
}

/* ------------------------------------------------------------
   AUDIT TEASER – animation etc
   ------------------------------------------------------------ */
.audit-teaser {
  display: block;
  min-width: 240px;
  max-width: 340px;
  height: 38px;
  padding-left: 10px;
  border-left: 1px solid rgba(255,255,255,0.08);
  position: relative;
}

@media (max-width: 420px) {
  .audit-teaser { min-width: 210px; max-width: 280px; }
}

.audit-teaser .tline {
  position: relative;
  top: 8px;
  font-size: 11px;
  line-height: 1.15;
  letter-spacing: 0.15px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-teaser .t1 { color: rgba(255,255,255,0.62); }
.audit-teaser .t2 { color: rgba(255,255,255,0.44); margin-top: 3px; }

.audit-teaser .tline::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 34px;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to left,
    rgba(255,255,255,0.16),
    rgba(255,255,255,0.06),
    rgba(255,255,255,0.00)
  );
}

.audit-teaser.is-typing .tline::after { opacity: 1; }

.audit-teaser .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-left: 6px;
  transform: translateY(-1px);
  opacity: 0.9;
}

.audit-teaser .dot.g {
  background: rgba(52,211,153,0.9);
  box-shadow: 0 0 0 2px rgba(52,211,153,0.12);
}

.audit-teaser .dot.r {
  background: rgba(248,113,113,0.9);
  box-shadow: 0 0 0 2px rgba(248,113,113,0.10);
}

.audit-teaser .dot.blink { animation: auditTeaserBlink 1.6s ease-in-out infinite; }

@keyframes auditTeaserBlink {
  0% { opacity: 0.25; }
  50% { opacity: 0.95; }
  100% { opacity: 0.25; }
}

.audit-teaser.is-fadeout { opacity: 0; transition: opacity 700ms ease; }
.audit-teaser.is-fadein { opacity: 1; transition: opacity 240ms ease; }

.audit-teaser-btn {
  position: absolute;
  left: -8px;
  bottom: -8px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(17,24,39,0.92);
  color: rgba(255,255,255,0.72);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.audit-teaser-btn:hover {
  color: rgba(255,255,255,0.88);
  border-color: rgba(255,255,255,0.22);
}

.audit-teaser-btn svg { width: 12px; height: 12px; display: block; }

/* ------------------------------------------------------------
   Topbar stacking & layout fixes (teaser vs kebab)
   ------------------------------------------------------------ */
.audit-actions { z-index: 40; }

.audit-teaser {
  position: relative;
  z-index: 10;
  flex: 0 1 320px;
  max-width: 320px;
  min-width: 220px;
}

.audit-actions { flex: 0 0 auto; }

/* on-air duration state (audit) */
.ap-dur-onair {
  color: rgba(148,163,184,0.85);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ap-onair-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 8px;
  background: rgba(239,68,68,0.95);
  box-shadow: 0 0 0 0 rgba(239,68,68,0.55);
  animation: apOnAirPulse 1.25s ease-in-out infinite;
  vertical-align: middle;
}

.ap-onair-text { vertical-align: middle; }

@keyframes apOnAirPulse {
  0%   { transform: scale(0.85); box-shadow: 0 0 0 0 rgba(239,68,68,0.55); opacity: 0.92; }
  55%  { transform: scale(1.00); box-shadow: 0 0 0 10px rgba(239,68,68,0); opacity: 1; }
  100% { transform: scale(0.85); box-shadow: 0 0 0 0 rgba(239,68,68,0); opacity: 0.92; }
}

@media (prefers-reduced-motion: reduce) {
  .ap-onair-dot { animation: none; }
}

#auditTeaser { position: relative; }

#auditTeaser .audit-teaser-btn{
  position: absolute;
  left: -8px;
  top: 18px;
  bottom: auto;
  right: auto;
  z-index: 6;
}

/* Reserve space so text never goes under controls */
#auditTeaser .tline { padding-left: 18px; padding-right: 10px; }

/* Live-link dot: pulse only every 5th cycle */
.ap-onair-dot--slow {
  animation: apOnAirPulseSlow 6.25s ease-in-out infinite;
}

@keyframes apOnAirPulseSlow {
  /* 0–80%: hiljaa */
  0%   { transform: scale(0.85); box-shadow: 0 0 0 0 rgba(239,68,68,0); opacity: 0.35; }
  80%  { transform: scale(0.85); box-shadow: 0 0 0 0 rgba(239,68,68,0); opacity: 0.35; }

  /* 80–100%: normaali pulse */
  90%  { transform: scale(1.00); box-shadow: 0 0 0 10px rgba(239,68,68,0); opacity: 1; }
  100% { transform: scale(0.85); box-shadow: 0 0 0 0 rgba(239,68,68,0); opacity: 0.35; }
}

#lc24hStationLabel {
  color: #facc15;
}
