/* Cookie Banner and Management Styles */

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #2c3e50;
    color: white;
    padding: 1.5rem 0;
    z-index: 1001;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner:not(.hidden) {
    transform: translateY(0);
}

.cookie-banner.hidden {
    transform: translateY(100%);
}

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

.cookie-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: white;
}

.cookie-content p {
    margin: 0;
    color: #bdc3c7;
    line-height: 1.4;
    max-width: 600px;
}

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

.cookie-buttons .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.cookie-buttons .btn-primary {
    background-color: #e74c3c;
    color: white;
    border: none;
}

.cookie-buttons .btn-primary:hover {
    background-color: #c0392b;
}

.cookie-buttons .btn-secondary {
    background-color: #95a5a6;
    color: white;
    border: none;
}

.cookie-buttons .btn-secondary:hover {
    background-color: #7f8c8d;
}

.cookie-buttons .btn-outline {
    background-color: transparent;
    color: white;
    border: 1px solid #bdc3c7;
}

.cookie-buttons .btn-outline:hover {
    background-color: #bdc3c7;
    color: #2c3e50;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.7);
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-modal:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.cookie-modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.cookie-modal-content {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cookie-modal:not(.hidden) .cookie-modal-content {
    transform: scale(1);
}

.cookie-modal-content h3 {
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

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

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

.cookie-category label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.cookie-category input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    accent-color: #e74c3c;
}

.cookie-category input[type="checkbox"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-category p {
    margin: 0;
    color: #5a6c7d;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-left: 2.25rem;
}

.cookie-modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

.cookie-modal-buttons .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* Cookie Settings Panel (for cookie policy page) */
.cookie-settings-panel {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.cookie-settings-panel h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.cookie-settings-panel .btn {
    margin-top: 1rem;
}

/* Cookie Status Indicator */
.cookie-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #2c3e50;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(100px);
}

.cookie-status.show {
    opacity: 1;
    transform: translateY(0);
}

.cookie-status:hover {
    background-color: #34495e;
    transform: translateY(-2px);
}

.cookie-status::before {
    content: "🍪";
    margin-right: 0.5rem;
}

/* Cookie Notice for Legal Pages */
.cookie-notice {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 1rem;
    margin: 1rem 0;
    color: #856404;
}

.cookie-notice strong {
    color: #533f03;
}

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

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cookie-banner.animate-in {
    animation: slideUp 0.3s ease;
}

.cookie-banner.animate-out {
    animation: slideDown 0.3s ease;
}

.cookie-modal-content.animate-in {
    animation: fadeInScale 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-buttons .btn {
        flex: 1;
        min-width: 120px;
    }
    
    .cookie-modal {
        padding: 15px;
    }
    
    .cookie-modal-content {
        padding: 1.5rem;
        max-height: 85vh;
    }
    
    .cookie-modal-buttons {
        flex-direction: column;
    }
    
    .cookie-modal-buttons .btn {
        width: 100%;
    }
    
    .cookie-category p {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .cookie-status {
        bottom: 15px;
        right: 15px;
        left: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 1rem 0;
    }
    
    .cookie-content {
        padding: 0 15px;
    }
    
    .cookie-content h3 {
        font-size: 1.125rem;
    }
    
    .cookie-content p {
        font-size: 0.9rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-buttons .btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .cookie-modal-content {
        padding: 1rem;
    }
    
    .cookie-modal-content h3 {
        font-size: 1.25rem;
    }
    
    .cookie-category label {
        font-size: 0.9rem;
    }
    
    .cookie-category p {
        font-size: 0.85rem;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .cookie-banner {
        border-top: 2px solid white;
    }
    
    .cookie-modal-content {
        border: 2px solid #2c3e50;
    }
    
    .cookie-category {
        border-bottom-width: 2px;
    }
    
    .cookie-buttons .btn {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-modal,
    .cookie-modal-content,
    .cookie-status {
        transition: none;
    }
    
    .cookie-banner.animate-in,
    .cookie-banner.animate-out,
    .cookie-modal-content.animate-in {
        animation: none;
    }
}

/* Focus Management */
.cookie-banner:focus-within {
    outline: 2px solid #e74c3c;
    outline-offset: -2px;
}

.cookie-modal-content:focus-within {
    outline: none;
}

.cookie-category label:focus-within {
    outline: 2px solid #e74c3c;
    outline-offset: 2px;
    border-radius: 3px;
}

/* Print Styles */
@media print {
    .cookie-banner,
    .cookie-modal,
    .cookie-status,
    .cookie-settings-panel {
        display: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .cookie-modal-content {
        background-color: #34495e;
        color: #ecf0f1;
    }
    
    .cookie-modal-content h3 {
        color: #ecf0f1;
    }
    
    .cookie-category {
        border-bottom-color: #5a6c7d;
    }
    
    .cookie-category label {
        color: #ecf0f1;
    }
    
    .cookie-category p {
        color: #bdc3c7;
    }
    
    .cookie-settings-panel {
        background-color: #34495e;
        border-color: #5a6c7d;
        color: #ecf0f1;
    }
    
    .cookie-settings-panel h4 {
        color: #ecf0f1;
    }
}

/* GDPR Compliance Indicator */
.gdpr-compliant {
    position: relative;
}

.gdpr-compliant::after {
    content: "✓ GDPR";
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #2ecc71;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* Cookie Categories Visual Indicators */
.cookie-category.necessary {
    border-left: 4px solid #e74c3c;
    padding-left: 1rem;
}

.cookie-category.analytics {
    border-left: 4px solid #3498db;
    padding-left: 1rem;
}

.cookie-category.marketing {
    border-left: 4px solid #f39c12;
    padding-left: 1rem;
}

/* Accessibility announcements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Cookie consent state classes */
body.cookies-accepted .cookie-banner {
    display: none;
}

body.cookies-minimal .analytics-only,
body.cookies-minimal .marketing-only {
    display: none;
}

body.cookies-rejected .analytics-only,
body.cookies-rejected .marketing-only {
    display: none;
}
