/**
 * Cookie Consent Banner Styles
 * Modern, accessible, and mobile-responsive design
 */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    max-height: 90vh;
    overflow-y: auto;
}

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

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cookie-consent-header {
    margin-bottom: 15px;
}

.cookie-consent-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-consent-body {
    margin-bottom: 20px;
}

.cookie-consent-body p {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

.cookie-consent-body a {
    color: #2d5a27; /* Dark green that works well on white and blue backgrounds */
    text-decoration: none;
    font-weight: 500;
}

.cookie-consent-body a:hover {
    text-decoration: underline;
}

.cookie-consent-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    display: none;
}

.cookie-consent-details.show {
    display: block;
}

.cookie-category {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

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

.cookie-category-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
}

.cookie-category-status {
    font-size: 0.85rem;
    color: #28a745;
    font-weight: 600;
    background: #d4edda;
    padding: 2px 8px;
    border-radius: 12px;
}

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

/* Toggle Switch Styles */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    cursor: pointer;
}

.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: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #007bff;
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background-color: #28a745;
    cursor: not-allowed;
}

.cookie-toggle input:disabled + .cookie-toggle-slider:before {
    transform: translateX(26px);
}

/* Action Buttons */
.cookie-consent-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.cookie-consent-actions .btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

.cookie-consent-actions .btn-primary {
    background-color: #007bff;
    color: white;
}

.cookie-consent-actions .btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.cookie-consent-actions .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.cookie-consent-actions .btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-1px);
}

.cookie-consent-actions .btn-outline-secondary {
    background-color: transparent;
    color: #6c757d;
    border: 2px solid #6c757d;
}

.cookie-consent-actions .btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
    transform: translateY(-1px);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .cookie-consent-banner {
        background: rgba(33, 37, 41, 0.98);
        border-top-color: #495057;
    }

    .cookie-consent-header h4 {
        color: #fff;
    }

    .cookie-consent-body p {
        color: #adb5bd;
    }

    .cookie-consent-body a {
        color: #2d5a27; /* Dark green that works well on white and blue backgrounds */
    }

    .cookie-consent-details {
        background: #343a40;
        border-color: #495057;
    }

    .cookie-category-label {
        color: #fff;
    }

    .cookie-category p {
        color: #adb5bd;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .cookie-consent-content {
        padding: 15px;
    }

    .cookie-consent-header h4 {
        font-size: 1.1rem;
    }

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

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

    .cookie-consent-actions .btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .cookie-category-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .cookie-toggle {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .cookie-consent-content {
        padding: 12px;
    }

    .cookie-consent-header h4 {
        font-size: 1rem;
    }

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

    .cookie-consent-details {
        padding: 12px;
    }

    .cookie-category {
        margin-bottom: 12px;
        padding-bottom: 12px;
    }
}

/* Accessibility Improvements */
.cookie-consent-banner:focus-within {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.cookie-toggle:focus-within .cookie-toggle-slider {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

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

.cookie-consent-banner.show {
    animation: slideUp 0.3s ease-out;
}

/* Print styles */
@media print {
    .cookie-consent-banner {
        display: none !important;
    }
}

