/*
 * DanzeCaraibiche.com - Custom Styles
 * ------------------------------------
 * This file contains custom CSS rules that supplement the Tailwind CSS framework.
 * It includes base styles, custom utility classes, and specific overrides for third-party widgets.
 */

/* -- Global & Base Styles -- */

body {
    background-color: #001219;
    color: #f3f4f6;
    /* Base font families are set in header.php via Google Fonts and Tailwind config */
}

html {
    scroll-behavior: smooth;
}

/* -- Utility Classes -- */

.animate-pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.glass-panel {
    background: rgba(2, 48, 71, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Utility to hide scrollbars, as seen in Events.tsx */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}


/* -- Custom Scrollbar -- */

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #001219;
}
::-webkit-scrollbar-thumb {
    background: #D90429;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #FB8500;
}


/* -- MyTuner Player Overrides -- */

/*
 * NOTE: The ID #w6ZIUVZOw6t0PSsjP8OYb0g9w5osTsOwc1w= is specific to the
 * myTuner widget and contains special characters that must be escaped with a backslash.
 */

/* Main widget container overrides */
#w6ZIUVZOw6t0PSsjP8OYb0g9w5osTsOwc1w\= {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    height: auto !important;
    overflow: visible !important;
}

/* Main Bar Container */
#w6ZIUVZOw6t0PSsjP8OYb0g9w5osTsOwc1w\=top-bar {
    background: rgba(15, 23, 42, 0.98) !important; /* slate-900 with opacity */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,0.1);
    height: 96px !important;
    padding: 0 5% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}

/* Reset Floats */
#w6ZIUVZOw6t0PSsjP8OYb0g9w5osTsOwc1w\=top-bar > * {
    float: none !important;
    margin: 0 !important;
}

/* Play Button - Redesigned to be a Pill Shape with Text */
.main-play-button {
    background-color: #D90429 !important; /* tropical-red */
    width: auto !important;
    min-width: 140px !important;
    height: 56px !important;
    border-radius: 50px !important; /* Pill shape */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 24px !important;
    box-shadow: 0 0 15px rgba(217, 4, 41, 0.5) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    flex-shrink: 0 !important;
    margin-right: 20px !important;
    position: relative !important;
    gap: 12px !important; /* Space between icon and text */
    z-index: 100 !important;
    pointer-events: auto !important;
}

.main-play-button:hover {
    background-color: #ff0a3b !important;
    transform: scale(1.02) !important;
    box-shadow: 0 0 25px rgba(217, 4, 41, 0.7) !important;
}

/* Text Label Injection via CSS */
.main-play-button::after {
    content: 'ASCOLTA';
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    pointer-events: none !important; /* CRITICAL: Ensure clicks pass through to button */
}

.main-play-button.playing::after {
    content: 'IN PAUSA';
}

.main-play-button.loading::after {
    content: 'CARICAMENTO...';
}

/* Play Icon centering */
.main-play-button div {
    width: 24px !important;
    height: 24px !important;
    background-size: 24px !important;
    background-position: center !important;
    filter: brightness(0) invert(1) !important; /* Force white icon */
    margin: 0 !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
    pointer-events: none !important; /* Ensure clicks pass through to parent */
}

/* Pulse animation for play button availability */
.main-play-button::before {
    content: '';
    position: absolute;
    top: -4px; right: -4px; bottom: -4px; left: -4px;
    border-radius: 50px;
    border: 1px solid #D90429;
    opacity: 0.6;
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    pointer-events: none !important; /* CRITICAL: Ensure clicks pass through */
    z-index: -1 !important;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.05); opacity: 0; }
    100% { transform: scale(1.05); opacity: 0; }
}

/* Song/Radio Info Link */
.player-radio-link {
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
    flex-grow: 1 !important;
    overflow: hidden !important;
    height: 100% !important;
}

.player-radio-link img {
    height: 64px !important;
    width: 64px !important;
    object-fit: cover !important;
    border-radius: 12px !important;
    margin-right: 16px !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}

.player-radio-name {
    color: #ffffff !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    font-size: 1.25rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Hide unwanted widget elements */
#w6ZIUVZOw6t0PSsjP8OYb0g9w5osTsOwc1w\=song-history {
    display: none !important; 
}

.volume-controls {
    display: none !important;
}

.player-mytuner-logo {
    display: none !important;
}

/* Responsive styles for player */
@media (max-width: 640px) {
    #w6ZIUVZOw6t0PSsjP8OYb0g9w5osTsOwc1w\=top-bar {
        padding: 0 16px !important;
        height: 80px !important;
    }
    .player-radio-link img {
        height: 48px !important;
        width: 48px !important;
        margin-right: 12px !important;
    }
    .player-radio-name {
        font-size: 1rem !important;
    }
    /* Adjust button for mobile but keep text */
    .main-play-button {
        min-width: 120px !important;
        height: 48px !important;
        margin-right: 12px !important;
        padding: 0 16px !important;
    }
    .main-play-button::after {
        font-size: 12px;
    }
}