/* Cookie Consent Banner & Modal */

/* ==================== Banner ==================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 20px 30px;
    z-index: 9999;
    display: none;
    animation: cookieSlideUp 0.5s ease-out;
}

@keyframes cookieSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.cookie-banner-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

.cookie-banner-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: #6366f1;
    color: #fff;
}

.cookie-btn-accept:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.cookie-btn-reject {
    background: #fff;
    color: #333;
    border: 1px solid #d1d5db;
}

.cookie-btn-reject:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.cookie-btn-preferences {
    background: transparent;
    color: #6366f1;
    border: 1px solid #6366f1;
}

.cookie-btn-preferences:hover {
    background: #6366f1;
    color: #fff;
}

/* ==================== Modal ==================== */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: cookieFadeIn 0.3s ease;
}

@keyframes cookieFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cookie-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: cookieModalSlideIn 0.3s ease;
}

@keyframes cookieModalSlideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-modal-header {
    background: #6366f1;
    color: #fff;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-modal-header h3 i {
    font-size: 20px;
}

.cookie-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.cookie-modal-close:hover {
    opacity: 1;
}

/* ==================== Cookie Categories ==================== */
.cookie-modal-body {
    max-height: 400px;
    overflow-y: auto;
}

.cookie-modal-body::-webkit-scrollbar {
    width: 6px;
}

.cookie-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.cookie-modal-body::-webkit-scrollbar-thumb {
    background: #6366f1;
    border-radius: 3px;
}

.cookie-category {
    border-bottom: 1px solid #e5e7eb;
    padding: 18px 24px;
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.cookie-category-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.cookie-category-description {
    font-size: 13px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* ==================== Toggle ==================== */
.cookie-toggle {
    position: relative;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
}

.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: #d1d5db;
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #6366f1;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(22px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background-color: #6366f1;
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==================== Modal Footer ==================== */
.cookie-modal-footer {
    padding: 16px 24px;
    background: #f9fafb;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #e5e7eb;
}

.cookie-btn-reject-all {
    background: #fff;
    color: #333;
    border: 1px solid #d1d5db;
    padding: 10px 20px;
}

.cookie-btn-reject-all:hover {
    background: #f3f4f6;
}

.cookie-btn-save {
    background: #6366f1;
    color: #fff;
    padding: 10px 24px;
}

.cookie-btn-save:hover {
    background: #4f46e5;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 15px 20px;
    }

    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .cookie-banner-text {
        font-size: 13px;
        text-align: center;
    }

    .cookie-banner-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
    }

    .cookie-modal {
        max-height: 85vh;
        margin: 10px;
    }

    .cookie-modal-header {
        padding: 14px 18px;
    }

    .cookie-modal-header h3 {
        font-size: 15px;
    }

    .cookie-category {
        padding: 14px 18px;
    }

    .cookie-category-header {
        flex-direction: column;
        gap: 10px;
    }

    .cookie-modal-footer {
        flex-direction: column;
        padding: 14px 18px;
    }

    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }
}
