/**
 * Cookie Consent Popup - Modern Design
 * Matches site colors, centered modal style
 */

/* Overlay/Container */
#cookie-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
    padding: 15px;
}

#cookie-banner.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none !important;
    /* Force hide */
}

/* Modal Content */
.cookie-banner-content {
    background: #ffffff;
    width: 100%;
    max-width: 550px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Header with Icon */
.cookie-banner-header {
    padding: 30px 30px 10px 30px;
    text-align: center;
}

.cookie-icon {
    font-size: 40px;
    margin-bottom: 15px;
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.cookie-banner-text h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 10px;
    line-height: 1.3;
}

.cookie-banner-text p {
    font-size: 15px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
}

.cookie-partners-info {
    font-size: 13px;
    color: #718096;
    margin-top: 10px;
}

.cookie-partners-link {
    color: #667eea;
    text-decoration: underline;
    cursor: pointer;
}

/* Actions */
.cookie-banner-actions {
    padding: 0 30px 30px 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cookie-btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.25);
}

.cookie-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(102, 126, 234, 0.35);
    background: linear-gradient(135deg, #5a6fd6 0%, #684291 100%);
}

.cookie-btn-secondary {
    background: #edf2f7;
    color: #4a5568;
}

.cookie-btn-secondary:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.cookie-btn-text {
    background: transparent;
    color: #718096;
    font-size: 14px;
    padding: 10px;
    text-decoration: underline;
}

.cookie-btn-text:hover {
    color: #4a5568;
}

/* Badges */
.cookie-compliance-badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.compliance-badge {
    font-size: 11px;
    background: #f7fafc;
    padding: 4px 8px;
    border-radius: 4px;
    color: #718096;
    border: 1px solid #edf2f7;
}

/* =========================================
   Cookie Settings Modal Styles (Restored)
   ========================================= */

#cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#cookie-settings-modal.active {
    display: flex;
}

.cookie-modal-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    /* Hide scrollbar but keep scroll functionality */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.cookie-modal-content::-webkit-scrollbar {
    display: none;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 16px 16px 0 0;
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.cookie-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

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

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

.cookie-category {
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.cookie-category:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

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

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

.cookie-category-desc {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
}

.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: 28px;
}

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

.cookie-toggle input:checked+.cookie-toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

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

.cookie-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: #f8f9fa;
    border-radius: 0 0 16px 16px;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    #cookie-banner {
        padding: 0;
        align-items: flex-end;
        /* Bottom sheet on very small screens */
    }

    .cookie-banner-content {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        animation: slideUp 0.3s ease-out;
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }

    .cookie-banner-header {
        padding: 25px 20px 10px 20px;
    }

    .cookie-banner-actions {
        padding: 0 20px 25px 20px;
    }

    /* Modal Mobile */
    .cookie-modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
        border-radius: 12px;
    }

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

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