/**
 * Festival Lineup Filter v3.3 - Frontend CSS
 * 
 * Timetable kleuren zijn CSS variables die door View Toggle widget
 * gezet kunnen worden (per festival aanpasbaar in Elementor).
 */

/* ==========================================================================
   Zoekbalk
   ========================================================================== */

.flf-zoekbalk-wrapper {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.flf-zoekbalk-input {
    width: 100%;
    box-sizing: border-box;
    outline: none;
}

.flf-zoekbalk-wis {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 10px;
    line-height: 1;
    z-index: 2;
    color: inherit;
    font-family: Arial, sans-serif;
}

.flf-hidden-by-zoek {
    display: none !important;
}

.flf-geen-resultaten {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    opacity: 0.7;
    font-style: italic;
    width: 100%;
}

/* ==========================================================================
   View Toggle
   ========================================================================== */

.flf-view-toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.flf-view-button {
    cursor: pointer;
    background: transparent;
    border: 1px solid currentColor;
    transition: all 0.3s ease;
    font-family: inherit;
}

/* ==========================================================================
   Wis Filters
   ========================================================================== */

.flf-wis-filters-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.flf-wis-filters {
    cursor: pointer;
    background: transparent;
    border: 1px solid currentColor;
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    color: inherit;
}

.flf-wis-filters-icon {
    font-family: Arial, sans-serif;
    font-size: 1.2em;
    line-height: 1;
}

/* ==========================================================================
   Download PDF
   ========================================================================== */

.flf-download-pdf-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.flf-download-pdf {
    cursor: pointer;
    background: transparent;
    border: 1px solid currentColor;
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    color: inherit;
}

.flf-download-pdf-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   View visibility
   ========================================================================== */

.flf-timetable-container {
    display: none;
    width: 100%;
    margin-top: 20px;
}

.flf-timetable-container.flf-timetable-zichtbaar {
    display: block;
}

.elementor-widget-loop-grid.flf-loop-hidden {
    display: none !important;
}

/* ==========================================================================
   TIMETABLE — CSS Variables (overschrijfbaar via View Toggle widget)
   ========================================================================== */

.flf-timetable {
    /* Default kleuren — overschrijfbaar via Elementor widget controls */
    --flf-tt-text-color: #ffffff;
    --flf-tt-dag-titel-color: #ffffff;
    --flf-tt-dag-titel-border: #ffffff;
    --flf-tt-tijd-as-bg: rgba(0,0,0,0.3);
    --flf-tt-tijd-as-text: #ffffff;
    --flf-tt-tijd-as-border: rgba(255,255,255,0.15);
    --flf-tt-podium-header-bg: rgba(255,255,255,0.12);
    --flf-tt-podium-header-text: #ffffff;
    --flf-tt-podium-header-border: #ffffff;
    --flf-tt-grid-bg: rgba(255,255,255,0.03);
    --flf-tt-kolom-bg: rgba(255,255,255,0.02);
    --flf-tt-uur-lijn-color: rgba(255,255,255,0.1);
    --flf-tt-band-bg: #ffd700;
    --flf-tt-band-text: #000000;
    --flf-tt-band-tijd-color: #000000;
    --flf-tt-band-shadow: rgba(0,0,0,0.3);
    --flf-tt-band-hover-bg: #ffe54d;
    --flf-tt-band-hover-text: #000000;
    --flf-tt-band-hover-shadow: rgba(0,0,0,0.5);
    
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 48px;
    color: var(--flf-tt-text-color);
}

.flf-tt-leeg {
    text-align: center;
    padding: 60px 20px;
    opacity: 0.7;
    font-size: 1.1em;
    color: var(--flf-tt-text-color);
}

.flf-tt-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
    gap: 10px;
}

.flf-tt-loader span {
    width: 16px;
    height: 16px;
    background-color: currentColor;
    border-radius: 50%;
    animation: flfTTLoaderPulse 1.4s ease-in-out infinite;
    opacity: 0.4;
}

.flf-tt-loader span:nth-child(1) { animation-delay: 0s; }
.flf-tt-loader span:nth-child(2) { animation-delay: 0.2s; }
.flf-tt-loader span:nth-child(3) { animation-delay: 0.4s; }

@keyframes flfTTLoaderPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

.flf-tt-dag {
    width: 100%;
}

.flf-tt-dag-titel {
    margin: 0 0 20px 0;
    font-size: 1.6em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--flf-tt-dag-titel-border);
    color: var(--flf-tt-dag-titel-color);
}

.flf-tt-grid {
    display: flex;
    width: 100%;
    background: var(--flf-tt-grid-bg);
    border-radius: 6px;
    overflow: hidden;
}

.flf-tt-tijd-as {
    flex: 0 0 70px;
    position: relative;
    background: var(--flf-tt-tijd-as-bg);
    border-right: 1px solid var(--flf-tt-tijd-as-border);
    margin-top: 56px;
}

.flf-tt-tijd-label {
    position: absolute;
    left: 0;
    right: 0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--flf-tt-tijd-as-text);
    opacity: 0.9;
    transform: translateY(-50%);
    text-align: center;
    padding: 2px 4px;
}

.flf-tt-tijd-label::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    width: 5px;
    height: 1px;
    background: var(--flf-tt-tijd-as-text);
    opacity: 0.4;
}

.flf-tt-podia-wrap {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
}

.flf-tt-podia {
    display: grid;
    min-width: 100%;
}

.flf-tt-podia[data-aantal-podia="1"] { grid-template-columns: minmax(280px, 1fr); }
.flf-tt-podia[data-aantal-podia="2"] { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
.flf-tt-podia[data-aantal-podia="3"] { grid-template-columns: repeat(3, minmax(200px, 1fr)); }
.flf-tt-podia[data-aantal-podia="4"] { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.flf-tt-podia[data-aantal-podia="5"] { grid-template-columns: repeat(5, minmax(170px, 1fr)); }
.flf-tt-podia[data-aantal-podia="6"] { grid-template-columns: repeat(6, minmax(160px, 1fr)); }

.flf-tt-headers {
    display: contents;
}

.flf-tt-podium-header {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.95em;
    color: var(--flf-tt-podium-header-text);
    background: var(--flf-tt-podium-header-bg);
    border-bottom: 2px solid var(--flf-tt-podium-header-border);
    padding: 0 10px;
    text-align: center;
    margin: 0 4px 8px 4px;
    border-radius: 4px 4px 0 0;
    position: sticky;
    top: 0;
    z-index: 3;
}

.flf-tt-podia-body {
    display: contents;
}

.flf-tt-podium-kolom {
    position: relative;
    background: var(--flf-tt-kolom-bg);
    margin: 0 4px;
}

.flf-tt-uur-lijn {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--flf-tt-uur-lijn-color);
    pointer-events: none;
    z-index: 1;
}

.flf-tt-band {
    position: absolute;
    left: 4px;
    right: 4px;
    padding: 6px 8px;
    background: var(--flf-tt-band-bg);
    color: var(--flf-tt-band-text);
    text-decoration: none;
    border-radius: 3px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, z-index 0s 0.2s;
    z-index: 2;
    box-shadow: 0 1px 3px var(--flf-tt-band-shadow);
    min-height: 32px;
}

.flf-tt-band:hover {
    background: var(--flf-tt-band-hover-bg);
    color: var(--flf-tt-band-hover-text);
    transform: scale(1.05);
    z-index: 100;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, z-index 0s 0s;
    box-shadow: 0 6px 16px var(--flf-tt-band-hover-shadow);
}

.flf-tt-band-content {
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.flf-tt-band-tijd {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--flf-tt-band-tijd-color);
    opacity: 0.8;
    line-height: 1.1;
    margin-bottom: 2px;
    white-space: nowrap;
    flex-shrink: 0;
}

.flf-tt-band-naam {
    font-weight: 800;
    font-size: 13px;
    line-height: 1.15;
    color: inherit;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.flf-tt-band:hover .flf-tt-band-tijd {
    color: var(--flf-tt-band-hover-text);
}

/* Korte blokken */
.flf-tt-band.flf-tt-band-kort {
    padding: 3px 6px;
}

.flf-tt-band.flf-tt-band-kort .flf-tt-band-tijd {
    font-size: 9px;
    margin-bottom: 1px;
}

.flf-tt-band.flf-tt-band-kort .flf-tt-band-naam {
    font-size: 11px;
    line-height: 1.1;
}

.flf-tt-band.flf-tt-band-ultrakort {
    padding: 2px 4px;
}

.flf-tt-band.flf-tt-band-ultrakort .flf-tt-band-tijd {
    display: none;
}

.flf-tt-band.flf-tt-band-ultrakort .flf-tt-band-naam {
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flf-tt-band.flf-tt-band-kort:hover,
.flf-tt-band.flf-tt-band-ultrakort:hover {
    min-height: 60px;
    height: auto !important;
    overflow: visible;
}

.flf-tt-band.flf-tt-band-kort:hover .flf-tt-band-tijd,
.flf-tt-band.flf-tt-band-ultrakort:hover .flf-tt-band-tijd {
    display: block;
    font-size: 10px;
}

.flf-tt-band.flf-tt-band-kort:hover .flf-tt-band-naam,
.flf-tt-band.flf-tt-band-ultrakort:hover .flf-tt-band-naam {
    font-size: 12px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .flf-tt-tijd-as { flex: 0 0 56px; }
    .flf-tt-tijd-label { font-size: 12px; }
}

@media (max-width: 768px) {
    .flf-tt-dag-titel { font-size: 1.3em; }
    .flf-tt-tijd-as { flex: 0 0 48px; margin-top: 44px; }
    .flf-tt-tijd-label { font-size: 11px; }
    
    .flf-tt-podium-header {
        font-size: 0.8em;
        height: 40px;
    }
    
    .flf-tt-band-naam { font-size: 11px; }
    .flf-tt-band-tijd { font-size: 9px; }
}

@media (max-width: 480px) {
    .flf-tt-podia-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .flf-tt-tijd-as { flex: 0 0 42px; }
    .flf-tt-tijd-label { font-size: 10px; }
}
