/* ============================================================
   WLRE 96.5 FM - Homepage Custom Theme & Admin Role Isolation
   Ported & Enhanced from /var/azuracast/homepage template
   ============================================================ */

:root {
  --wlre-bg-dark: #0f1015;
  --wlre-bg-card: #181920;
  --wlre-bg-card-hover: #22232c;
  --wlre-bg-elevated: #282a36;
  --wlre-border: #2e303d;
  --wlre-border-subtle: rgba(255, 255, 255, 0.08);
  --wlre-primary: #f59e0b;
  --wlre-primary-hover: #fbbf24;
  --wlre-primary-glow: rgba(245, 158, 11, 0.35);
  --wlre-accent: #ef4444;
  --wlre-accent-glow: rgba(239, 68, 68, 0.4);
  --wlre-success: #10b981;
  --wlre-text: #f8fafc;
  --wlre-text-muted: #94a3b8;
  --wlre-radius: 14px;
}

html, body, #page_wrapper, #inner_wrapper {
  background-color: var(--wlre-bg-dark) !important;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.09) 0%, transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(217, 119, 6, 0.07) 0%, transparent 40%) !important;
  color: var(--wlre-text) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

.service-group-name {
  color: var(--wlre-primary) !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  font-size: 0.92rem !important;
  border-bottom: 2px solid rgba(245, 158, 11, 0.25);
  padding-bottom: 4px;
  margin-bottom: 10px;
}

.service, [class*="bg-theme-100"], [class*="dark:bg-white/5"] {
  background-color: var(--wlre-bg-card) !important;
  border: 1px solid var(--wlre-border) !important;
  border-radius: var(--wlre-radius) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.service:hover {
  background-color: var(--wlre-bg-card-hover) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.65), 0 0 14px 0 var(--wlre-primary-glow) !important;
}

.service-name {
  color: var(--wlre-text) !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
}

.service-description {
  color: var(--wlre-text-muted) !important;
  font-size: 0.82rem !important;
}

/* ADMIN ACCESS CONTROL */
body:not(.is-admin) .wlre-admin-only,
body:not(.is-admin) #widget-resources-wrapper {
  display: none !important;
}

body.is-admin .wlre-admin-only {
  display: block !important;
  border: 1px dashed rgba(245, 158, 11, 0.4);
  padding: 10px;
  border-radius: var(--wlre-radius);
  margin-bottom: 20px;
}

/* Audio Player Bar */
#wlre-player-bar {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: rgba(15, 16, 21, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(245, 158, 11, 0.35);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  flex-wrap: wrap;
}

.wlre-brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.wlre-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #d97706, #b45309);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  font-size: 1.2rem;
}

.wlre-station-name {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wlre-live-badge {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.6);
  color: #ef4444;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.wlre-live-dot {
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  animation: wlrePulse 1.6s infinite ease-in-out;
}

@keyframes wlrePulse {
  0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.wlre-track-title {
  font-size: 0.85rem;
  color: var(--wlre-primary);
  font-weight: 500;
  max-width: 400px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wlre-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wlre-play-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f1015;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.5);
  transition: all 0.2s ease;
}

.wlre-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.8);
}

.wlre-vol-slider {
  accent-color: var(--wlre-primary);
  width: 75px;
  cursor: pointer;
}

.wlre-nav-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--wlre-border);
  color: var(--wlre-text);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.wlre-nav-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--wlre-primary);
  color: var(--wlre-primary);
}

.wlre-admin-toggle {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--wlre-primary);
}

.wlre-admin-active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.5);
  color: #10b981;
}

/* Frontpage Video & Sponsor Section */
#wlre-frontpage-spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px auto;
  max-width: 1400px;
  padding: 0 16px;
}

@media (max-width: 960px) {
  #wlre-frontpage-spotlight {
    grid-template-columns: 1fr;
  }
}

.wlre-spotlight-box {
  background: var(--wlre-bg-card);
  border: 1px solid var(--wlre-border);
  border-radius: var(--wlre-radius);
  padding: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
}

.wlre-spotlight-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.wlre-spotlight-tag {
  color: var(--wlre-primary);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wlre-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--wlre-border);
}

.wlre-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wlre-sponsor-info {
  margin-top: 12px;
}

.wlre-sponsor-title {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.wlre-sponsor-desc {
  color: var(--wlre-text-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.wlre-form-title {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.wlre-form-subtitle {
  color: var(--wlre-text-muted);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.wlre-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

@media (max-width: 600px) {
  .wlre-form-grid {
    grid-template-columns: 1fr;
  }
}

.wlre-input, .wlre-select, .wlre-textarea {
  width: 100%;
  background: #101117;
  border: 1px solid var(--wlre-border);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.wlre-input:focus, .wlre-select:focus, .wlre-textarea:focus {
  border-color: var(--wlre-primary);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.wlre-textarea {
  margin-bottom: 12px;
  resize: vertical;
}

.wlre-btn-submit {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f1015;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.wlre-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.5);
}

.wlre-form-status {
  margin-top: 10px;
  padding: 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  display: none;
}

.wlre-form-status.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.wlre-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.wlre-modal-content {
  background: var(--wlre-bg-card);
  border: 1px solid var(--wlre-border);
  border-radius: var(--wlre-radius);
  max-width: 520px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8);
  position: relative;
}

.wlre-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--wlre-text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}
