/**
 * CSS pro stylování koncertů ve stylu "cards"
 */

/* Agresivní skrytí původního preloaderu */
.concert-details-preloader,
.concert-details-preloader *,
.spinner,
div[class*="preloader"]:not(.concert-progress-preloader),
.loading-details {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    pointer-events: none !important;
}

/* Přepínací tlačítka */
.concerts-toggle-buttons {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-button {
    display: inline-block;
    margin: 0 5px 5px 0;
    padding: 8px 15px;
    background-color: #e9e9e9;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.filter-text-link {
    margin: 0 15px 0 0;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.filter-button:hover,
.filter-text-link:hover {
    background-color: #d9d9d9;
}

.filter-button.active {
    background-color: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.filter-text-link.active {
    font-weight: bold;
    color: #0073aa;
}

/* Karta koncertu */
.concert-card {
    margin-bottom: 20px;
    background-color: #fff;
    border-radius: var(--card-border-radius, 15px);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    /* Explicitně odstraníme všechny okraje */
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
}

.concert-card-inner {
    padding: 0;
}

/* Grid layout pro 4 sloupce */
.concert-card-grid {
    display: flex;
    align-items: stretch;
    width: 100%;
    flex-wrap: nowrap; /* Důležité pro Safari */
}

/* Základní nastavení buněk */
.concert-cell {
    padding: 15px;
    position: relative; /* Důležité pro správné umístění vertikální čáry */
}

/* Buňka s obrázkem */
.concert-image-cell {
    width: 200px;
    min-width: 200px; /* Důležité pro Safari */
    flex: 0 0 200px;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.concert-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    background-color: #f5f5f5;
}

.concert-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.concert-image-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
    color: #aaa;
    font-size: 32px;
    height: 100%;
}

/* Buňka s datem, časem a místem */
.concert-datetime-cell {
    width: 150px;
    min-width: 150px; /* Důležité pro Safari */
    flex: 0 0 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.concert-date,
.concert-time,
.concert-venue {
    margin-bottom: 5px;
    color: #666;
}

.concert-date {
    color: #333;
    font-weight: 600;
}

/* Buňka s informacemi - širší */
.concert-info-cell {
    flex: 1;
    min-width: 0;
    padding-right: 15px;
    display: flex; /* Pro Safari */
    flex-direction: column; /* Pro Safari */
}

.concert-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #222;
    font-weight: 600;
    line-height: 1.3;
}

/* Nový styl pro popisek koncertu */
.concert-description-preview {
    margin: 0 0 12px 0;
    color: rgb(219, 219, 219); /* #DBDBDB */
    font-size: 0.95em;
    line-height: 1.5;
}

.concert-description-preview p {
    margin-bottom: 8px;
}

.concert-description-preview p:last-child {
    margin-bottom: 0;
}

.concert-perex {
    margin-bottom: 15px;
    color: #666;
    font-style: italic; /* Přidání kurzívy pro vizuální odlišení */
    font-size: 0.9em;
}

.concert-more-link {
    cursor: pointer;
    text-decoration: none;
    color: #0073aa;
    font-weight: 500;
    display: inline-block;
    transition: all 0.3s ease;
}

.concert-more-link:hover {
    color: #005077;
}

/* Přidání ikony k tlačítku "více" */
.concert-more-link::after {
    content: " ▾";
    font-size: 0.8em;
    vertical-align: middle;
}

.concert-more-link[aria-expanded="true"]::after {
    content: " ▴";
}

.concert-more-link:active,
.concert-tickets-button:active {
    transform: translateY(1px);
}

/* Buňka s tlačítkem vstupenky */
.concert-tickets-cell {
    width: 120px;
    min-width: 120px; /* Důležité pro Safari */
    flex: 0 0 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    border-left: 1px solid var(--separator-color, rgb(173, 173, 173)); /* Použití proměnné pro barvu čáry */
}

/* Tlačítka */
.concert-tickets-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #0073aa;
    border: none;
    border-radius: 3px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.5;
}

.concert-tickets-button:hover {
    background-color: #005a87;
}

/* Detaily koncertu - vylepšení pro plynulejší animace */
.concert-details {
    position: relative; /* Důležité pro absolutní pozicování preloaderu */
    padding-top: 5px; /* Snížení odsazení pro lepší plynulost */
    border-top: 1px solid var(--separator-color, rgb(173, 173, 173));
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    text-align: center;
    transition: none; /* Odstraníme transition, protože používáme JS animace */
    min-height: 30px;
}

/* Obal preloaderu pro novou animaci */
.concert-progress-preloader {
    position: absolute;
    top: 0; /* Začíná přesně na horní hraně detailu */
    left: 0;
    right: 0;
    height: 2px; /* Stejná výška jako border */
    padding: 0;
    margin: 0;
    overflow: visible;
    z-index: 100;
    background-color: transparent;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Samotný progress bar - tenká linka přesně nad horizontální čárou */
.concert-progress-preloader .progress-bar {
    position: absolute;
    top: -1px; /* Posunutí nahoru, aby překrylo border */
    left: 0;
    height: 2px;
    width: 0%;
    background-color: #A39578; /* Požadovaná barva */
    transition: width 0.5s linear;
    opacity: 1;
    z-index: 101; /* Zajistíme, že bude nad čárou */
}

/* Animace progress baru */
.concert-progress-preloader .progress-bar.loading {
    animation: progressAnimation 1.5s ease-in-out infinite;
}

@keyframes progressAnimation {
    0% {
        width: 0%;
        left: 0;
    }
    50% {
        width: 100%;
        left: 0;
    }
    100% {
        width: 0%;
        left: 100%;
    }
}

/* Zajistíme, že adresa a další prvky nebudou poskakovat */
.concert-address {
    margin-bottom: 15px;
    text-align: center;
    transition: opacity 0.5s ease;
}

.concert-description {
    margin: 15px auto;
    max-width: 800px;
    text-align: left;
    transition: opacity 0.5s ease;
}

.concert-details-tickets {
    margin: 20px 0 10px;
    text-align: center;
}

/* Kontejner pro obsah s plynulým zobrazením */
.concert-content-container {
    width: 100%;
    padding-top: 10px;
    transition: opacity 0.4s ease-in-out;
}

/* Error hláška - pro lepší vzhled */
.concert-error {
    padding: 15px;
    text-align: center;
    color: #d23;
    font-style: italic;
}

/* Stav "žádné koncerty" */
.no-concerts-found {
    padding: 30px;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 5px;
    color: #666;
    font-style: italic;
}

/* Indikátor načítání */
.loading-details {
    text-align: center;
    padding: 15px;
    color: #666;
    font-style: italic;
}

/* Specifické styly pro Safari */
@media not all and (min-resolution:.001dpcm) { 
    @supports (-webkit-appearance:none) {
        .concert-card-grid {
            display: -webkit-box;
            display: -webkit-flex;
            -webkit-flex-wrap: nowrap;
            -webkit-box-align: stretch;
            -webkit-align-items: stretch;
        }
        
        .concert-image-cell {
            -webkit-box-flex: 0;
            -webkit-flex: 0 0 200px;
        }
        
        .concert-datetime-cell {
            -webkit-box-flex: 0;
            -webkit-flex: 0 0 150px;
        }
        
        .concert-info-cell {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
        }
        
        .concert-tickets-cell {
            -webkit-box-flex: 0;
            -webkit-flex: 0 0 120px;
        }
    }
}

/* Responzivní design pro střední obrazovky */
@media screen and (min-width: 768px) and (max-width: 991px) {
    .concert-title {
        font-size: 16px;
        line-height: 1.3;
    }
    
    .concert-description-preview {
        font-size: 0.9em;
    }
    
    .concert-perex {
        font-size: 0.9em;
    }
}

/* Responzivní design pro tablety */
@media screen and (max-width: 992px) {
    .concert-card-grid {
        flex-wrap: wrap;
        -webkit-flex-wrap: wrap;
    }
    
    .concert-image-cell {
        width: 180px;
        flex: 0 0 180px;
        -webkit-flex: 0 0 180px;
    }
    
    .concert-datetime-cell {
        width: auto;
        flex: 1;
        -webkit-flex: 1;
        min-width: 0;
    }
    
    .concert-info-cell {
        width: 100%;
        flex: 0 0 100%;
        -webkit-flex: 0 0 100%;
        order: 3;
        -webkit-order: 3;
        margin-top: 10px;
    }
    
    .concert-tickets-cell {
        width: auto;
        flex: 0 0 auto;
        -webkit-flex: 0 0 auto;
        border-left: none;
    }
}

/* Responzivní design pro mobilní zařízení */
@media screen and (max-width: 767px) {
    .concert-card-grid {
        flex-direction: column;
    }
    
    /* Obrázek na celou šířku - OPRAVENO */
    .concert-image-cell {
        width: 100% !important;
        min-width: 100% !important;
        flex: none !important;
        -webkit-flex: none !important;
        height: 200px !important; /* Pevná výška pro mobilní zobrazení */
        position: relative;
        margin: 0;
        overflow: hidden;
        padding: 0;
        display: block;
        z-index: 1; /* Zajištění, že se zobrazí */
    }
    
    .concert-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 2; /* Vyšší než rodičovský kontejner */
    }
    
    .concert-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    
    .concert-image-placeholder {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 2; /* Vyšší než rodičovský kontejner */
    }
    
    /* Změna pořadí zobrazení prvků pro mobil - nové pořadí */
    .concert-info-cell {
        order: 1; /* Nadpis a popisek hned za obrázek */
        padding: 15px 15px 5px;
        width: 100%;
        min-width: 100%;
        flex: 0 0 100%;
        -webkit-flex: 0 0 100%;
    }
    
    .concert-datetime-cell {
        order: 2; /* Datum, čas a místo konání jako druhé */
        padding: 0 15px 5px;
        border-top: none;
        width: 100%;
        min-width: 100%;
        flex: 0 0 100%;
        -webkit-flex: 0 0 100%;
    }
    
    .concert-tickets-cell {
        order: 3; /* Tlačítko vstupenky přijde jako třetí */
        padding: 5px 15px 5px;
        border-left: none;
        border-top: none;
        width: 100%;
        min-width: 100%;
        flex: 0 0 100%;
        -webkit-flex: 0 0 100%;
    }
    
    /* Skrytí původního odkazu "zobrazit více" v info buňce při aktivním mobilním rozložení */
    .mobile-layout-active .concert-info-cell .concert-more-link {
        display: none;
    }
    
    /* Kontejner pro "zobrazit více" pod vstupenkami */
    .concert-more-link-container {
        order: 4;
        width: 100%;
        padding: 5px 15px 15px;
        text-align: center;
    }
    
    /* Upravení stylů pro jednotlivé prvky */
    .concert-title {
        font-size: 17px;
        margin-bottom: 8px;
    }
    
    /* Úprava zobrazení data a času */
    .concert-date, .concert-time, .concert-venue {
        display: block;
        margin-bottom: 5px;
    }
    
    /* Responzivní tlačítko vstupenky */
    .concert-tickets-button {
        display: block;
        width: 100%;
        text-align: center;
        padding: 10px;
    }
    
    /* Větší kontrast pro popisek */
    .concert-description-preview {
        color: #666;
        margin-bottom: 10px;
    }
    
    /* Detaily koncertu */
    .concert-details {
        padding: 12px 10px;
        order: 5;
    }
}

/* Nastavení stínu pro kartu koncertu - upraveno pro rovnoměrné stíny */
.shadow-none {
    box-shadow: none !important;
}

.shadow-sm {
    box-shadow: 0 2px 5px rgba(0,0,0,0.08) !important;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.shadow-md {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.shadow-lg {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.shadow-xl {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

/* Hover efekt pro karty */
.concert-card:hover.shadow-sm {
    box-shadow: 0 4px 8px rgba(0,0,0,0.12) !important;
}

.concert-card:hover.shadow-md {
    box-shadow: 0 8px 12px rgba(0,0,0,0.15) !important;
}

.concert-card:hover.shadow-lg {
    box-shadow: 0 10px 20px rgba(0,0,0,0.15) !important;
}

.concert-card:hover.shadow-xl {
    box-shadow: 0 12px 30px rgba(0,0,0,0.2) !important;
}
/**
 * Zjednodušený CSS pro preloader a animace
 * Pouze tyto styly je třeba přidat do existujícího CSS souboru
 */

/* Agresivní skrytí původního preloaderu */
.concert-details-preloader,
.concert-details-preloader *,
.spinner,
div[class*="preloader"]:not(.concert-progress-preloader),
.loading-details {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    pointer-events: none !important;
}

/* Přepracované styly pro preloader */
.concert-progress-preloader {
    height: 2px;
    width: 100%;
    position: relative;
    margin: 0 0 15px 0;
    padding: 0;
    overflow: visible;
    background-color: transparent;
}

/* Samotný progress bar - tenká linka */
.concert-progress-preloader .progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background-color: #A39578; /* Požadovaná barva */
    opacity: 1;
    z-index: 10;
}

/* Animace progress baru - jednodušší verze */
.concert-progress-preloader .progress-bar.loading {
    animation: progressAnimation 1.5s ease-in-out infinite;
}

@keyframes progressAnimation {
    0% {
        width: 0%;
        left: 0;
    }
    50% {
        width: 100%;
        left: 0;
    }
    100% {
        width: 0%;
        left: 100%;
    }
}

/* Detaily koncertu - zjednodušené styly */
.concert-details {
    padding-top: 10px;
    border-top: 1px solid var(--separator-color, rgb(173, 173, 173));
    width: 100%;
    margin: 0;
    text-align: center;
    display: none; /* Skryto dokud se nezobrazí */
}

/* Error hláška - pro lepší vzhled */
.concert-error {
    padding: 15px;
    text-align: center;
    color: #d23;
    font-style: italic;
}