/* ================================================================
   StreamNes Core — Bug Fixes & Enhancements Layer
   Base design comes from style-main.css (original glassmorphism)
   This file ONLY adds fixes and enhancements on top
   ================================================================ */

/* ----- Sidebar: prevent stretching to full page height ----- */
#menu-content {
    align-self: flex-start !important;
}

/* ----- Station player heading: limit size, prevent overflow ----- */
.channel-heading h1 {
    font-size: 22px !important;
    font-weight: 800 !important;
    margin: 0 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.3 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ----- Mobile menu button ----- */
#menu-opener {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    outline: none !important;
}

#menu-opener svg {
    width: 24px !important;
    height: 24px !important;
    fill: var(--text-primary) !important;
}

/* ----- Action icon dimensions (prevent oversized SVGs) ----- */
.random-icon {
    width: 20px !important;
    height: 20px !important;
}

.share-icon {
    width: 18px !important;
    height: 18px !important;
}

.heart-icon {
    width: 20px !important;
    height: 20px !important;
}

.report-icon {
    width: 20px !important;
    height: 20px !important;
}

.mute-icon, .unmute-icon {
    width: 16px !important;
    height: 16px !important;
}

.vote-icon {
    width: 16px !important;
    height: 16px !important;
}

/* ----- Content body (blog posts, custom pages) readability ----- */
.channel-body, .content-body {
    color: var(--text-secondary) !important;
    line-height: 1.7 !important;
    padding: 1.5rem !important;
}

.content-body p, .content-body span, .content-body li {
    color: var(--text-secondary) !important;
    font-size: 15px;
    line-height: 1.8;
}

.content-body h1, .content-body h2, .content-body h3, .content-body h4 {
    color: var(--text-primary) !important;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.content-body h1 { font-size: 24px; margin-top: 0; }
.content-body h2 { font-size: 20px; }
.content-body h3 { font-size: 17px; }

.content-body a { color: var(--primary-accent) !important; }
.content-body a:hover { color: #818cf8 !important; }

/* ----- FAQ collapsed accordion fix (transparent background) ----- */
.faqs .accordion-button.collapsed {
    background-color: transparent !important;
    color: var(--text-secondary) !important;
}

.faqs .accordion-button:not(.collapsed) {
    background-color: rgba(99, 102, 241, 0.06) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.faqs .accordion-body {
    background-color: rgba(255, 255, 255, 0.01) !important;
    color: var(--text-secondary) !important;
}

/* ----- Footer: clean, stays at bottom ----- */
.ft-wrapper {
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* ----- Form controls for dark theme ----- */
.form-control, .form-select {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-accent) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
}

/* ----- Responsive: Mobile ----- */
@media (max-width: 768px) {
    .channel-heading h1 {
        font-size: 18px !important;
    }

    .player {
        padding: 12px !important;
    }

    .jp-controls svg {
        width: 48px !important;
        height: 48px !important;
        padding: 13px;
    }
}

@media (max-width: 480px) {
    .channel-heading h1 {
        font-size: 16px !important;
    }
}

/* ----- Station card title on homepage ----- */
.st-title {
    display: block;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary) !important;
    margin-top: 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    transition: color 0.2s ease;
}

a:hover .st-title {
    color: var(--primary-accent) !important;
}

/* ================================================================
   Accessibility & Color Contrast Enhancements (WCAG Compliance)
   ================================================================ */
.text-secondary, .text-muted {
    color: #b3b9c4 !important;
}

/* Lighter, higher contrast link and accent overrides on dark bg */
:root {
    --text-secondary: #b3b9c4;
    --primary-accent: #818cf8;
}

a {
    color: #818cf8;
}

a:hover {
    color: #a5b4fc;
}
