/* Cookie Consent Banner Styling */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 1.5rem 2rem;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(150%);
        opacity: 0;
    }

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

.cookie-banner-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-text {
    flex: 1 1 400px;
}

.cookie-text h3 {
    font-size: 1.25rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.cookie-text p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

.cookie-text a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
}

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

.cookie-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Base styles for cookie buttons, classes like btn-primary can be used alongside */
.cookie-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}

.cookie-outline:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Modal Overlay */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 37, 64, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.cookie-modal {
    background: var(--white);
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.cookie-modal-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.cookie-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}

.cookie-close-btn:hover {
    color: var(--white);
}

.cookie-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.cookie-modal-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.cookie-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.cookie-category-info h4 {
    font-size: 1rem;
    color: var(--primary-dark);
    margin: 0 0 0.25rem 0;
}

.cookie-category-info p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

/* Custom Toggle Switch (Matches Theme Colors) */
.cookie-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-left: 1rem;
}

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

.cookie-toggle label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
    border-radius: 24px;
}

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

.cookie-toggle input:checked+label {
    background-color: var(--primary-color);
}

.cookie-toggle input:disabled+label {
    background-color: rgba(14, 65, 91, 0.5);
    /* Faded primary color for disabled */
    cursor: not-allowed;
}

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

.cookie-modal-footer {
    padding: 1.25rem 1.5rem;
    background: var(--bg-light);
    text-align: right;
    border-top: 1px solid var(--border-color);
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .cookie-banner {
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 16px 16px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }

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

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