/*
 * Template Name: Clean Broadcast
 * Description: Professional broadcast studio design. Modern, minimal, and confident.
 */

/* === Foundation === */

.imon-station-page {
    --imon-bg: #fafafa;
    --imon-surface: #ffffff;
    --imon-surface-2: #f3f4f6;
    --imon-text: #111827;
    --imon-text-muted: #6b7280;
    --imon-border: #e5e7eb;
    --imon-glow: var(--imon-accent, #2563eb);
    --imon-player-bg: #111827;
    font-family: var(--imon-font-body, 'Inter', sans-serif);
    color: var(--imon-text);
    background: var(--imon-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* === Live Badge === */

.imon-live-badge {
    position: fixed;
    top: 35px;
    right: 20px;
    z-index: 1001;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: #fff;
    color: var(--imon-text-muted);
    border: 1px solid var(--imon-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.imon-live-badge.live {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}

.imon-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.imon-live-badge.live .imon-live-dot {
    animation: imon-pulse-dot 1.5s ease-in-out infinite;
}

@keyframes imon-pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* === Container === */

.imon-container {
    max-width: 1120px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

/* === Hero Header === */

.imon-hero {
    background: var(--imon-player-bg, #111827);
    color: #fff;
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* Gradient overlay — deepened when images are present */
.imon-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), transparent 60%),
                linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.4));
    z-index: 2;
}

.imon-hero.imon-hero-has-images::before {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), transparent 50%),
                linear-gradient(to bottom, transparent 30%, rgba(0, 0, 0, 0.5));
}

/* Slideshow container */
.imon-hero-slider {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.imon-hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    mix-blend-mode: var(--imon-hero-blend, multiply);
}

.imon-hero-slide.imon-slide-active {
    opacity: 1;
}

.imon-hero-inner {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    min-height: 380px;
    padding: 64px 0;
}

.imon-hero-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.imon-logo {
    max-width: 80px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.imon-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.imon-station-name {
    font-family: var(--imon-font-heading, 'Inter', sans-serif);
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0;
}

.imon-station-tagline {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    max-width: 420px;
    line-height: 1.6;
}

.imon-hero-player {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

/* === Main Content === */

.imon-main {
    padding: 48px 0 80px;
}

.imon-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
}

.imon-primary {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.imon-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    position: sticky;
    top: 24px;
}

/* === Widget Base === */

.imon-widget {
    background: var(--imon-surface);
    border: 1px solid var(--imon-border);
    border-radius: 16px;
    padding: 28px;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    animation: imon-fade-up 0.5s ease-out both;
}

.imon-widget-title {
    font-family: var(--imon-font-heading, 'Inter', sans-serif);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--imon-text-muted);
    margin: 0 0 20px;
}

@keyframes imon-fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.imon-primary > :nth-child(1) { animation-delay: 0.05s; }
.imon-primary > :nth-child(2) { animation-delay: 0.1s; }
.imon-primary > :nth-child(3) { animation-delay: 0.15s; }
.imon-primary > :nth-child(4) { animation-delay: 0.2s; }
.imon-sidebar > :nth-child(1) { animation-delay: 0.12s; }
.imon-sidebar > :nth-child(2) { animation-delay: 0.18s; }

/* === Now Playing === */

.imon-now-playing {
    border-left: 4px solid var(--imon-accent, #2563eb);
}

.imon-now-playing-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.imon-track-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.imon-track-title {
    font-family: var(--imon-font-heading, 'Inter', sans-serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--imon-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.imon-track-artist {
    font-size: 0.9rem;
    color: var(--imon-text-muted);
}

.imon-track-album {
    font-size: 0.85rem;
    color: var(--imon-text-muted);
    opacity: 0.8;
}

.imon-track-album-artist {
    font-size: 0.78rem;
    color: var(--imon-text-muted);
    opacity: 0.7;
}

.imon-track-year {
    font-size: 0.75rem;
    color: var(--imon-text-muted);
    opacity: 0.7;
}

.imon-track-contributing-artist {
    font-size: 0.75rem;
    color: var(--imon-text-muted);
    opacity: 0.7;
}

/* === Listener Count === */

.imon-listener-count {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.imon-listener-inner {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap:wrap;
}

.imon-listener-number {
    font-family: var(--imon-font-heading, 'Inter', sans-serif);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--imon-text);
    line-height: 1;
}

.imon-listener-label {
    font-size: 0.85rem;
    color: var(--imon-text-muted);
    font-weight: 500;
}

.imon-listener-peak {
    text-align: right;
    font-size: 0.78rem;
    color: var(--imon-text-muted);
}

.imon-peak-label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.6;
    margin-bottom: 2px;
}

.imon-peak-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--imon-text);
}

/* === Bio === */

.imon-bio-text,
.imon-bio .imon-bio-content {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--imon-text);
}

.imon-bio-text p,
.imon-bio .imon-bio-content p {
    margin: 0 0 12px;
}

.imon-bio .imon-bio-content a {
    color: var(--imon-accent, #2563eb);
    text-decoration: underline;
}

/* === Gallery === */

.imon-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.imon-gallery-item {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
}

.imon-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.imon-gallery-item:hover img {
    transform: scale(1.06);
}

/* === Lightbox === */

.imon-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.imon-lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    object-fit: contain;
}

.imon-lightbox-close,
.imon-lightbox-prev,
.imon-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.imon-lightbox-close:hover,
.imon-lightbox-prev:hover,
.imon-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.imon-lightbox-close { top: 20px; right: 20px; }
.imon-lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.imon-lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

.imon-lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* === Subscribe Form === */

.imon-subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.imon-subscribe-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.imon-subscribe-form input[type="text"],
.imon-subscribe-form input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--imon-border);
    border-radius: 10px;
    font-size: 0.9rem;
    background: var(--imon-surface-2);
    color: var(--imon-text);
    outline: none;
    transition: border-color 0.2s;
}

.imon-subscribe-form input:focus {
    border-color: var(--imon-accent, #2563eb);
}

.imon-subscribe-form button {
    padding: 12px 24px;
    background: var(--imon-accent, #2563eb);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.imon-subscribe-form button:hover {
    opacity: 0.9;
}

.imon-subscribe-label,
.imon-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--imon-text-muted);
    line-height: 1.5;
}

.imon-checkbox input {
    margin-top: 3px;
    flex-shrink: 0;
}

.imon-subscribe-msg {
    font-size: 0.85rem;
    padding: 10px 14px;
    border-radius: 8px;
}

.imon-subscribe-msg.success {
    background: #ecfdf5;
    color: #059669;
}

.imon-subscribe-msg.error {
    background: #fef2f2;
    color: #dc2626;
}

/* === Social Links === */

.imon-social-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.imon-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--imon-surface-2);
    border: 1px solid var(--imon-border);
    color: var(--imon-text-muted);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 700;
    transition: all 0.2s;
}

.imon-social-link:hover {
    background: var(--imon-accent, #2563eb);
    color: #fff;
    border-color: var(--imon-accent, #2563eb);
}

/* === Survey === */

.imon-survey-question {
    font-family: var(--imon-font-heading, 'Inter', sans-serif);
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--imon-text);
}

.imon-survey-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.imon-survey-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid var(--imon-border);
    border-radius: 10px;
    background: var(--imon-surface);
    cursor: pointer;
    overflow: hidden;
    font-size: 0.88rem;
    color: var(--imon-text);
    transition: border-color 0.2s;
}

.imon-survey-option:hover {
    border-color: var(--imon-accent, #2563eb);
}

.imon-survey-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: color-mix(in srgb, var(--imon-accent, #2563eb) 10%, transparent);
    transition: width 0.4s ease;
    border-radius: 10px;
}

.imon-survey-option-label {
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.imon-survey-option-pct {
    position: relative;
    z-index: 1;
    font-size: 0.78rem;
    color: var(--imon-text-muted);
    font-weight: 600;
}

.imon-survey-placeholder {
    color: var(--imon-text-muted);
    font-size: 0.88rem;
    font-style: italic;
}

/* === Survey Modal === */

.imon-survey-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.imon-survey-modal-open {
    display: flex;
}

.imon-survey-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.imon-survey-modal-content {
    position: relative;
    background: var(--imon-surface);
    border-radius: 20px;
    padding: 36px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
}

.imon-survey-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--imon-text-muted);
    cursor: pointer;
    line-height: 1;
}

/* === Schedule === */

.imon-schedule-day {
    margin-bottom: 20px;
}

.imon-schedule-day-name {
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--imon-text-muted);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--imon-border);
}

.imon-schedule-item {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 8px 0;
}

.imon-schedule-time {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--imon-accent, #2563eb);
    white-space: nowrap;
    min-width: 100px;
}

.imon-schedule-show {
    font-size: 0.9rem;
    color: var(--imon-text);
}

/* === Episode Archive === */

.imon-episode-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.imon-episode-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: var(--imon-surface-2);
    border-radius: 12px;
    transition: background 0.2s;
}

.imon-episode-item:hover {
    background: var(--imon-border);
}

.imon-episode-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--imon-text);
}

.imon-episode-date {
    font-size: 0.78rem;
    color: var(--imon-text-muted);
}

/* === Sticky Bar === */

.imon-sticky-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
    padding: 10px 0;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    pointer-events: none;
}

.imon-sticky-bar.imon-sticky-visible {
    transform: translateY(0);
    pointer-events: auto;
}

.imon-sticky-bar-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.imon-sticky-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.imon-sticky-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.imon-sticky-name {
    font-family: var(--imon-font-heading, 'Inter', sans-serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--imon-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.imon-sticky-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

.imon-sticky-play {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--imon-accent, #2563eb);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.imon-sticky-play:hover {
    transform: scale(1.1);
}

.imon-sticky-eq {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
}

.imon-sticky-eq span {
    display: block;
    width: 3px;
    border-radius: 1px;
    background: #fff;
    animation: imon-sticky-eq 1s ease-in-out infinite;
}

.imon-sticky-eq span:nth-child(1) { height: 60%; animation-delay: 0s; }
.imon-sticky-eq span:nth-child(2) { height: 100%; animation-delay: 0.15s; }
.imon-sticky-eq span:nth-child(3) { height: 40%; animation-delay: 0.3s; }
.imon-sticky-eq span:nth-child(4) { height: 80%; animation-delay: 0.45s; }
.imon-sticky-eq span:nth-child(5) { height: 50%; animation-delay: 0.6s; }

@keyframes imon-sticky-eq {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

.imon-sticky-poll-link {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--imon-accent, #2563eb);
    text-decoration: none;
    white-space: nowrap;
}

/* === Footer === */

.imon-footer {
    padding: 32px 0;
    text-align: center;
    font-size: 0.78rem;
    color: var(--imon-text-muted);
    border-top: 1px solid var(--imon-border);
}

.imon-footer a {
    color: var(--imon-accent, #2563eb);
    text-decoration: none;
}

/* === Responsive === */

@media (max-width: 900px) {
    .imon-hero-inner {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 48px 0;
        min-height: auto;
    }

    .imon-grid {
        grid-template-columns: 1fr;
    }

    .imon-sidebar {
        position: static;
    }

    .imon-station-name {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .imon-sticky-name {
        display: none;
    }
}

@media (max-width: 480px) {
    .imon-container {
        padding: 0 16px;
    }

    .imon-widget {
        padding: 20px;
        border-radius: 12px;
        overflow: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .imon-track-title {
        font-size: 1.1rem;
    }

    .imon-bio-text,
    .imon-bio .imon-bio-content {
        font-size: 0.88rem;
    }

    .imon-listener-count {
        flex-wrap: wrap;
    }

    .imon-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .imon-listener-number {
        font-size: 2.2rem;
    }

    .imon-live-badge {
        top: 12px;
        right: 12px;
    }
}
