/* =====================================================================
   COOKIE BANNER A MODÁL (Silktide inspirace)
===================================================================== */

/* ---------------------------------------------------------------------
   Cookie Banner (Plovoucí lišta)
--------------------------------------------------------------------- */
#cookie-consent-banner {
    position: fixed;
    z-index: 9999;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#cookie-consent-banner.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cc-banner-content {
    padding: 20px;
}

.cc-banner-text {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.5;
    margin-bottom: 15px;
}

.cc-banner-text a {
    color: #000;
    text-decoration: underline;
    font-weight: 500;
}

.cc-banner-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Tlačítka v banneru */
.cc-btn {
    padding: 10px 15px;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: center;
}

.cc-btn-primary {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.cc-btn-primary:hover {
    background-color: #333;
    border-color: #333;
}

.cc-btn-outline {
    background-color: transparent;
    color: #000;
    border-color: #000;
}

.cc-btn-outline:hover {
    background-color: #f4f4f4;
}

.cc-btn-link {
    background: none;
    border: none;
    color: #555;
    text-decoration: underline;
    font-weight: normal;
    padding: 10px 5px;
}

.cc-btn-link:hover {
    color: #000;
}

/* ---------------------------------------------------------------------
   Responzivita banneru
--------------------------------------------------------------------- */
@media (min-width: 769px) {
    /* Desktop: Plovoucí karta v pravém dolním rohu */
    #cookie-consent-banner {
        bottom: 20px;
        right: 20px;
        max-width: 400px;
        border-radius: 8px;
    }
}

@media (max-width: 768px) {
    /* Mobil: Ukotvené dno obrazovky na celou šířku */
    #cookie-consent-banner {
        bottom: 0;
        left: 0;
        width: 100%;
        border-radius: 8px 8px 0 0;
    }

    .cc-banner-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cc-btn {
        width: 100%;
    }
}

/* ---------------------------------------------------------------------
   Modál Nastavení (Preferences)
--------------------------------------------------------------------- */
#cookie-preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

#cookie-preferences-modal.visible {
    opacity: 1;
    visibility: visible;
}

.cc-modal-dialog {
    background: #fff;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cc-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eaeaea;
}

.cc-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #000;
    text-align: left;
}

.cc-modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: 60vh;
}

/* ---------------------------------------------------------------------
   Kategorie a Toggle Switche v modálu
--------------------------------------------------------------------- */
.cc-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cc-category:last-child {
    border-bottom: none;
}

.cc-category-info h3 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: #333;
}

.cc-category-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
    max-width: 280px;
}

/* Moderní CSS Toggle Switch */
.cc-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cc-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cc-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.cc-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cc-toggle-switch input:checked + .cc-slider {
    background-color: #000; /* Aktivní barva podle webu */
}

.cc-toggle-switch input:checked + .cc-slider:before {
    transform: translateX(20px);
}

.cc-toggle-switch input:disabled + .cc-slider {
    background-color: #e0e0e0;
    cursor: not-allowed;
}

.cc-toggle-switch input:disabled:checked + .cc-slider {
    background-color: #666;
}

.cc-modal-footer {
    padding: 20px;
    border-top: 1px solid #eaeaea;
    background-color: #f9f9f9;
    display: flex;
    justify-content: flex-end;
}

/* ---------------------------------------------------------------------
   Zástupný blok pro mapy (Placeholder)
--------------------------------------------------------------------- */
.map-placeholder {
    width: 100%;
    height: 450px;
    background-color: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
}

.map-placeholder-content {
    text-align: center;
    padding: 20px;
    max-width: 400px;
}

.map-placeholder-content p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
}

.btn-allow-map {
    padding: 10px 20px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-allow-map:hover {
    background-color: #333;
}
