/**
 * Shenidar (شنیدار) - Responsive RTL Broadcast Player Stylesheet
 */
.shenidar-tts-player {
    font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
    direction: rtl;
    text-align: right;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.shenidar-tts-player.theme-slate-dark {
    background: #0f172a;
    color: #f8fafc;
    border-color: #1e293b;
}

.shenidar-tts-player.theme-clean-light {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
}

.shenidar-tts-player.theme-editorial-blue {
    background: #eff6ff;
    color: #1e3a8a;
    border-color: #bfdbfe;
}

.shenidar-mode-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.shenidar-mode-caption {
    font-size: 11px;
    font-weight: 700;
    opacity: 0.85;
}

.shenidar-mode-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(148, 163, 184, 0.14);
    padding: 3px;
    border-radius: 8px;
}

.shenidar-mode-btn {
    border: none;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.78;
    transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.shenidar-mode-btn.is-active {
    background: var(--shenidar-accent, #2563eb);
    color: #ffffff;
    opacity: 1;
}

.shenidar-summary-box {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 12px;
    line-height: 1.75;
}

.shenidar-summary-badge {
    display: inline-block;
    margin-left: 6px;
    color: var(--shenidar-accent, #2563eb);
}

.shenidar-main-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.shenidar-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--shenidar-accent, #2563eb);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.15s ease;
}

.shenidar-play-btn:hover {
    opacity: 0.92;
}

.shenidar-play-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.shenidar-info-col {
    flex: 1;
    min-width: 0;
}

.shenidar-header-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.shenidar-title {
    font-size: 14px;
    font-weight: 700;
}

.shenidar-status-label {
    font-size: 11px;
    opacity: 0.85;
}

.shenidar-progress-wrap {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.shenidar-waveform {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 3px;
    height: 30px;
    padding: 4px 6px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.12);
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
}

.shenidar-wave-bar {
    flex: 1;
    min-width: 2px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.42);
    transition: height 0.075s linear, background-color 0.12s ease, opacity 0.12s ease;
}

.shenidar-wave-bar.is-played {
    background: var(--shenidar-accent, #2563eb);
}

.shenidar-seek {
    width: 100%;
    accent-color: var(--shenidar-accent, #2563eb);
    cursor: pointer;
    height: 5px;
}

.shenidar-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-family: monospace;
    opacity: 0.75;
    direction: ltr;
}

.shenidar-controls-col {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.shenidar-voice-switcher,
.shenidar-speed-btn,
.shenidar-download-btn {
    background: rgba(148, 163, 184, 0.16);
    color: inherit;
    text-decoration: none !important;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.shenidar-tts-player.theme-slate-dark .shenidar-voice-switcher option {
    background: #0f172a;
    color: #f8fafc;
}

@media (max-width: 520px) {
    .shenidar-tts-player {
        padding: 14px;
        margin: 14px 0;
        border-radius: 10px;
    }

    .shenidar-main-row {
        flex-wrap: wrap;
        gap: 12px;
    }

    .shenidar-play-btn {
        width: 44px;
        height: 44px;
    }

    .shenidar-header-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .shenidar-controls-col {
        width: 100%;
        justify-content: space-between;
        padding-top: 8px;
        border-top: 1px solid rgba(148, 163, 184, 0.18);
    }
}
