/* Základní styly pro pokročilý Cookie Banner a Modál */

/* -- Banner -- */
.cookie-banner-advanced {
    position: fixed;
    bottom: 50px;
    left: 5%;
    width: 90%;
    background-color: rgba(255, 255, 255, 1); /* Lehce průhledné bílé pozadí jako na obrázku */
    color: black;
    padding: 40px 40px;
    box-shadow: 0 0 10px rgba(0,0,0,0.15);
    z-index: 2000;
    border-radius: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transition: transform 0.5s ease-in-out;
    transform: translateY(100%);
    box-sizing: border-box;
    border-top: 1px solid #eee;
}


.cookie-banner-advanced.visible {
    transform: translateY(0);
}

.cookie-banner-advanced h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3em;
    color: #000;
}

.cookie-banner-advanced p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.5;
    max-width: 600px; /* Omezit šířku textu */
}

.cookie-banner-advanced a {
    color: #3bb07a; /* Nebo vaše barva odkazu */
    text-decoration: none;
}
.cookie-banner-advanced a:hover {
    color: black;
}

.cookie-content {
    flex-grow: 1;
}

.cookie-buttons-main {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

/* -- Obecné Tlačítko (použito v banneru i modálu) -- */
.cookie-button {
    padding: 10px 20px;
    border: none;
    border-radius: 25px; /* Zakulacené rohy */
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    font-size: 0.9em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cookie-button.accept {
    background-color: #3bb07a; /* Žlutá jako na obrázku */
    color: white;
}
.cookie-button.accept:hover {
    background-color: black;
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.cookie-button.reject {
    background-color: #3bb07a; /* Žlutá */
    color: white;
}
.cookie-button.reject:hover {
    background-color: black;
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.cookie-button.settings {
    background-color: #3bb07a;
    color: white; /* Modrá nebo vaše barva pro odkazy/akce */
    font-weight: bold;
    box-shadow: none;
    padding: 10px 20px;
    border: none;
}
.cookie-button.settings:hover {
    background-color: black;
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}


/* -- Modální okno a Overlay -- */
.cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Tmavší průhledné pozadí */
    z-index: 1010; /* Nad bannerem */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.cookie-overlay.visible {
    opacity: 1;
}

.cookie-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9); /* Mírně zmenšené pro animaci */
    width: 90%;
    max-width: 700px; /* Maximální šířka modálu */
    max-height: 80vh; /* Maximální výška */
    background-color: #fff;
    border-radius: 40px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    z-index: 1020; /* Nad overlay */
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}
.cookie-modal.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 25px;
    border-bottom: 1px solid #eee;
}
.cookie-modal-header h3 {
    margin: 0;
    font-size: 1.4em;
}

.cookie-close-button {
    background: none;
    border: none;
    font-size: 2em;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 0 5px;
}
.cookie-close-button:hover {
    color: #333;
}

.cookie-modal-body {
    padding: 25px;
    overflow-y: auto; /* Umožní rolování, pokud je obsah delší */
    flex-grow: 1;
}
.cookie-modal-body p {
    font-size: 0.9em;
    line-height: 1.6;
    margin-bottom: 20px;
}
.cookie-modal-body a {
     color: #007bff;
     text-decoration: underline;
}

.cookie-category {
    border: 1px solid #eee;
    border-radius: 20px;
    margin-bottom: 15px;
    padding: 15px;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.cookie-category-header h4 {
    margin: 0;
    font-size: 1.1em;
}

.cookie-category-description {
    font-size: 0.85em !important; /* Menší písmo pro popisky */
    color: #666;
    margin-bottom: 0 !important;
}

.always-active {
    font-size: 0.8em;
    color: #555;
    font-weight: bold;
}

.cookie-modal-footer {
    padding: 25px 25px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end; /* Tlačítka napravo */
    gap: 15px;
    background-color: #f9f9f9;
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
}



/* -- Přepínač (Toggle Switch) -- */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 50px; /* Šířka přepínače */
  height: 24px; /* Výška přepínače */
}

.cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider2 {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

.slider2:before {
  position: absolute;
  content: "";
  height: 18px; /* Velikost kolečka */
  width: 18px;
  left: 3px; /* Odsazení kolečka */
  bottom: 3px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider2 {
  background-color: #28a745; /* Zelená pro aktivní (nebo vaše barva) */
}

input:focus + .slider2 {
  box-shadow: 0 0 1px #28a745;
}

input:checked + .slider2:before {
  transform: translateX(26px); /* Posun kolečka doprava */
}

/* Rounded sliders */
.slider2.round {
  border-radius: 24px; /* Zakulacení přepínače */
}

.slider2.round:before {
  border-radius: 50%; /* Kulaté kolečko */
}

/* -- Utility třídy -- */
.hidden {
    display: none !important; /* Skrytí elementu (display: none je silnější) */
    opacity: 0; /* Pro jistotu u modálu/overlaye */
    pointer-events: none; /* Nebude reagovat na kliknutí */
}

/* -- Responzivita -- */
@media (max-width: 768px) {
    .cookie-banner-advanced {
        flex-direction: column;
        padding: 15px;
        text-align: center;
    }
    .cookie-banner-advanced p {
        max-width: 100%;
    }
    .cookie-buttons-main {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap; /* Zalomí tlačítka, pokud se nevejdou */
    }
     .cookie-modal {
        width: 95%;
        max-height: 85vh;
    }
    .cookie-modal-footer {
        flex-direction: column; /* Tlačítka pod sebou */
        align-items: stretch; /* Roztáhnout na plnou šířku */
    }
     .cookie-modal-footer .cookie-button {
        width: 100%;
        box-sizing: border-box; /* Padding se započítá */
        text-align: center;
     }
}

@media (max-width: 480px) {
     .cookie-buttons-main {
         flex-direction: column;
         align-items: stretch;
     }
     .cookie-buttons-main .cookie-button {
         width: 100%;
         box-sizing: border-box;
     }
     .cookie-modal-header h3 {
         font-size: 1.2em;
     }
     .cookie-modal-body, .cookie-modal-header, .cookie-modal-footer {
         padding: 15px;
     }
}