/**
 * Cookie Consent Banner & Modal Styles
 *
 * Konzistentní design s TASEDAČKA brand identity:
 * - Primární tyrkysová: #21758c
 * - Tmavá tyrkysová: #0d3d4d
 * - Oranžová (CTA): #f2795a
 * - Bílá: #FFFFFF
 *
 * @version 1.0
 * @date 2025-10-27
 */

/* ============================================
   COOKIE BANNER (fixní na spodu stránky)
   ============================================ */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #0d3d4d 0%, #21758c 100%);
    color: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    padding: 25px 0;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.cookie-banner-text {
    flex: 1;
    min-width: 0; /* Nutné pro flex overflow */
}

.cookie-banner-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-banner-title i {
    font-size: 24px;
    color: #f2795a;
}

.cookie-banner-description {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    opacity: 0.95;
}

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

/* ============================================
   TLAČÍTKA
   ============================================ */

.cookie-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cookie-btn i {
    font-size: 16px;
}

/* Přijmout vše - oranžové (CTA) */
.cookie-btn-accept {
    background: #f2795a;
    color: #ffffff;
}

.cookie-btn-accept:hover {
    background: #ff8b6d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(242, 121, 90, 0.4);
}

/* Odmítnout vše - průhledné s ohraničením */
.cookie-btn-reject {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

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

/* Nastavení - textový odkaz */
.cookie-btn-settings {
    background: transparent;
    color: #ffffff;
    text-decoration: underline;
    padding: 12px 16px;
}

.cookie-btn-settings:hover {
    color: #f2795a;
    background: rgba(255, 255, 255, 0.05);
}

/* ============================================
   MODAL - Detailní nastavení
   ============================================ */

.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-settings-modal.active {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cookie-settings-modal.active .cookie-modal-content {
    transform: scale(1);
}

/* Modal Header */
.cookie-modal-header {
    background: linear-gradient(135deg, #21758c 0%, #0d3d4d 100%);
    color: #ffffff;
    padding: 25px 30px;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-modal-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cookie-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Modal Body */
.cookie-modal-body {
    padding: 30px;
}

.cookie-modal-intro {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 25px 0;
}

/* Cookie Categories */
.cookie-category {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #21758c;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cookie-category-title {
    font-size: 16px;
    font-weight: 700;
    color: #0d3d4d;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-category-title i {
    color: #21758c;
    font-size: 18px;
}

.cookie-category-badge {
    background: #21758c;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.cookie-category-badge.always-on {
    background: #999;
}

.cookie-category-description {
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    margin: 0;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    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.3s;
    border-radius: 26px;
}

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #21758c;
}

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

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

/* Modal Footer */
.cookie-modal-footer {
    padding: 20px 30px;
    background: #f5f5f5;
    border-radius: 0 0 16px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cookie-modal-footer .cookie-btn {
    flex: 1;
}

/* ============================================
   RESPONZIVNÍ DESIGN - Mobile
   ============================================ */

@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        padding: 0 20px;
    }

    .cookie-banner-title {
        font-size: 18px;
    }

    .cookie-banner-description {
        font-size: 13px;
    }

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

    .cookie-btn {
        width: 100%;
        justify-content: center;
    }

    .cookie-modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }

    .cookie-modal-header {
        padding: 20px;
    }

    .cookie-modal-header h2 {
        font-size: 18px;
    }

    .cookie-modal-body {
        padding: 20px;
    }

    .cookie-modal-footer {
        flex-direction: column;
        padding: 15px 20px;
    }

    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }

    .cookie-category {
        padding: 15px;
    }
}

/* ============================================
   ODKAZ "Spravovat cookies" v patičce
   ============================================ */

.footer-cookie-link {
    color: #21758c;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s ease;
}

.footer-cookie-link:hover {
    color: #f2795a;
}

/* ============================================
   ANIMACE
   ============================================ */

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
