/* Custom CSS for Radio SMK Negeri 8 Berau */
/* Support for Dynamic Theme Colors (Green, Blue, Purple, Rose, Slate) & Dark/Light Mode */

:root {
  /* Default: Green Gradient (Agribisnis & Edukasi) */
  --brand-primary: #059669;
  --brand-primary-light: #10b981;
  --brand-primary-dark: #064e3b;
  --brand-accent: #f59e0b;
  --brand-accent-light: #fbbf24;
  --brand-glow: rgba(16, 185, 129, 0.35);
  
  --bg-base: #03130d;
  --bg-gradient-1: rgba(6, 78, 59, 0.45);
  --bg-gradient-2: rgba(16, 185, 129, 0.2);
  --bg-gradient-3: rgba(245, 158, 11, 0.15);
  
  --glass-bg: rgba(6, 28, 20, 0.7);
  --glass-elevated: rgba(7, 36, 26, 0.82);
  --glass-subtle: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #a7f3d0;
  --text-sub: #cbd5e1;

  --bg-opacity: 0.18;
  --bg-blur: 0px;
}

/* THEME: BLUE (Tema Klasik Radio) */
body.theme-blue {
  --brand-primary: #2563eb;
  --brand-primary-light: #3b82f6;
  --brand-primary-dark: #1e3a8a;
  --brand-accent: #f59e0b;
  --brand-accent-light: #fbbf24;
  --brand-glow: rgba(37, 99, 235, 0.35);

  --bg-base: #060b17;
  --bg-gradient-1: rgba(30, 58, 138, 0.45);
  --bg-gradient-2: rgba(14, 165, 233, 0.2);
  --bg-gradient-3: rgba(245, 158, 11, 0.15);

  --glass-bg: rgba(15, 23, 42, 0.7);
  --glass-elevated: rgba(17, 28, 54, 0.82);
  --glass-subtle: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #93c5fd;
  --text-sub: #cbd5e1;
}

/* THEME: PURPLE (Cyber Midnight) */
body.theme-purple {
  --brand-primary: #9333ea;
  --brand-primary-light: #a855f7;
  --brand-primary-dark: #581c87;
  --brand-accent: #f43f5e;
  --brand-accent-light: #fb7185;
  --brand-glow: rgba(168, 85, 247, 0.35);

  --bg-base: #090314;
  --bg-gradient-1: rgba(88, 28, 135, 0.5);
  --bg-gradient-2: rgba(217, 70, 239, 0.2);
  --bg-gradient-3: rgba(244, 63, 94, 0.15);

  --glass-bg: rgba(24, 10, 40, 0.7);
  --glass-elevated: rgba(35, 14, 58, 0.82);
  --glass-subtle: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #d8b4fe;
  --text-sub: #cbd5e1;
}

/* THEME: ROSE (Sunset Ruby) */
body.theme-rose {
  --brand-primary: #e11d48;
  --brand-primary-light: #f43f5e;
  --brand-primary-dark: #881337;
  --brand-accent: #f59e0b;
  --brand-accent-light: #fbbf24;
  --brand-glow: rgba(244, 63, 94, 0.35);

  --bg-base: #140409;
  --bg-gradient-1: rgba(136, 19, 55, 0.5);
  --bg-gradient-2: rgba(244, 63, 94, 0.2);
  --bg-gradient-3: rgba(245, 158, 11, 0.15);

  --glass-bg: rgba(35, 10, 18, 0.7);
  --glass-elevated: rgba(50, 14, 25, 0.82);
  --glass-subtle: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #fca5a5;
  --text-sub: #cbd5e1;
}

/* THEME: SLATE (Minimalist) */
body.theme-slate {
  --brand-primary: #3b82f6;
  --brand-primary-light: #60a5fa;
  --brand-primary-dark: #1e293b;
  --brand-accent: #e2e8f0;
  --brand-accent-light: #ffffff;
  --brand-glow: rgba(59, 130, 246, 0.3);

  --bg-base: #09090b;
  --bg-gradient-1: rgba(39, 39, 42, 0.5);
  --bg-gradient-2: rgba(59, 130, 246, 0.15);
  --bg-gradient-3: rgba(226, 232, 240, 0.1);

  --glass-bg: rgba(24, 24, 27, 0.75);
  --glass-elevated: rgba(39, 39, 42, 0.85);
  --glass-subtle: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #cbd5e1;
}

/* ========================================================= */
/* LIGHT MODE STYLING & PALETTES                             */
/* ========================================================= */
body.light-mode {
  --bg-base: #f8fafc;
  --bg-gradient-1: rgba(16, 185, 129, 0.16);
  --bg-gradient-2: rgba(5, 150, 105, 0.10);
  --bg-gradient-3: rgba(245, 158, 11, 0.08);

  --glass-bg: rgba(255, 255, 255, 0.88);
  --glass-elevated: rgba(255, 255, 255, 0.96);
  --glass-subtle: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(15, 23, 42, 0.09);
  --text-main: #0f172a;
  --text-muted: #047857;
  --text-sub: #334155;
  color: #0f172a;
}

body.light-mode.theme-blue {
  --bg-base: #f8fafc;
  --bg-gradient-1: rgba(59, 130, 246, 0.16);
  --bg-gradient-2: rgba(37, 99, 235, 0.10);
  --bg-gradient-3: rgba(245, 158, 11, 0.08);
  --glass-border: rgba(37, 99, 235, 0.14);
  --text-main: #0f172a;
  --text-muted: #1d4ed8;
  --text-sub: #334155;
}

body.light-mode.theme-purple {
  --bg-base: #faf5ff;
  --bg-gradient-1: rgba(168, 85, 247, 0.16);
  --bg-gradient-2: rgba(147, 51, 234, 0.10);
  --bg-gradient-3: rgba(244, 63, 94, 0.08);
  --glass-border: rgba(147, 51, 234, 0.14);
  --text-main: #0f172a;
  --text-muted: #7e22ce;
  --text-sub: #334155;
}

body.light-mode.theme-rose {
  --bg-base: #fff1f2;
  --bg-gradient-1: rgba(244, 63, 94, 0.16);
  --bg-gradient-2: rgba(225, 29, 72, 0.10);
  --bg-gradient-3: rgba(245, 158, 11, 0.08);
  --glass-border: rgba(225, 29, 72, 0.14);
  --text-main: #0f172a;
  --text-muted: #be123c;
  --text-sub: #334155;
}

body.light-mode.theme-slate {
  --bg-base: #f8fafc;
  --bg-gradient-1: rgba(148, 163, 184, 0.20);
  --bg-gradient-2: rgba(100, 116, 139, 0.10);
  --bg-gradient-3: rgba(203, 213, 225, 0.10);
  --glass-border: rgba(100, 116, 139, 0.15);
  --text-main: #0f172a;
  --text-muted: #334155;
  --text-sub: #475569;
}

/* ========================================================= */
/* COMPREHENSIVE LIGHT MODE ELEMENT OVERRIDES                */
/* ========================================================= */
body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode h6,
body.light-mode .text-white {
  color: #0f172a !important;
}

body.light-mode .text-slate-100,
body.light-mode .text-slate-200 {
  color: #1e293b !important;
}

body.light-mode .text-slate-300 {
  color: #334155 !important;
}

body.light-mode .text-slate-300\/80 {
  color: #475569 !important;
}

body.light-mode .text-slate-400 {
  color: #64748b !important;
}

body.light-mode .text-slate-500 {
  color: #94a3b8 !important;
}

body.light-mode .text-emerald-200,
body.light-mode .text-emerald-200\/70,
body.light-mode .text-emerald-200\/80,
body.light-mode .text-emerald-200\/90,
body.light-mode .text-emerald-300,
body.light-mode .text-emerald-300\/80 {
  color: #047857 !important;
}

body.light-mode .text-blue-100,
body.light-mode .text-blue-200,
body.light-mode .text-blue-300 {
  color: #1e40af !important;
}

body.light-mode .text-purple-300 {
  color: #6b21a8 !important;
}

body.light-mode .text-amber-400 {
  color: #b45309 !important;
}

/* Header & Navigation in Light Mode */
body.light-mode header {
  background: rgba(255, 255, 255, 0.90) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
}

body.light-mode header nav a {
  color: #334155 !important;
}

body.light-mode header nav a:hover {
  color: var(--brand-primary) !important;
}

/* Top Running Ticker Bar in Light Mode */
body.light-mode aside {
  background: rgba(248, 250, 252, 0.95) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

body.light-mode aside .marquee-track {
  color: #065f46 !important;
  font-weight: 600;
}

/* Footer in Light Mode */
body.light-mode footer {
  background: #f1f5f9 !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}

body.light-mode footer p {
  color: #475569 !important;
}

/* Panels and Cards in Light Mode */
body.light-mode .glass-panel,
body.light-mode .glass-panel-elevated,
body.light-mode .glass-card-subtle,
body.light-mode .admin-glass {
  background: rgba(255, 255, 255, 0.90) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

/* Containers with Dark Backgrounds -> Clean Soft Light Grays */
body.light-mode .bg-slate-950,
body.light-mode .bg-slate-950\/90,
body.light-mode .bg-slate-950\/80,
body.light-mode .bg-slate-950\/70,
body.light-mode .bg-slate-950\/60,
body.light-mode .bg-slate-900,
body.light-mode .bg-slate-900\/80,
body.light-mode .bg-black\/20,
body.light-mode .bg-black\/30,
body.light-mode .bg-black\/40 {
  background-color: rgba(241, 245, 249, 0.92) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-mode .bg-white\/5,
body.light-mode .bg-white\/10,
body.light-mode .bg-white\/15 {
  background-color: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.07) !important;
}

body.light-mode .border-white\/5,
body.light-mode .border-white\/10,
body.light-mode .border-white\/15,
body.light-mode .border-white\/20 {
  border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Form inputs & controls in Light Mode */
body.light-mode input[type="text"],
body.light-mode input[type="password"],
body.light-mode textarea,
body.light-mode select {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

body.light-mode input[type="text"]:focus,
body.light-mode input[type="password"]:focus,
body.light-mode textarea:focus,
body.light-mode select:focus {
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 0 3px var(--brand-glow) !important;
}

body.light-mode input::placeholder,
body.light-mode textarea::placeholder {
  color: #94a3b8 !important;
}

/* Sticky Mini Player in Light Mode */
body.light-mode #mini-player {
  background: rgba(255, 255, 255, 0.96) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.08) !important;
}

/* Modals in Light Mode */
body.light-mode #share-modal .glass-panel-elevated,
body.light-mode #poster-modal .glass-panel-elevated {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15) !important;
}

/* Keyboard hint badges */
body.light-mode kbd {
  background-color: #e2e8f0 !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}

/* Toast Notice in Light Mode */
body.light-mode .toast-notice {
  background: rgba(255, 255, 255, 0.96) !important;
  color: #0f172a !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12) !important;
}

body.light-mode .toast-notice #toast-message {
  color: #0f172a !important;
}

/* Base Body Setup with Generous Bottom Scroll Clearance */
body {
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(at 0% 0%, var(--bg-gradient-1) 0px, transparent 50%),
    radial-gradient(at 100% 0%, var(--bg-gradient-2) 0px, transparent 50%),
    radial-gradient(at 50% 50%, var(--bg-base) 0px, transparent 100%),
    radial-gradient(at 100% 100%, var(--bg-gradient-3) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
  scroll-behavior: smooth;
  padding-bottom: 6.5rem;
}

@media (min-width: 768px) {
  body {
    padding-bottom: 8rem;
  }
}

/* Custom Background Image Layer with Opacity & Blur */
#custom-bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: var(--bg-opacity);
  filter: blur(var(--bg-blur));
  transition: opacity 0.5s ease, filter 0.5s ease;
}

/* Glassmorphism Styles */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.4);
}

.glass-panel-elevated {
  background: var(--glass-elevated);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5), 0 0 35px -5px var(--brand-glow);
}

.glass-card-subtle {
  background: var(--glass-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.glass-card-subtle:hover {
  border-color: var(--brand-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px var(--brand-glow);
}

/* ========================================================= */
/* THEME CARD INTERACTIVE SELECTION (ADMIN)                  */
/* ========================================================= */
.theme-card {
  position: relative;
  cursor: pointer;
  border-width: 2px !important;
  border-style: solid !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: rgba(2, 6, 23, 0.6) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none;
}

body.light-mode .theme-card {
  border-color: rgba(0, 0, 0, 0.1) !important;
  background: rgba(255, 255, 255, 0.8) !important;
}

.theme-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-primary-light) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Active Theme Card state via class or :has(input:checked) */
.theme-card.is-active,
.theme-card:has(input[type="radio"]:checked) {
  border-color: var(--brand-accent) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 0 0 2px var(--brand-accent), 0 10px 30px var(--brand-glow) !important;
}

body.light-mode .theme-card.is-active,
body.light-mode .theme-card:has(input[type="radio"]:checked) {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 0 0 2px var(--brand-accent), 0 8px 25px rgba(0, 0, 0, 0.08) !important;
}

.theme-card .radio-indicator {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

body.light-mode .theme-card .radio-indicator {
  border-color: rgba(0, 0, 0, 0.3);
}

.theme-card.is-active .radio-indicator,
.theme-card:has(input[type="radio"]:checked) .radio-indicator {
  border-color: var(--brand-accent) !important;
  background-color: var(--brand-accent) !important;
}

.theme-card .radio-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #022c22;
  opacity: 0;
  transform: scale(0);
  transition: all 0.2s ease;
}

.theme-card.is-active .radio-indicator-dot,
.theme-card:has(input[type="radio"]:checked) .radio-indicator-dot {
  opacity: 1 !important;
  transform: scale(1) !important;
}

/* Admin Dashboard Glass Cards */
.admin-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.tab-btn.active {
  background-color: var(--brand-primary) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 15px var(--brand-glow);
}

/* Dynamic Brand Colors */
.text-brand-primary { color: var(--brand-primary-light); }
.bg-brand-primary { background-color: var(--brand-primary); }
.border-brand-primary { border-color: var(--brand-primary-light); }
.ring-brand-primary { --tw-ring-color: var(--brand-primary-light); }

.vinyl-disc {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 40px var(--brand-glow);
  position: relative;
}

.vinyl-disc::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: repeating-radial-gradient(
    circle at center,
    transparent 0,
    transparent 7px,
    rgba(255, 255, 255, 0.04) 8px,
    transparent 9px
  ),
  radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
  radial-gradient(circle at 65% 65%, rgba(0, 0, 0, 0.25) 0%, transparent 60%);
  pointer-events: none;
  z-index: 5;
}

.vinyl-spinning {
  animation: spin-vinyl 14s linear infinite;
}

.vinyl-paused {
  animation-play-state: paused !important;
}

@keyframes spin-vinyl {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Pulsing Aura When Playing */
.audio-pulse-ring {
  position: absolute;
  inset: -12px;
  border-radius: 9999px;
  border: 2px solid var(--brand-accent);
  opacity: 0;
  pointer-events: none;
}

.is-playing .audio-pulse-ring {
  animation: pulse-ring 2.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { opacity: 0.3; }
  100% { transform: scale(1.15); opacity: 0; }
}

/* Equalizer Bars Container */
.equalizer-container {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 48px;
  gap: 3px;
  padding: 0 8px;
}

.eq-bar {
  width: 4px;
  min-height: 4px;
  background: linear-gradient(180deg, var(--brand-primary-light) 0%, var(--brand-primary) 60%, var(--brand-primary-dark) 100%);
  border-radius: 3px;
  transition: height 0.15s ease-out;
}

.eq-bar.active {
  animation: equalize-bar 1.2s ease-in-out infinite alternate;
}

.eq-bar:nth-child(even).active {
  background: linear-gradient(180deg, var(--brand-accent-light) 0%, var(--brand-accent) 100%);
}

.eq-bar:nth-child(1).active { animation-duration: 0.65s; animation-delay: 0.1s; }
.eq-bar:nth-child(2).active { animation-duration: 0.45s; animation-delay: 0.3s; }
.eq-bar:nth-child(3).active { animation-duration: 0.85s; animation-delay: 0.15s; }
.eq-bar:nth-child(4).active { animation-duration: 0.55s; animation-delay: 0.05s; }
.eq-bar:nth-child(5).active { animation-duration: 0.75s; animation-delay: 0.4s; }
.eq-bar:nth-child(6).active { animation-duration: 0.6s; animation-delay: 0.25s; }
.eq-bar:nth-child(7).active { animation-duration: 0.9s; animation-delay: 0.12s; }
.eq-bar:nth-child(8).active { animation-duration: 0.5s; animation-delay: 0.35s; }
.eq-bar:nth-child(9).active { animation-duration: 0.7s; animation-delay: 0.18s; }
.eq-bar:nth-child(10).active { animation-duration: 0.8s; animation-delay: 0.22s; }

@keyframes equalize-bar {
  0% { height: 6px; }
  30% { height: 18px; }
  60% { height: 42px; }
  80% { height: 24px; }
  100% { height: 46px; }
}

/* Custom Range Input */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  outline: none;
  transition: all 0.2s ease;
}

body.light-mode input[type=range] {
  background: rgba(0, 0, 0, 0.15);
}

input[type=range]:hover {
  background: rgba(255, 255, 255, 0.25);
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-accent);
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 0 12px var(--brand-glow);
  transition: transform 0.15s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* On-Air Live Pulsing Dot */
.live-badge-pulse {
  animation: live-dot 1.8s infinite;
}

@keyframes live-dot {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.8); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Marquee / Ticker text */
.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  animation: marquee-scroll 32s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Toast Message */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 14px;
  backdrop-filter: blur(16px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* Active schedule pulse */
.schedule-active {
  border-color: var(--brand-accent) !important;
  background: rgba(245, 158, 11, 0.08) !important;
}

/* Waveform Canvas */
#visualizer-canvas {
  width: 100%;
  height: 45px;
  display: block;
}

/* ========================================================= */
/* BORDER RADIUS THEME VARIATIONS (Besar, Sedang, Kecil, Tanpa) */
/* ========================================================= */
body.radius-tanpa .rounded-3xl,
body.radius-tanpa .rounded-2xl,
body.radius-tanpa .rounded-xl,
body.radius-tanpa .rounded-lg,
body.radius-tanpa .rounded-md,
body.radius-tanpa .rounded {
  border-radius: 0px !important;
}

body.radius-tanpa .rounded-full:not(.vinyl-disc, .vinyl-disc img, .audio-pulse-ring, .radio-indicator, .radio-indicator-dot, .live-badge-pulse, .live-pulse, .spindle-dot, .keep-circle, #album-disc, #mini-player-disc, .eq-bar) {
  border-radius: 0px !important;
}

body.radius-kecil .rounded-3xl,
body.radius-kecil .rounded-2xl {
  border-radius: 8px !important;
}
body.radius-kecil .rounded-xl,
body.radius-kecil .rounded-lg,
body.radius-kecil .rounded-md,
body.radius-kecil .rounded {
  border-radius: 4px !important;
}
body.radius-kecil .rounded-full:not(.vinyl-disc, .vinyl-disc img, .audio-pulse-ring, .radio-indicator, .radio-indicator-dot, .live-badge-pulse, .live-pulse, .spindle-dot, .keep-circle, #album-disc, #mini-player-disc, .eq-bar) {
  border-radius: 4px !important;
}

body.radius-sedang .rounded-3xl,
body.radius-sedang .rounded-2xl {
  border-radius: 16px !important;
}
body.radius-sedang .rounded-xl,
body.radius-sedang .rounded-lg {
  border-radius: 10px !important;
}
body.radius-sedang .rounded-md,
body.radius-sedang .rounded {
  border-radius: 6px !important;
}
body.radius-sedang .rounded-full:not(.vinyl-disc, .vinyl-disc img, .audio-pulse-ring, .radio-indicator, .radio-indicator-dot, .live-badge-pulse, .live-pulse, .spindle-dot, .keep-circle, #album-disc, #mini-player-disc, .eq-bar) {
  border-radius: 10px !important;
}

body.radius-besar .rounded-3xl {
  border-radius: 28px !important;
}
body.radius-besar .rounded-2xl {
  border-radius: 20px !important;
}
body.radius-besar .rounded-xl {
  border-radius: 14px !important;
}
body.radius-besar .rounded-lg {
  border-radius: 10px !important;
}

/* ========================================================= */
/* DATATABLES STYLING (SERVERSIDE, DARK & LIGHT COMPLIANT)   */
/* ========================================================= */
.dataTables_wrapper {
  color: inherit !important;
  font-size: 0.8125rem;
  width: 100% !important;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
  color: inherit !important;
  margin-bottom: 0.85rem;
}

.dataTables_wrapper .dataTables_length select {
  background-color: rgba(2, 6, 23, 0.8) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 0.75rem !important;
  padding: 0.35rem 0.75rem !important;
  font-size: 0.75rem !important;
  outline: none !important;
  cursor: pointer;
}

body.light-mode .dataTables_wrapper .dataTables_length select {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

.dataTables_wrapper .dataTables_filter input {
  background-color: rgba(2, 6, 23, 0.8) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 0.75rem !important;
  padding: 0.4rem 0.85rem !important;
  margin-left: 0.5rem !important;
  font-size: 0.8125rem !important;
  outline: none !important;
}

body.light-mode .dataTables_wrapper .dataTables_filter input {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--brand-accent) !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25) !important;
}

table.dataTable {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100% !important;
  border: none !important;
  margin-top: 0.75rem !important;
  margin-bottom: 1rem !important;
  clear: both;
}

table.dataTable thead th {
  background: rgba(255, 255, 255, 0.04) !important;
  color: rgba(255, 255, 255, 0.7) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 0.75rem 1rem !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

body.light-mode table.dataTable thead th {
  background: rgba(0, 0, 0, 0.04) !important;
  color: #334155 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

table.dataTable tbody td {
  padding: 0.85rem 1rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  vertical-align: middle !important;
}

body.light-mode table.dataTable tbody td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
  color: #1e293b !important;
}

table.dataTable tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

body.light-mode table.dataTable tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.03) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 0.5rem !important;
  padding: 0.35rem 0.75rem !important;
  color: inherit !important;
  border: 1px solid transparent !important;
  cursor: pointer;
  margin: 0 2px;
  font-size: 0.75rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--brand-accent) !important;
  color: #0f172a !important;
  font-weight: 800 !important;
  border-color: var(--brand-accent) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

body.light-mode .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: rgba(0, 0, 0, 0.08) !important;
  color: #0f172a !important;
}

.dataTables_wrapper .dataTables_processing {
  background: rgba(2, 6, 23, 0.9) !important;
  color: var(--brand-accent) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 1rem !important;
  padding: 1rem 2rem !important;
  font-weight: 700 !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 50;
}

body.light-mode .dataTables_wrapper .dataTables_processing {
  background: rgba(255, 255, 255, 0.95) !important;
  color: #b45309 !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ========================================================= */
/* RESPONSIVE UTILITIES (PC, TABLET, MOBILE)                 */
/* ========================================================= */
@media (max-width: 768px) {
  .turntable-mobile {
    width: 170px !important;
    height: 170px !important;
  }
  
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    float: none !important;
    text-align: left !important;
    margin-bottom: 0.5rem;
  }
  
  .dataTables_wrapper .dataTables_filter input {
    width: 100% !important;
    margin-left: 0 !important;
    margin-top: 0.25rem;
  }
  
  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    float: none !important;
    text-align: center !important;
    margin-top: 0.75rem;
  }
}

/* Floating WhatsApp Button Widget (WA Melayang) */
.floating-wa-btn {
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.45), 0 8px 10px -6px rgba(16, 185, 129, 0.35);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-wa-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 20px 30px -10px rgba(16, 185, 129, 0.55), 0 12px 14px -6px rgba(16, 185, 129, 0.4);
}

.floating-wa-btn .pulse-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 9999px;
  background-color: rgba(34, 197, 94, 0.35);
  animation: wa-pulse 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes wa-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  70% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* ========================================================= */
/* MOBILE ZOOM RESTRICTION & TOUCH / RESPONSIVE ENHANCEMENTS  */
/* ========================================================= */
html, body {
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

button, a, input, select, textarea, label, [role="button"] {
  touch-action: manipulation;
}

/* Prevent auto-zooming on mobile iOS Safari when clicking form inputs */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  input[type="tel"],
  input[type="url"],
  input[type="search"],
  input[type="time"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* DataTables pagination wrapping on mobile and tablets */
@media screen and (max-width: 768px) {
  .dataTables_wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dataTables_wrapper .dataTables_paginate {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
    margin-top: 0.75rem !important;
  }

  .dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.3rem 0.55rem !important;
    font-size: 0.75rem !important;
    margin: 1px !important;
  }
}

