/* ===== Radio Widget Styles ===== */

.radio-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    font-family: inherit;
}

/* Плавающая кнопка */
.radio-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.radio-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.radio-toggle-btn .radio-icon {
    font-size: 28px;
    z-index: 2;
}

/* Пульсирующий эффект */
.radio-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    70% {
        transform: scale(1.3);
        opacity: 0;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* Скрытая кнопка когда панель открыта */
.radio-widget.expanded .radio-toggle-btn {
    display: none;
}

/* Панель плеера */
.radio-player-panel {
    display: none;
    width: 280px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 16px;
    padding: 16px;
    color: white;
    box-shadow: 0 8px 32px rgba(30, 60, 114, 0.4);
    animation: slideUp 0.3s ease;
}

.radio-widget.expanded .radio-player-panel {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Заголовок */
.radio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.radio-title {
    font-size: 16px;
    font-weight: 600;
}

.radio-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.radio-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Статус */
.radio-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    opacity: 0.9;
}

.radio-status-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

.radio-status-text::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.radio-listeners {
    font-size: 12px;
    opacity: 0.8;
}

/* Управление */
.radio-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.radio-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.radio-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.radio-play-btn i {
    font-size: 24px;
    color: #1e3c72;
    margin-left: 2px;
}

.radio-play-btn.playing i::before {
    content: "\F4C3";
}

/* Громкость */
.radio-volume-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.radio-volume-icon {
    font-size: 16px;
    opacity: 0.8;
}

.radio-volume {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
}

.radio-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.radio-volume::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Время эфира */
.radio-time-info {
    text-align: center;
    font-size: 11px;
    opacity: 0.6;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
}

/* Мобильная адаптация */
@media (max-width: 576px) {
    .radio-widget {
        bottom: 15px;
        right: 15px;
    }

    .radio-toggle-btn {
        width: 52px;
        height: 52px;
    }

    .radio-toggle-btn .radio-icon {
        font-size: 24px;
    }

    .radio-player-panel {
        width: 260px;
        padding: 14px;
    }

    .radio-title {
        font-size: 14px;
    }

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

    .radio-play-btn i {
        font-size: 20px;
    }
}


/* Кнопка открытия в отдельном окне */
.radio-popup-link {
    margin-bottom: 12px;
    text-align: center;
}

.radio-popup-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    padding: 8px 14px;
    color: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-popup-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.radio-popup-btn i {
    font-size: 14px;
}

.radio-popup-hint {
    display: block;
    margin-top: 6px;
    font-size: 10px;
    opacity: 0.6;
    line-height: 1.3;
}
