/* Liberium CMS - Web Radio & Studio Live Styles */

body.has-radio-bar {
  padding-bottom: 78px;
}

/* Floating Bottom Radio Bar */
.cms-radio-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.45);
  z-index: 9999;
  display: flex;
  align-items: center;
}

.cms-radio-bar-container {
  max-width: var(--max-width, 1200px);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cms-radio-bar-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.cms-radio-bar-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-color, #2563eb);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, background-color 0.15s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.cms-radio-bar-play:hover {
  background: var(--primary-hover, #1d4ed8);
  transform: scale(1.06);
}

.cms-radio-bar-play:active {
  transform: scale(0.96);
}

.cms-radio-bar-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cms-radio-bar-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cms-radio-bar-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #f8fafc);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cms-radio-bar-status {
  font-size: 0.75rem;
  color: var(--text-secondary, #94a3b8);
}

.cms-live-badge-mini {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.cms-live-badge-mini.is-live {
  background: #dc2626;
  color: #fff;
  animation: pulse-live 2s infinite ease-in-out;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.03); }
}

.cms-radio-bar-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.cms-radio-volume-box {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cms-radio-mute-btn {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-secondary, #94a3b8);
  padding: 0.25rem;
}

.cms-radio-volume-slider {
  width: 90px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.cms-radio-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.cms-radio-bar-autoplay {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  user-select: none;
}

.cms-radio-bar-autoplay input[type="checkbox"] {
  accent-color: var(--primary-color, #2563eb);
  cursor: pointer;
}

/* Dedicated Radio Page / Studio View */
.cms-radio-page {
  max-width: 800px;
  margin: 0 auto;
}

.cms-live-badge-container {
  margin-bottom: 0.75rem;
}

.cms-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(30, 41, 59, 0.8);
  color: var(--text-secondary, #94a3b8);
  border: 1px solid var(--border-color, #334155);
}

.cms-live-badge.is-live {
  background: rgba(220, 38, 38, 0.15);
  color: #ef4444;
  border-color: rgba(220, 38, 38, 0.4);
}

.cms-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.cms-live-badge.is-live .cms-live-dot {
  animation: pulse-live 1.2s infinite ease-in-out;
}

.cms-radio-card {
  background: var(--surface-color, #1e293b);
  border: 1px solid var(--border-color, #334155);
  border-radius: var(--radius, 12px);
  padding: 2.5rem 2rem;
  text-align: center;
  margin-top: 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.cms-radio-card-offline {
  border-style: dashed;
}

.cms-radio-offline-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

/* Audio Visualizer Waves */
.cms-radio-visualizer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 50px;
  margin: 1.5rem auto 2.5rem;
}

.cms-radio-visualizer .bar {
  width: 6px;
  height: 8px;
  background: var(--primary-color, #2563eb);
  border-radius: 3px;
  transition: height 0.2s ease;
}

.cms-radio-visualizer.is-playing .bar {
  animation: wave 1.2s infinite ease-in-out alternate;
}

.cms-radio-visualizer.is-playing .bar-1 { animation-delay: 0.1s; }
.cms-radio-visualizer.is-playing .bar-2 { animation-delay: 0.3s; }
.cms-radio-visualizer.is-playing .bar-3 { animation-delay: 0.2s; }
.cms-radio-visualizer.is-playing .bar-4 { animation-delay: 0.4s; }
.cms-radio-visualizer.is-playing .bar-5 { animation-delay: 0.25s; }
.cms-radio-visualizer.is-playing .bar-6 { animation-delay: 0.35s; }
.cms-radio-visualizer.is-playing .bar-7 { animation-delay: 0.15s; }
.cms-radio-visualizer.is-playing .bar-8 { animation-delay: 0.45s; }

@keyframes wave {
  0% { height: 8px; }
  50% { height: 44px; }
  100% { height: 16px; }
}

.btn-radio-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-radio-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.55);
}

.btn-radio-large:active {
  transform: translateY(1px);
}

.cms-radio-options {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color, #334155);
}

.cms-radio-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary, #f8fafc);
  cursor: pointer;
  user-select: none;
}

.cms-radio-hint {
  font-size: 0.85rem;
  color: var(--text-secondary, #94a3b8);
  margin-top: 0.75rem;
}

@media (max-width: 640px) {
  .cms-radio-bar-controls {
    display: none;
  }
  .cms-radio-bar {
    height: 60px;
  }
  body.has-radio-bar {
    padding-bottom: 68px;
  }
}
