@font-face {
  font-family: 'DSEG14-Classic';
  src: url('/fonts/DSEG14-Classic/DSEG14Classic-Regular.woff2') format('woff2'),
       url('/fonts/DSEG14-Classic/DSEG14Classic-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette sampled from the logo (tune as needed) */
  --night-bg: #0b0f1a; /* deep midnight */
  --night-bg-2: #121a2a; /* navy tint */
  --neon-violet: #8e73ff; /* neon glow accent */
  --neon-cyan: #5bd1ff; /* cyan accent */
  --neon-amber: #ffb76b; /* warm light */
  --text-main: #eef1ff; /* readable on dark */
  --muted: #9aa3c0;
}

html,
body {
  min-height: 100dvh;
  background: radial-gradient(
      1200px 1200px at 70% 10%,
      rgba(93, 196, 255, 0.1),
      transparent 60%
    ),
    radial-gradient(
      900px 900px at 20% 20%,
      rgba(142, 115, 255, 0.1),
      transparent 60%
    ),
    linear-gradient(180deg, var(--night-bg-2), var(--night-bg));
  color: var(--text-main);
  font-family: "Outfit", system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  overflow-x: hidden; /* prevent horizontal scrolling/bleed on mobile */
  overflow-y: hidden; /* disable vertical scroll */
}

/* Ensure borders/padding don't cause overflow beyond viewport */
*, *::before, *::after { box-sizing: border-box; }

/* Simple starfield */
.stars::before,
.stars::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(
      2px 2px at 10% 20%,
      rgba(255, 255, 255, 0.7) 60%,
      transparent 61%
    ),
    radial-gradient(
      1.5px 1.5px at 30% 10%,
      rgba(255, 255, 255, 0.5) 60%,
      transparent 61%
    ),
    radial-gradient(
      1.5px 1.5px at 55% 15%,
      rgba(255, 255, 255, 0.6) 60%,
      transparent 61%
    ),
    radial-gradient(
      1.5px 1.5px at 70% 28%,
      rgba(255, 255, 255, 0.65) 60%,
      transparent 61%
    ),
    radial-gradient(
      1.5px 1.5px at 85% 38%,
      rgba(255, 255, 255, 0.55) 60%,
      transparent 61%
    ),
    radial-gradient(
      2px 2px at 80% 70%,
      rgba(255, 255, 255, 0.7) 60%,
      transparent 61%
    ),
    radial-gradient(
      1.5px 1.5px at 40% 80%,
      rgba(255, 255, 255, 0.5) 60%,
      transparent 61%
    ),
    radial-gradient(
      1.5px 1.5px at 15% 65%,
      rgba(255, 255, 255, 0.6) 60%,
      transparent 61%
    );
  background-repeat: no-repeat;
}
.stars::after {
  filter: blur(0.3px);
  opacity: 0.6;
}

/* Hero */
.hero-wrap {
  position: relative;
  min-height: 100dvh;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  z-index: 1; /* above stars */
  padding: clamp(12px, 2.5vw, 24px);
  box-sizing: border-box;
  overflow: visible; /* avoid clipping content like station ring */
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 2vh, 24px);
  height: 100%;
  width: 100%;
  margin: 0 auto;
  min-width: 0;
}

/* Override Bootstrap p-4/p-md-5 utilities on the hero to avoid tall padding at md+ */
.hero-inner.glass,
.glass.p-4,
.glass.p-md-5 {
  padding: clamp(8px, 2vh, 24px) !important;
}

/* Reduce margin above controls when visible to keep within viewport */
.player-controls { margin-top: clamp(4px, 1vh, 12px) !important; }

.glass {
  background: rgba(18, 26, 42, 0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(142, 115, 255, 0.25);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  border-radius: 20px;
}

.logo-img {
  /* Preserve aspect ratio strictly; never stretch */
  width: auto;         /* do not force 100% width */
  height: auto;        /* keep natural ratio */
  max-width: 90vw;     /* responsive cap by viewport width */
  max-height: 45vh;    /* responsive cap by viewport height */
  display: block;
  margin: auto;
  filter: drop-shadow(0 0 20px rgba(142, 115, 255, 0.5));
}


@media (max-width: 423px) {
  .logo-img {
    transform: translateX(-3%);
  }
}

@media (max-width: 360px) {
  .logo-img {
    transform: translateX(-6%);
  }
}


/* Live status chip */
.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 183, 107, 0.12);
  border: 1px solid rgba(255, 183, 107, 0.35);
  color: var(--neon-amber);
  font-weight: 600;
  letter-spacing: 0.3px;
}
.live-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #ff5757;
  box-shadow: 0 0 8px #ff5757;
}

/* ON AIR indicator (top, centered, pulsing) */
.live-indicator {
  position: absolute;
  top: 1rem; /* align with about icon */
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 32px; /* approx btn-sm height to match the 'i' button */
  padding: 0 0.6rem; /* horizontal only; keep fixed height */
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255, 90, 90, 0.25),
    rgba(120, 0, 0, 0.2)
  );
  border: 1px solid rgba(255, 90, 90, 0.65);
  box-shadow: 0 0 10px rgba(255, 70, 70, 0.55), 0 0 22px rgba(255, 70, 70, 0.35);
  animation: onAirPulse 1.6s ease-in-out infinite;
  z-index: 2;
}
.live-label {
  color: #ffd0d0;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: clamp(12px, 1.6vw, 16px); /* match height with btn-sm */
  text-shadow: 0 0 6px rgba(255, 130, 130, 0.8),
    0 0 14px rgba(255, 60, 60, 0.45);
}
.live-indicator .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff3b3b;
  box-shadow: 0 0 8px #ff3b3b, 0 0 16px rgba(255, 59, 59, 0.6);
  animation: onAirDot 1.6s ease-in-out infinite;
}

@keyframes onAirPulse {
  0% {
    box-shadow: 0 0 8px rgba(255, 70, 70, 0.45),
      0 0 18px rgba(255, 70, 70, 0.25);
  }
  50% {
    box-shadow: 0 0 12px rgba(255, 70, 70, 0.85),
      0 0 28px rgba(255, 70, 70, 0.45);
  }
  100% {
    box-shadow: 0 0 8px rgba(255, 70, 70, 0.45),
      0 0 18px rgba(255, 70, 70, 0.25);
  }
}
@keyframes onAirDot {
  0% {
    opacity: 0.8;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
  100% {
    opacity: 0.8;
    transform: scale(0.95);
  }
}

/* Now Playing section */
.now-playing {
  text-align: center;
  margin-top: 0.75rem;
}
.np-heading {
  color: var(--muted);
  font-family: "DSEG14-Classic", "DSEG14 Classic", "Share Tech Mono",
    ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: clamp(12px, 1.8vw, 14px);
  margin-bottom: calc(0.25rem + 5px);
}
.np-title {
  color: var(--neon-violet);
  font-family: "DSEG14-Classic", "DSEG14 Classic", "Share Tech Mono",
    ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-weight: 400; /* DSEG uses regular weight for best legibility */
  font-size: var(--np-title-size, clamp(16.2px, 3.24vw, 30.78px)); /* ~70% of previous */
  line-height: 1.05;
  text-transform: uppercase;
  white-space: normal; /* allow wrapping */
  overflow: visible;
  letter-spacing: 0.12em; /* more spacing suits segmented glyphs */
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "kern" 1;
  text-shadow: 0 0 6px rgba(142, 115, 255, 0.95),
    0 0 14px rgba(142, 115, 255, 0.7), 0 0 28px rgba(142, 115, 255, 0.45),
    0 0 48px rgba(142, 115, 255, 0.3);
  filter: drop-shadow(0 0 8px rgba(142, 115, 255, 0.4))
    drop-shadow(0 0 18px rgba(142, 115, 255, 0.25));
  overflow-wrap: anywhere;
  word-break: break-word;
}
.np-by {
  margin-top: 0.15rem;
  font-family: "DSEG14-Classic", "DSEG14 Classic", "Share Tech Mono",
    ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: clamp(14px, 2.2vw, 20px);
  color: #cfd6ff;
  opacity: 0.95;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.np-by-label {
  font-family: "DSEG14-Classic", "DSEG14 Classic", "Share Tech Mono",
    ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  opacity: 0.75;
  margin-right: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.np-artist {
  font-family: "DSEG14-Classic", "DSEG14 Classic", "Share Tech Mono",
    ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-weight: 400;
  font-size: var(--np-artist-size, clamp(14px, 2.2vw, 20px));
  color: #dfe4ff;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "kern" 1;
  text-shadow: 0 0 1px rgba(142, 115, 255, 0.35);
  white-space: normal; /* allow wrapping */
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Program editor layout (responsive) */
.prog-controls {
  display: flex;
  flex-wrap: wrap;
}
.full-row {
  flex: 0 0 100%;
}
.prog-controls .grow {
  flex: 1 1 220px;
  min-width: 180px;
}
@media (max-width: 576px) {
  .prog-controls .grow {
    flex: 1 1 100%;
    min-width: 0;
  }
}

/* Ensure Now Playing text can wrap to container width */
.np-title,
.np-by,
.np-artist {
  max-width: 100%;
  display: block;
}

/* Next show block */
.next-show-label {
  color: #dfe4ff; /* match np-artist */
  font-family: inherit; /* not LCD */
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: clamp(12px, 1.8vw, 14px);
  margin-top: 0.5rem;
}
.next-show-when {
  color: #dfe4ff; /* match np-artist */
  font-family: inherit; /* not LCD */
  font-weight: 700;
  font-size: clamp(18px, 3vw, 32px); /* ~30px on typical screens */
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-shadow: none; /* no neon glow for next show */
}

/* Hero top links (About & Radios) */
.hero-top-links {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  pointer-events: none;
}
.hero-top-link {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-main);
  text-decoration: none;
  border: 1px solid rgba(142, 115, 255, 0.45);
  border-radius: 999px;
  background: rgba(15, 21, 36, 0.76);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.hero-top-link:hover,
.hero-top-link:focus-visible {
  color: #fff;
  border-color: rgba(142, 115, 255, 0.75);
  background: rgba(34, 42, 66, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.hero-top-link:focus-visible {
  outline: 2px solid rgba(91, 209, 255, 0.6);
  outline-offset: 2px;
}
@media (max-width: 480px) {
  .hero-top-links {
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    gap: 0.5rem;
  }
  .hero-top-link {
    padding: 0.2rem 0.75rem;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
  }
}
/* Stations ring list */
.stations {
  gap: clamp(2px, 2vw, 10px); /* smaller gaps on narrow screens */
  flex-wrap: nowrap; /* keep in one row; items shrink instead of wrapping */
  justify-content: center;
  width: 100%;
  padding-bottom: clamp(6px, 3vh, 20px); /* responsive space for selected name */
}
.stations.station-active {
  padding-bottom: calc(clamp(6px, 3vh, 20px) + 10px);
}
.station-logo {
  /* Base size ~80x80; shrink proportionally with viewport width (no min) */
  width: min(80px, 14vw);
  height: min(80px, 14vw);
  border-radius: 50%;
  overflow: visible; /* allow the animated ring to render outside */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(142, 115, 255, 0.35);
  position: relative;
  transition: width 220ms ease, height 220ms ease, margin 220ms ease,
    transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
  will-change: transform;
  cursor: pointer;
}
.station-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 200ms ease, filter 200ms ease;
  border-radius: 50%;
  display: block;
  position: relative;
  z-index: 1; /* keep above the ring */
}

/* Hover: slight enlarge + show play overlay at bottom 30% */
.station-logo:hover {
  transform: scale(1.08);
  z-index: 2;
}
.station-logo .logo-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 35%;
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.0));
  display: grid;
  place-items: center;
  color: #fff;
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
  z-index: 2;
}
.station-logo .logo-overlay i { font-size: 1.1rem; }
.station-logo:hover .logo-overlay { opacity: 1; }

/* Selected station: larger within the same row (120x120 max) */
.station-logo.selected {
  width: min(120px, 21vw);
  height: min(120px, 21vw);
  margin: 0 clamp(6px, 2vw, 12px); /* responsive breathing room */
  box-shadow: 0 0 12px rgba(142,115,255,0.45);
  z-index: 3;
}
.station-logo.selected .logo-overlay { display: none; }

/* Spinning ring to emphasize playing */
.station-logo.selected.playing::before {
  content: "";
  position: absolute;
  inset: -6px; /* slightly thinner ring to reduce edge clipping */
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(142, 115, 255, 0.95),
    rgba(91, 209, 255, 0.95),
    rgba(142, 115, 255, 0.95)
  );
  -webkit-mask: radial-gradient(farthest-side, transparent 92%, #000 94%);
          mask: radial-gradient(farthest-side, transparent 92%, #000 94%);
  filter: drop-shadow(0 0 10px rgba(142,115,255,0.45));
  animation: spin 1.8s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Selected station name under the center logo */
.station-logo.selected.playing::after {
  content: attr(data-name);
  position: absolute;
  left: 50%;
  margin-top: 10px;
  top: calc(100% + 0.25rem);
  transform: translateX(-50%);
  color: #dfe4ff;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  white-space: nowrap; /* do not wrap station name */
  text-align: center;
  max-width: 75vw;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: min(3.84vw, 19px);
  line-height: 1.1;
}

@media (max-width: 400px) {
  .player-controls {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0.5rem;
  }
  #btnStop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 0.35rem 0.55rem;
    font-size: 0;
    line-height: 1;
  }
  #btnStop i {
    margin-right: 0 !important;
    font-size: 1.05rem;
  }
  .player-controls .volume-wrap {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
    gap: 0.4rem;
  }
  .player-controls .form-range {
    width: 100% !important;
    max-width: 200px;
  }
  .stations {
    flex-wrap: nowrap;
    justify-content: center;
    gap: clamp(2px, 1.6vw, 8px);
  }
  .stations.station-active {
    padding-bottom: calc(clamp(6px, 3vh, 20px) + 10px);
  }
  .station-logo {
    width: min(56px, 16vw);
    height: min(56px, 16vw);
  }
  .station-logo.selected {
    width: min(64px, 19vw);
    height: min(64px, 19vw);
    margin: 0 clamp(4px, 1.5vw, 8px);
  }
  .station-logo.selected.playing::after {
    top: calc(100% + 0.25rem);
    max-width: 62vw;
    font-size: min(4.32vw, 15.6px);
  }
}

/* Radios modal */
.radios-modal {
  background: #0f1524;
  border: 1px solid rgba(142, 115, 255, 0.35);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.45);
}
.radios-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
}
.radios-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.radios-list li:last-child { border-bottom: none; }
.radios-station-name {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.radios-station-main {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1 1 auto;
}
.radios-station-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(142, 115, 255, 0.35);
  background: rgba(15, 21, 36, 0.65);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.radios-station-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.radios-logo-fallback {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}
.radios-item.is-current .radios-station-logo {
  border-color: rgba(91, 209, 255, 0.7);
  box-shadow: 0 0 12px rgba(91, 209, 255, 0.35);
}
.radios-item.is-current .radios-station-name {
  color: var(--neon-cyan);
}
.radios-link-group {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.radio-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(142, 115, 255, 0.45);
  background: rgba(15, 21, 36, 0.65);
  color: var(--text-main);
  font-size: 1.1rem;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}
.radio-social-link:hover,
.radio-social-link:focus-visible {
  color: #fff;
  border-color: rgba(91, 209, 255, 0.7);
  background: rgba(34, 42, 66, 0.9);
  transform: translateY(-2px);
}
.radio-social-link:focus-visible {
  outline: 2px solid rgba(91, 209, 255, 0.6);
  outline-offset: 2px;
}
.radios-placeholder {
  padding: 0.5rem 0;
  text-align: center;
}
@media (max-width: 520px) {
  .radios-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .radios-station-main {
    width: 100%;
  }
  .radios-station-name {
    white-space: normal;
  }
  .radios-link-group { gap: 0.5rem; }
  .radio-social-link {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }
}

/* Player controls under the stations list */
.player-controls .form-range {
  --vio: var(--neon-violet);
  --track: rgba(255,255,255,0.25);
  --range-pct: 100%;
  width: min(320px, 70vw);
  height: 20px; /* space for thumb */
  background: transparent;
}
/* WebKit (Chrome/Edge/Safari) */
.player-controls .form-range::-webkit-slider-runnable-track {
  height: 6px;
  background: linear-gradient(to right,
    var(--vio) 0%, var(--vio) var(--range-pct),
    var(--track) var(--range-pct), var(--track) 100%
  );
  border-radius: 999px;
}
.player-controls .form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  margin-top: -5px; /* center over 6px track */
  background: var(--vio);
  box-shadow: 0 0 8px rgba(142,115,255,0.6);
  border: none;
}
/* Firefox */
.player-controls .form-range::-moz-range-track {
  height: 6px;
  background: var(--track);
  border-radius: 999px;
}
.player-controls .form-range::-moz-range-progress {
  height: 6px;
  background: var(--vio);
  border-radius: 999px;
}
.player-controls .form-range::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--vio);
  border: none;
  box-shadow: 0 0 8px rgba(142,115,255,0.6);
}

/* Player controls appear only when playing (animated) */
.player-controls {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}
.player-controls.pc-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sleep-timer-trigger {
  min-width: 120px;
}

.sleep-timer-trigger[data-state="armed"] {
  background: rgba(142, 115, 255, 0.18);
  border-color: rgba(142, 115, 255, 0.55);
  color: var(--text-main);
  box-shadow: 0 0 12px rgba(142, 115, 255, 0.25);
}
.sleep-timer-trigger[data-state="armed"] .bi {
  color: var(--neon-amber);
}

.sleep-timer-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(142, 115, 255, 0.35);
  background: rgba(12, 17, 30, 0.6);
  backdrop-filter: blur(6px);
  color: var(--text-main);
  font-size: 0.9rem;
  transition: opacity 180ms ease;
}

.sleep-timer-status[hidden] {
  display: none !important;
}

.sleep-timer-status.expired {
  background: rgba(142, 115, 255, 0.15);
  border-color: rgba(142, 115, 255, 0.45);
}

.sleep-timer-icon {
  display: inline-flex;
  align-items: center;
  color: var(--neon-amber);
}

.sleep-timer-countdown {
  font-family: 'DSEG14-Classic', 'Outfit', monospace;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.sleep-timer-status .btn-link {
  color: var(--neon-cyan);
  font-size: 0.85rem;
}
.sleep-timer-status .btn-link:hover,
.sleep-timer-status .btn-link:focus {
  color: var(--neon-violet);
  text-decoration: none;
}

.sleep-timer-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sleep-timer-option {
  flex: 1 1 calc(50% - 0.5rem);
  min-width: 110px;
  border-color: rgba(142, 115, 255, 0.35);
  background: rgba(12, 17, 30, 0.6);
}

.sleep-timer-option.active,
.sleep-timer-option:focus {
  background: rgba(142, 115, 255, 0.85);
  border-color: rgba(142, 115, 255, 0.95);
  color: #0b0f1a;
  box-shadow: 0 0 16px rgba(142, 115, 255, 0.4);
}

.sleep-timer-option:focus-visible {
  outline: 2px solid var(--neon-amber);
  outline-offset: 2px;
}

.sleep-timer-custom .form-control {
  background: rgba(15, 21, 36, 0.8);
  border-color: rgba(142, 115, 255, 0.3);
  color: var(--text-main);
}
.sleep-timer-custom .form-control:focus {
  border-color: rgba(142, 115, 255, 0.6);
  box-shadow: 0 0 0 0.25rem rgba(142, 115, 255, 0.25);
}
.sleep-timer-custom .input-group-text {
  background: rgba(12, 17, 30, 0.6);
  border-color: rgba(142, 115, 255, 0.3);
  color: var(--muted);
}

.sleep-timer-preview {
  min-height: 1.5rem;
}

.sleep-timer-preview.active {
  color: var(--text-main);
}

/* Respect iOS safe areas for the main container */
@supports (padding: env(safe-area-inset-right)) {
  .container-xxl {
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left:  max(12px, env(safe-area-inset-left));
  }
}

/* Make Now Playing text scale down with screen (no hard min) */
.np-title {
  /* Scale by the smaller viewport side to respect height */
  font-size: var(--np-title-size, min(4.212vmin, 36.45px));
}
.np-by {
  font-size: min(2.8vmin, 20px);
}
.np-artist {
  font-size: var(--np-artist-size, min(2.8vmin, 20px));
}

/* Ultra-narrow screens: 350px and below */
@media (max-width: 350px) {
  .about-btn { transform: scale(0.85); transform-origin: top left; }
  .live-indicator { height: 26px; padding: 0 8px; gap: 6px; }
  .live-indicator .live-dot { width: 6px; height: 6px; }
  .live-label { font-size: 11px; letter-spacing: 0.12em; }

  .player-controls .form-range {
    max-width: 170px;
  }

  .stations { gap: clamp(2px, 1.2vw, 6px); }
  .station-logo { width: min(48px, 18vw); height: min(48px, 18vw); }
  .station-logo.selected { width: min(56px, 20vw); height: min(56px, 20vw); }
  .station-logo.selected.playing::after {
    max-width: 70vw;
    font-size: min(4vw, 11px);
  }

  .np-title { font-size: var(--np-title-size, 4.05vw); letter-spacing: 0.08em; }
  .np-artist, .np-by { font-size: var(--np-artist-size, 3.2vw); letter-spacing: 0.06em; }
}

/* Footer note */
.footnote {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  white-space: normal;
  /* overflow-wrap: anywhere; */
  word-break: normal;
}

/* --- Chat offcanvas width (διπλάσιο σε desktop) --- */
#chatPanel {
  --bs-offcanvas-width: clamp(320px, 40vw, 100vw);
}
@media (min-width: 1200px) {
  #chatPanel {
    --bs-offcanvas-width: clamp(320px, 40vw, 100vw);
  }
}
@media (max-width: 710px) {
  #chatPanel {
    --bs-offcanvas-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
  }
}

/* Push layout left when chat opens (no dimming) */
body.chat-push .hero-wrap {
  width: calc(100vw - var(--chat-width));
  margin-left: 0;
  margin-right: var(--chat-width);
  transition: margin-right 0.3s ease, width 0.3s ease;
}
body.chat-push .chat-fab,
body.chat-push .toast-container {
  right: calc(var(--chat-width) + 1rem);
  transition: right 0.3s ease;
}

/* Hide chat toggle button when chat is open */
body.chat-push .chat-fab {
  display: none;
}

/* Center the chat offcanvas title and keep close at right */
#chatPanel .offcanvas-header {
  position: relative;
}
#chatPanel .offcanvas-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 10px;
}
#chatPanel .offcanvas-header .btn-close {
  position: absolute;
  right: 1rem;
  top: 10px;
}

/* Buttons padding tweaks in chat header */
#chatPanel #openOnlineBtn,
#chatPanel #logoutBtn,
#chatPanel #chatMenuBtn {
  padding: 0.25rem 0.5rem;
}
body.chat-narrow #chatPanel #openOnlineBtn,
body.chat-narrow #chatPanel #logoutBtn,
body.chat-narrow #chatPanel #chatMenuBtn {
  padding: 0.2rem 0.45rem;
}

/* Counter font-size 14px */
#chatPanel #onlineCount,
#chatPanel #onlineCountMenu {
  font-size: 14px;
}

/* Hide hero on small screens when chat is open */
@media (max-width: 710px) {
  body.chat-push .hero-wrap {
    display: none !important;
  }
}

/* Hamburger dropdown (hidden by default; visible on compact) */
#chatPanel #chatMenuDropdown {
  display: none;
}
body.chat-compact #chatPanel #chatMenuDropdown {
  display: inline-block;
}
body.chat-compact #chatPanel #openOnlineBtn,
body.chat-compact #chatPanel #logoutBtn {
  display: none;
}
/* Ensure topbar sits above scrollable area */
#chatPanel .topbar {
  position: relative;
  z-index: 2;
}
#chatPanel .topbar {
  margin-bottom: 0.75rem;
}
#chatPanel .offcanvas-body {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* Users area: scrollable section that should never collapse to 0 height */
#chatPanel #usersArea {
  /* Allow content to define height up to a dynamic cap */
  max-height: var(--users-max, 45vh);
  /* Ensure it doesn't get squeezed to zero by flex siblings */
  flex: 0 0 auto;
  /* Give at least room for one list item */
  min-height: 3rem;
  overflow: auto;
  position: relative;
  z-index: 2;
}
/* Messages fill the remaining space and scroll internally */
#messages {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  overflow: auto;
}

/* Highlight dropdown items on hover/focus */
#chatPanel .dropdown-menu-dark .dropdown-item:hover,
#chatPanel .dropdown-menu-dark .dropdown-item:focus {
  background-color: rgba(142, 115, 255, 0.25);
  color: #fff;
}
/* Ensure dropdown always above users list */
#chatPanel .dropdown-menu {
  z-index: 2000;
}

/* When chat is narrow (<550px), hide labels (driven by JS via body.chat-narrow) */
body.chat-narrow #chatPanel #openOnlineBtn {
  font-size: 0;
}
body.chat-narrow #chatPanel #openOnlineBtn i,
body.chat-narrow #chatPanel #openOnlineBtn #onlineCount {
  font-size: 14px;
}
body.chat-narrow #chatPanel #logoutBtn {
  font-size: 0;
}
body.chat-narrow #chatPanel #logoutBtn i {
  font-size: 14px;
}

/* Chat styles */
.msg {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.msg .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 32px; /* prevent shrink/distortion on long lines */
}
/* Show full image for system avatar */
.avatar-system { object-fit: contain !important; background: transparent; }
/* Text initials fallback for avatars */
.avatar-fallback {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(142,115,255,.35), rgba(91,209,255,.35));
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  user-select: none;
  line-height: 1;
  overflow: hidden;
  flex: 0 0 auto;
}
.msg .meta {
  font-size: 0.875rem;
  line-height: 1;
  margin-bottom: 0.125rem;
}
.msg .name {
  font-weight: 600;
  margin-right: 0.5rem;
}
.host-mic {
  color: #ff3b3b;
  margin-right: 6px;
  font-size: 0.9em;
}
.msg .time {
  color: #9aa3c0;
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline dotted;
}
.msg .bubble {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 0.5rem;
  padding: 0.375rem 0.5rem;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
/* Media in bubbles */
.msg .bubble img,
.msg .bubble video {
  display: block;
  /* Ensure media never overflows the bubble/chat width */
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
/* Allow flex child to shrink so text can wrap */
.msg .flex-grow-1 {
  min-width: 0;
}
.msg.self {
  flex-direction: row-reverse;
}
.msg.self .bubble {
  background: rgba(142, 115, 255, 0.18);
}
.msg.self .meta,
.msg.self .bubble {
  text-align: right;
}
/* Role rings on avatars (img elements) */
.role-mod {
  outline: 2px solid #0d6efd;
  outline-offset: 0;
}
.role-admin {
  outline: 2px solid #d4ac0d;
  outline-offset: 0;
  box-shadow: 0 0 6px rgba(212, 172, 13, 0.55);
}
/* Host red ring + mic badge */
.avatar-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  flex: 0 0 32px; /* keep fixed size in flex rows */
}
.avatar-wrap .avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.avatar-wrap.host::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid #ff3b3b;
  box-shadow: 0 0 6px rgba(255, 59, 59, 0.6);
  pointer-events: none;
}
.mic-badge {
  position: absolute;
  left: -6px;
  top: -6px;
  color: #ff3b3b;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 0 6px rgba(255, 59, 59, 0.6);
}
/* Presence small avatar wrapper */
.avatar-sm-wrap {
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 28px; /* keep fixed size in flex rows */
}
/* Ensure header and list avatars don't distort */
#selfAvatarWrap img.rounded-circle,
#onlineList img.rounded-circle {
  object-fit: cover;
}
.avatar-sm-wrap.host::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid #ff3b3b;
  box-shadow: 0 0 6px rgba(255, 59, 59, 0.6);
  pointer-events: none;
}
.avatar-sm-wrap.admin::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid #d4ac0d;
  box-shadow: 0 0 6px rgba(212, 172, 13, 0.55);
  pointer-events: none;
}
.avatar-sm-wrap.mod::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid #0d6efd;
  box-shadow: 0 0 6px rgba(13, 110, 253, 0.55);
  pointer-events: none;
}
/* Small avatar mic badge (users list): keep compact so it doesn't hide the avatar */
.avatar-sm-wrap .mic-badge {
  left: -5px;
  top: -5px;
  width: 14px;
  height: 14px;
  font-size: 10px;
}

/* Host message coloring */
.msg.host .name,
.msg.host .bubble {
  color: var(--neon-violet);
}
.list-badge {
  font-size: 0.7rem;
}

/* Hover overlay and gear only for self header (disable on list) */
.avatar-sm-wrap {
  position: relative;
}
#selfAvatarWrap {
  cursor: pointer;
}
#selfAvatarWrap:hover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(13, 110, 253, 0.25);
}
.user-name {
  position: relative;
  display: inline-block;
  padding-right: 18px;
  border-radius: 4px;
}
/* Header name hover effect (not clickable) */
#selfUserHeader .user-name:hover {
  background: rgba(13, 110, 253, 0.18);
}
.user-name .gear {
  display: none;
  margin-left: 6px;
  color: #0d6efd;
  font-size: 0.95em;
}
#selfUserHeader .user-name:hover .gear {
  display: inline-block;
}
/* Show gear on name also when hovering avatar */
#selfAvatarWrap:hover + #selfUserHeader .user-name {
  background: rgba(13, 110, 253, 0.18);
}
#selfAvatarWrap:hover + #selfUserHeader .user-name .gear {
  display: inline-block;
}

/* floating actions */
.about-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
}
/* Right chat toggle button */
.chat-fab {
  font-size: 0.8rem;
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
  z-index: 1040; /* above content but under offcanvas backdrop */
  width: 53px;
  height: 53px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(
    135deg,
    rgba(142, 115, 255, 0.25),
    rgba(91, 209, 255, 0.25)
  );
  border: 1px solid rgba(142, 115, 255, 0.5);
  color: var(--text-main);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: chatPulse 3.5s ease-in-out infinite;
  will-change: transform, box-shadow;
}
.chat-fab:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 4px rgba(91, 209, 255, 0.15),
    0 10px 26px rgba(0, 0, 0, 0.45);
  animation-play-state: paused;
}

#chatIcon {
  display: block;
  width: 35px;
}

#chatIcon:hover {
  display: none;
}

#chatEmoji {
  display: none;
  font-size: 24px;
}



@keyframes chatPulse {
  0% {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(91, 209, 255, 0);
  }
  50% {
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45),
      0 0 0 8px rgba(91, 209, 255, 0.15);
  }
  100% {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(91, 209, 255, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-fab {
    animation: none;
  }
  .live-indicator {
    animation: none;
  }
  .live-indicator .live-dot {
    animation: none;
  }
}

/* Offcanvas Users (chat page) layout */
#onlineUsers .offcanvas-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#onlineUsers #onlineList {
  flex: 1 1 auto;
  overflow: auto;
  min-height: 3rem;
}

/* Scroll helpers for long legal text */
.policy-scroll {
  height: 80vh;
  max-height: 80vh;
  overflow: auto;
}

/* GIF/Stickers dropdown grid */
.media-dropdown { max-width: 360px; z-index: 2000; }
.media-wrap { width: 340px; height: 380px; }
.gif-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.gif-grid .gif-item { display: block; }
.gif-grid img { width: 100%; height: auto; border-radius: 6px; display: block; }

/* Unified media (+) tabs styling */
.media-tabs .nav-link { color: #dfe4ff; border: 1px solid rgba(255,255,255,0.12); }
.media-tabs .nav-link.active { background-color: rgba(142, 115, 255, 0.35); border-color: rgba(142, 115, 255, 0.6); color: #fff; }
.modal-scroll {
  height: 72vh;
  max-height: 72vh;
  overflow: auto;
}

/* ---- Lightbox (fullscreen images from modals) ---- */
.nl-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.92); display: none; align-items: center; justify-content: center; z-index: 13000; }
.nl-lightbox.show { display: flex; }
.nl-lightbox .nlb-stage { position: relative; max-width: 95vw; max-height: 95vh; display: grid; grid-template-rows: 1fr auto; gap: 10px; }
.nl-lightbox .nlb-img { max-width: 95vw; max-height: 85vh; width: auto; height: auto; object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.6); }
.nl-lightbox .nlb-meta { display: flex; align-items: center; justify-content: space-between; color: #cfd6ff; font-size: 14px; opacity: 0.9; }
.nl-lightbox .nlb-caption { max-width: 70vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-lightbox .nlb-counter { opacity: 0.85; }
.nl-lightbox .nlb-btn { position: fixed; background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.25); border-radius: 999px; width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.nl-lightbox .nlb-btn:hover { background: rgba(142,115,255,0.35); border-color: rgba(142,115,255,0.6); }
.nl-lightbox .nlb-close { top: 16px; right: 16px; font-size: 26px; line-height: 1; }
.nl-lightbox .nlb-prev { left: 16px; top: 50%; transform: translateY(-50%); font-size: 20px; }
.nl-lightbox .nlb-next { right: 16px; top: 50%; transform: translateY(-50%); font-size: 20px; }

/* Avoid accidental page shifts while open */
body.nl-lightbox-open { overflow: hidden; }

/* ---- Chat message styles (bubbles, actions, reactions, replies) ---- */
#messages { gap: 8px; display: flex; flex-direction: column; }
.msg { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.msg .avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.avatar-fallback { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); }
.role-blue { outline: 2px solid rgba(91, 209, 255, 0.5); }
.msg .meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
/* Make usernames more prominent */
.msg .meta .name { font-weight: 600; color: #eef1ff; font-size: 14px; display: inline-flex; align-items: center; }
/* Tighten mic to name */
.msg .meta .name .host-mic { margin-right: 4px; }
.msg .meta .time { opacity: 0.8; }
.host .host-mic { color: #ff8080; }
.bubble { position: relative; background: rgba(18,26,42,0.55); border: 1px solid rgba(142,115,255,0.25); box-shadow: 0 3px 12px rgba(0,0,0,0.3) inset; border-radius: 10px; padding: 8px 10px 24px 10px; color: #fff; overflow-wrap: anywhere; }
.bubble img, .bubble video { max-width: min(480px, 70vw); height: auto; border-radius: 8px; display: block; }

/* Reply quoted snippet inside a message */
.reply-snippet { font-size: 12px; opacity: 0.85; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-left: 3px solid rgba(142,115,255,0.6); padding: 6px 8px; border-radius: 6px; margin-bottom: 6px; }
.reply-snippet .reply-author { font-weight: 600; color: #dfe4ff; margin-bottom: 2px; }
.reply-snippet .reply-text { color: #dfe4ff; opacity: 0.9; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.reply-snippet .reply-thumb { width: 28px; height: 28px; border-radius: 4px; background: rgba(0,0,0,0.25); margin-bottom: 4px; }

/* Actions overlay at bubble bottom-right */
.msg-actions { position: absolute; right: 6px; bottom: -22px; display: none; gap: 4px; }
.msg:hover .msg-actions, .msg.show-actions .msg-actions { display: inline-flex; }
.msg-action-btn { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); background: rgba(0,0,0,0.3); color: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 0; font-size: 14px; }
.msg-action-btn:hover { background: rgba(142,115,255,0.35); border-color: rgba(142,115,255,0.6); }

/* Reaction strip inside bubble */
.reaction-strip { position: absolute; right: 6px; bottom: 6px; display: inline-flex; gap: 6px; }
.react-pill { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2); color: #fff; font-size: 18px; padding: 2px 8px; border-radius: 999px; line-height: 1.3; }
.react-pill.mine { background: rgba(91, 209, 255, 0.2); border-color: rgba(91, 209, 255, 0.55); }

/* Cancel current reply on target bubble */
.cancel-reply-btn { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.35); background: rgba(0,0,0,0.4); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; line-height: 1; z-index: 2; }
.cancel-reply-btn:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.6); }
.msg.replying-to .bubble { box-shadow: 0 0 0 2px rgba(142,115,255,0.35) inset; }

/* Reaction popup */
.react-popup { position: fixed; background: rgba(18,26,42,0.9); border: 1px solid rgba(142,115,255,0.35); border-radius: 10px; padding: 6px; display: inline-flex; gap: 6px; box-shadow: 0 6px 24px rgba(0,0,0,0.5); }
.react-popup .quick-emoji { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.25); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; padding: 0; }
.react-popup .quick-emoji.more { font-weight: 700; }
.react-popup .quick-emoji.remove { font-weight: 700; }
.react-popup .quick-emoji:hover { background: rgba(142,115,255,0.35); border-color: rgba(142,115,255,0.6); }

/* Reply compose preview above input */
.reply-preview { position: relative; display: flex; flex-direction: column; gap: 44px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); border-left: 3px solid rgba(142,115,255,0.6); color: #fff; border-radius: 8px; padding: 8px 10px 8px 10px; margin-bottom: 4px; }
.reply-preview .btn-close { position: absolute; right: 6px; top: 6px; }
.reply-preview .reply-cap { font-weight: 600; opacity: 0.9; }
.reply-preview .reply-snippet-inline { font-size: 12px; opacity: 0.9; }

/* Reply overlay inside textarea */
.input-wrap { position: relative; flex: 1 1 auto; }
.input-wrap textarea { width: 100%; }
.input-wrap.has-reply { padding-top: 86px; }
.input-wrap.has-reply textarea { padding-top: 0; }

/* Scope the visual textbox container to offcanvas chat */
#chatPanel .input-wrap {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 8px;
  padding: 6px 10px;
}
#chatPanel .input-wrap textarea.form-control {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  resize: none;
  padding-left: 0;
  padding-right: 0;
}
.reply-overlay { position: absolute; top: 6px; left: 8px; right: 8px; background: #ffffff; border: 1px solid rgba(0,0,0,0.15); border-radius: 8px; padding: 6px 28px 6px 10px; display: flex; align-items: center; gap: 8px; color: #212529; min-height: 30px; pointer-events: none; box-shadow: 0 2px 12px rgba(0,0,0,0.12); }
.reply-overlay .btn-close { position: absolute; right: 6px; top: 6px; }
.reply-overlay .btn-close { pointer-events: auto; }
.reply-overlay .thumb { width: 44px; height: 44px; border-radius: 6px; background: rgba(0,0,0,0.08); flex: 0 0 auto; pointer-events: none; }
.reply-overlay .info { min-width: 0; }
.reply-overlay .reply-lines { display: block; width: 100%; }
.reply-overlay .reply-label { font-size: 12px; color: #495057; line-height: 1.1; }
.reply-overlay .reply-author { font-weight: 700; line-height: 1.2; color: #212529; }
.reply-overlay .reply-original { font-size: 12px; color: #212529; white-space: pre-wrap; word-break: break-word; margin-top: 4px; }

/* Overlay scroll is controlled dynamically via inline styles when needed */
.reply-overlay.dark { background: rgba(18,26,42,0.92); border-color: rgba(142,115,255,0.25); color: #f8f9fa; box-shadow: 0 2px 12px rgba(0,0,0,0.35); }
.reply-overlay.dark .reply-label { color: #cfd2de; }
.reply-overlay.dark .reply-author { color: #ffffff; }
.reply-overlay.dark .reply-original { color: #e9ecef; }

/* Reactors tooltip popup */
.reactors-popup { position: fixed; background: rgba(18,26,42,0.95); border: 1px solid rgba(142,115,255,0.35); border-radius: 10px; padding: 8px 10px; color: #fff; box-shadow: 0 6px 24px rgba(0,0,0,0.5); z-index: 3000; max-width: 260px; }
.reactors-popup .title { font-weight: 600; margin-bottom: 4px; opacity: .95; }
.reactors-popup .names { max-height: 220px; overflow: auto; }
.reactors-popup .name-item { font-size: 13px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reactors-popup .reactor-row { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.reactors-popup .reactor-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.reactors-popup .reactor-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Indicate pills are interactive */
.react-pill { cursor: pointer; }

/* #chatPanel #messages { margin-bottom: 0 !important; }
#chatPanel #form { gap: .25rem !important; } */
.radios-link-placeholder {
  font-size: 0.85rem;
  color: rgba(239, 241, 255, 0.65);
}

