/* ===========================
   Cookie Consent Banner & Modal Styles
   =========================== */

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    border-top: 3px solid #2563eb;
}

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

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

.cookie-consent-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: #1e293b;
    font-weight: 600;
}

.cookie-consent-text p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-consent-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Cookie Buttons */
.btn-cookie {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-cookie-accept {
    background: #2563eb;
    color: white;
}

.btn-cookie-accept:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-cookie-reject {
    background: #e2e8f0;
    color: #475569;
}

.btn-cookie-reject:hover {
    background: #cbd5e1;
}

.btn-cookie-settings {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-cookie-settings:hover {
    background: #eff6ff;
}

/* Cookie Consent Modal */
.cookie-consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-consent-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-consent-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

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

.cookie-consent-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.cookie-consent-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #1e293b;
    font-weight: 600;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.cookie-modal-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.cookie-consent-modal-body {
    padding: 1.5rem;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.cookie-category:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-category-header h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 600;
}

.cookie-category-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

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

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 28px;
}

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

.cookie-switch input:checked + .cookie-slider {
    background-color: #2563eb;
}

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

.cookie-switch input:disabled + .cookie-slider {
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-consent-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

.cookie-consent-modal-footer .btn-cookie {
    min-width: 150px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 1rem;
    }

    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .cookie-consent-text h3 {
        font-size: 1.1rem;
    }

    .cookie-consent-text p {
        font-size: 0.9rem;
    }

    .cookie-consent-actions {
        flex-direction: column;
    }

    .btn-cookie {
        width: 100%;
        text-align: center;
    }

    .cookie-consent-modal-content {
        margin: 1rem;
    }

    .cookie-consent-modal-header {
        padding: 1rem;
    }

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

    .cookie-consent-modal-body {
        padding: 1rem;
    }

    .cookie-category-header {
        flex-direction: column;
    }

    .cookie-switch {
        align-self: flex-start;
    }

    .cookie-consent-modal-footer {
        padding: 1rem;
    }

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

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 0.75rem;
    }

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

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

    .btn-cookie {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Smooth scrolling for modal */
.cookie-consent-modal-content {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.cookie-consent-modal-content::-webkit-scrollbar {
    width: 8px;
}

.cookie-consent-modal-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.cookie-consent-modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.cookie-consent-modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}