/* ========================================
   Cookie Consent Banner Styles
   ======================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1a365d;
    color: #ffffff;
    padding: 1.25rem;
    z-index: 9999;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    display: none;
    animation: slideUp 0.3s ease-out;
}

.cookie-banner.show {
    display: block;
}

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

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

.cookie-text {
    flex: 1;
}

.cookie-text p {
    margin-bottom: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    opacity: 0.95;
}

.cookie-text a {
    color: #ffffff;
    text-decoration: underline;
}

.cookie-text a:hover {
    text-decoration: none;
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-buttons .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.cookie-buttons .btn-outline {
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

.cookie-buttons .btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

.cookie-buttons .btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.cookie-buttons .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Cookie Settings Modal */
.cookie-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.cookie-modal.show {
    display: flex;
}

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

.cookie-modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem;
    animation: scaleIn 0.2s ease-out;
    color: #2d3748;
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.cookie-modal-content h2 {
    color: #1a365d;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

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

.cookie-category:first-of-type {
    padding-top: 0;
}

.cookie-category:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

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

.cookie-category-header h4 {
    margin-bottom: 0;
    font-size: 1rem;
    color: #1a365d;
}

.cookie-category p {
    color: #718096;
    font-size: 0.875rem;
    margin-bottom: 0;
    line-height: 1.6;
}

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

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

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

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #38a169;
}

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

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #38a169;
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.3);
}

/* Modal Buttons */
.cookie-modal-content .cookie-buttons {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    justify-content: flex-end;
}

.cookie-modal-content .cookie-buttons .btn {
    padding: 0.75rem 1.5rem;
}

/* Responsive Styles */
@media (max-width: 767px) {
    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cookie-text p {
        font-size: 0.875rem;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .cookie-buttons .btn {
        flex: 1;
        min-width: 100px;
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
    
    .cookie-modal-content {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    .cookie-modal-content h2 {
        font-size: 1.25rem;
    }
    
    .cookie-category-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .cookie-category-header h4 {
        flex: 1;
        min-width: 150px;
    }
    
    .cookie-modal-content .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-modal-content .cookie-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 479px) {
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-buttons .btn {
        width: 100%;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .cookie-banner {
        background-color: #000;
        border-top: 2px solid #fff;
    }
    
    .cookie-modal-content {
        border: 2px solid #000;
    }
    
    .toggle-slider {
        border: 2px solid #000;
    }
    
    .toggle-slider::before {
        border: 1px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-modal,
    .cookie-modal-content,
    .toggle-slider,
    .toggle-slider::before {
        animation: none;
        transition: none;
    }
}
