/**
 * Radiospeler Widget CSS
 * Met dynamische themakleur en consistente styling
 */

:root {
    --theme-color: #3498db;
    --theme-dark: #2980b9;
}

/* Basis styling voor ALLE widgets */
.radiospeler-universal-widget {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

/* De container van de WordPress widget */
.widget_radiospeler_widget {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* De container van het Gutenberg block */
.wp-block-radiospeler-widget {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* Shortcode container */
.radiospeler-mini-widget-shortcode {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* Zorg dat de widget zijn eigen padding behoudt */
.widget_radiospeler_widget .radiospeler-universal-widget,
.wp-block-radiospeler-widget .radiospeler-universal-widget,
.radiospeler-mini-widget-shortcode .radiospeler-universal-widget {
    margin: 0;
    width: 100%;
}

/* Titel van de widget (als die is ingevuld) */
.radiospeler-universal-widget .widget-title {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 600;
    padding: 0;
}

/* Cover container */
.radiospeler-universal-widget .radiospeler-mini-cover {
    width: 100%;
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1/1;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radiospeler-universal-widget .radiospeler-mini-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.radiospeler-universal-widget .cover-placeholder {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
}

/* Metadata */
.radiospeler-universal-widget .radiospeler-mini-metadata {
    text-align: center;
    margin-bottom: 16px;
    min-height: 60px;
}

.radiospeler-universal-widget .widget-artist-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 1rem;
    line-height: 1.3;
}

.radiospeler-universal-widget .widget-show-name {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-style: italic;
    margin-top: 4px;
    display: none; /* Wordt via JS zichtbaar */
}

/* Live indicator */
.radiospeler-universal-widget .widget-live-indicator {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 8px 0 0;
}

.radiospeler-universal-widget .live-dot {
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.radiospeler-universal-widget .live-text {
    font-size: 0.8rem;
    color: #e74c3c;
    font-weight: 500;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

/* ðµ Verbeterde knop met icoon en hover effect */
.radiospeler-universal-widget .widget-play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 12px;
    background: var(--theme-color);
    color: white;
    border: none;
    border-radius: 50px;  /* Meer afgeronde hoeken voor moderne look */
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.radiospeler-universal-widget .widget-play-btn:hover {
    background: var(--theme-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.radiospeler-universal-widget .widget-play-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.radiospeler-universal-widget .play-icon {
    width: 22px;
    height: 22px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.radiospeler-universal-widget .widget-play-btn:hover .play-icon {
    transform: scale(1.15) translateX(2px);
}

.radiospeler-universal-widget .play-text {
    transition: transform 0.3s ease;
}

.radiospeler-universal-widget .widget-play-btn:hover .play-text {
    transform: scale(1.02);
}

/* Optioneel: extra glans effect bij hover */
.radiospeler-universal-widget .widget-play-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    transition: transform 0.5s ease;
}

.radiospeler-universal-widget .widget-play-btn:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Responsive aanpassingen */
@media (max-width: 480px) {
    .radiospeler-universal-widget .widget-play-btn {
        padding: 12px;
        font-size: 0.95rem;
        border-radius: 40px;
    }
    
    .radiospeler-universal-widget .play-icon {
        width: 20px;
        height: 20px;
    }
}

.radiospeler-mini-cover {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.radiospeler-mini-cover:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
