/* Web Radio Player — компактне оформлення в стилі віджета погоди (Dnipro) */
.web-radio-player {
    --main-color: #0d47a1;
    --main-color-soft: #5c6bc0;
    --border-color: #e3e7f0;
    --surface: #ffffff;
    --surface-alt: #f8f9ff;
    --btn-bg: #eef1f7;
    --btn-bg-hover: #e3e7f0;
    --danger: #e53935;

    width: 100%;
    max-width: 300px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(13, 71, 161, 0.1);
    margin: 0 auto;
    box-sizing: border-box;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--main-color);
}

.web-radio-player *,
.web-radio-player *::before,
.web-radio-player *::after {
    box-sizing: border-box;
}

.web-radio-player.compact {
    max-width: 260px;
    padding: 8px;
}

/* Заголовок */
.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--main-color);
}

.player-header h3 {
    margin: 0;
    color: var(--main-color);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Контроль гучності */
.volume-control {
    display: flex;
    align-items: center;
    width: 90px;
}

.volume-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--main-color);
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border: none;
    border-radius: 50%;
    background: var(--main-color);
    cursor: pointer;
}

/* Список радіостанцій */
.stations-list {
    max-height: 220px;
    overflow-y: auto;
    margin-bottom: 8px;
}

.station-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    margin-bottom: 5px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--main-color);
    border-radius: 6px;
    cursor: pointer;
}

.station-item:hover {
    background: var(--surface-alt);
}

.station-item.playing {
    background: var(--surface-alt);
}

.station-item.loading .station-name::after {
    content: ' …';
    color: var(--main-color-soft);
}

.station-name {
    font-weight: 600;
    font-size: 12px;
    color: var(--main-color);
}

/* Квадратні кнопки зі скругленням, світло-сірі, акцент на іконці */
.play-btn,
.ctrl-btn {
    flex: 0 0 auto;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--btn-bg);
    color: var(--main-color);
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.play-btn:hover,
.ctrl-btn:hover {
    background: var(--btn-bg-hover);
}

.play-btn:focus-visible,
.ctrl-btn:focus-visible {
    outline: 2px solid var(--main-color-soft);
    outline-offset: 2px;
}

.play-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.play-btn .play-icon {
    color: var(--main-color);
    font-weight: 700;
}

.play-btn.playing .play-icon {
    color: var(--main-color);
}

/* Основні контроли */
.player-controls {
    background: var(--surface-alt);
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 8px;
}

.current-track {
    text-align: center;
    margin-bottom: 8px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    color: var(--main-color-soft);
    font-weight: 500;
}

.track-info {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.ctrl-btn {
    width: 34px;
    height: 34px;
    font-size: 15px;
}

.stop-btn {
    color: var(--danger);
}

.mute-btn {
    color: var(--main-color-soft);
}

/* Мобільна адаптація */
@media (max-width: 768px) {
    .web-radio-player {
        max-width: 100%;
    }

    .player-header {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .volume-control {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .player-header h3 {
        font-size: 13px;
    }
}

/* Скролбар */
.stations-list::-webkit-scrollbar {
    width: 6px;
}

.stations-list::-webkit-scrollbar-track {
    background: var(--surface-alt);
    border-radius: 3px;
}

.stations-list::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 3px;
}
