/**
 * cookie-consent.css
 * Cookie consent banner a nastavení
 * Web: JIZERKY PRO VÁS, O.P.S.
 */

/* ============================================
   COOKIE BANNER - Základní lišta
   ============================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to right, #1e3c72, #2a5298);
    color: #ffffff;
    padding: 1.5rem 2rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.show {
    transform: translateY(0);
}

/* Tmavý režim */
body.dark-mode .cookie-banner {
    background: linear-gradient(to right, #162b4d, #1f3d6e);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

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

.cookie-banner-text a:hover {
    color: #ffd9b3;
}

.cookie-banner-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

/* Tlačítka v banneru */
.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'Roboto', Arial, sans-serif;
}

.cookie-btn-accept {
    background: #4caf50;
    color: #ffffff;
}

.cookie-btn-accept:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.cookie-btn-settings {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.cookie-btn-settings:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   COOKIE MODAL - Rozšířené nastavení
   ============================================ */

.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-modal-overlay.show {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

body.dark-mode .cookie-modal-overlay {
    background: rgba(0, 0, 0, 0.85);
}

.cookie-modal {
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-modal-overlay.show .cookie-modal {
    transform: scale(1);
}

body.dark-mode .cookie-modal {
    background: #1A1A2E;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.6);
}

/* Header modalu */
.cookie-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #dddddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.dark-mode .cookie-modal-header {
    border-bottom-color: #2d2d2d;
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #1e3c72;
}

body.dark-mode .cookie-modal-header h2 {
    color: #ffcc99;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666666;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.3s ease;
}

.cookie-modal-close:hover {
    color: #333333;
}

body.dark-mode .cookie-modal-close {
    color: #B0B0B0;
}

body.dark-mode .cookie-modal-close:hover {
    color: #E0E0E0;
}

/* Obsah modalu */
.cookie-modal-body {
    padding: 2rem;
}

.cookie-modal-intro {
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333333;
}

body.dark-mode .cookie-modal-intro {
    color: #E0E0E0;
}

/* Kategorie cookies */
.cookie-category {
    margin-bottom: 1.5rem;
    border: 1px solid #dddddd;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.cookie-category:hover {
    border-color: #2a5298;
}

body.dark-mode .cookie-category {
    border-color: #2d2d2d;
}

body.dark-mode .cookie-category:hover {
    border-color: #4a7bc8;
}

.cookie-category-header {
    padding: 1rem 1.5rem;
    background: #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

body.dark-mode .cookie-category-header {
    background: #16213E;
}

.cookie-category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-category-title h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1e3c72;
}

body.dark-mode .cookie-category-title h3 {
    color: #ffcc99;
}

.cookie-category-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #4caf50;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.cookie-category-badge.required {
    background: #2196f3;
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    width: 50px;
    height: 26px;
}

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

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #4caf50;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Rozbalený obsah kategorie */
.cookie-category-content {
    display: none;
    padding: 1.5rem;
    background: #ffffff;
    border-top: 1px solid #eeeeee;
}

.cookie-category.expanded .cookie-category-content {
    display: block;
}

body.dark-mode .cookie-category-content {
    background: #0F0F1E;
    border-top-color: #2d2d2d;
}

.cookie-category-content p {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666666;
}

body.dark-mode .cookie-category-content p {
    color: #B0B0B0;
}

.cookie-category-content ul {
    margin: 0;
    padding-left: 1.5rem;
}

.cookie-category-content li {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #666666;
}

body.dark-mode .cookie-category-content li {
    color: #B0B0B0;
}

/* Footer modalu */
.cookie-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #dddddd;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

body.dark-mode .cookie-modal-footer {
    border-top-color: #2d2d2d;
}

.cookie-btn-save {
    background: #2a5298;
    color: #ffffff;
}

.cookie-btn-save:hover {
    background: #1e3c72;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.3);
}

.cookie-btn-accept-all {
    background: #4caf50;
    color: #ffffff;
}

.cookie-btn-accept-all:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* ============================================
   RESPONSIVE - Mobile
   ============================================ */

@media (max-width: 768px) {
    .cookie-banner {
        padding: 1rem;
    }

    .cookie-banner-content {
        flex-direction: column;
        gap: 1rem;
    }

    .cookie-banner-text h3 {
        font-size: 1rem;
    }

    .cookie-banner-text p {
        font-size: 0.85rem;
    }

    .cookie-banner-buttons {
        width: 100%;
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        padding: 0.875rem 1rem;
    }

    .cookie-modal {
        width: 95%;
        max-height: 95vh;
    }

    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 1rem;
    }

    .cookie-modal-header h2 {
        font-size: 1.25rem;
    }

    .cookie-category-header {
        padding: 0.75rem 1rem;
    }

    .cookie-category-title h3 {
        font-size: 1rem;
    }

    .cookie-modal-footer {
        flex-direction: column;
    }

    .cookie-btn-save,
    .cookie-btn-accept-all {
        width: 100%;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.cookie-btn:focus,
.cookie-toggle input:focus + .cookie-toggle-slider,
.cookie-modal-close:focus {
    outline: 2px solid #2a5298;
    outline-offset: 2px;
}

body.dark-mode .cookie-btn:focus,
body.dark-mode .cookie-toggle input:focus + .cookie-toggle-slider,
body.dark-mode .cookie-modal-close:focus {
    outline-color: #4a7bc8;
}

/* Vypnutí animací pro prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-modal-overlay,
    .cookie-modal,
    .cookie-btn,
    .cookie-toggle-slider,
    .cookie-toggle-slider:before {
        transition: none !important;
        animation: none !important;
    }
}
