/* Cookie Banner Styles */
.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.show {
    transform: translateY(0);
}

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

.cookie-text h4 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.cookie-text p {
    color: rgba(255,255,255,0.9);
    margin: 0;
    font-size: 0.95rem;
}

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

.cookie-buttons .btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.cookie-buttons .btn-primary {
    background-color: #3498db;
    color: white;
}

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

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

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

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

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

/* Cookie Modal Styles */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 1002;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

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

.cookie-modal-content {
    background-color: white;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

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

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

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background-color: #f8f9fa;
    color: #2c3e50;
}

.cookie-modal-body {
    padding: 2rem;
}

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

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

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

.cookie-category-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.cookie-category p {
    color: #666;
    margin: 0;
    font-size: 0.95rem;
}

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

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

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

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

input:checked + .slider {
    background-color: #3498db;
}

input:focus + .slider {
    box-shadow: 0 0 1px #3498db;
}

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

input:disabled + .slider {
    background-color: #3498db;
    cursor: not-allowed;
}

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

.cookie-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #eee;
    text-align: right;
}

.cookie-modal-footer .btn {
    padding: 0.75rem 1.5rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cookie-modal-footer .btn:hover {
    background-color: #2980b9;
}

/* Cookie Settings Link */
.cookie-settings-link {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #2c3e50;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease;
    z-index: 1000;
    display: none;
}

.cookie-settings-link.show {
    display: block;
}

.cookie-settings-link:hover {
    background-color: #34495e;
    color: white;
}

.cookie-settings-link i {
    margin-right: 0.5rem;
}

/* Cookie Notice in Footer */
.cookie-notice {
    background-color: rgba(52, 73, 94, 0.1);
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.cookie-notice p {
    margin: 0;
    color: rgba(255,255,255,0.8);
}

.cookie-notice a {
    color: white;
    text-decoration: underline;
}

.cookie-notice a:hover {
    color: #3498db;
}

/* Responsive Design for Cookie Components */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-buttons .btn {
        width: 100%;
        text-align: center;
    }
    
    .cookie-modal {
        padding: 1rem;
    }
    
    .cookie-modal-content {
        max-height: 90vh;
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 1rem 1.5rem;
    }
    
    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .cookie-settings-link {
        bottom: 10px;
        left: 10px;
        right: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 1rem 0;
    }
    
    .cookie-text h4 {
        font-size: 1.1rem;
    }
    
    .cookie-text p {
        font-size: 0.9rem;
    }
    
    .cookie-buttons .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .cookie-modal-header h3 {
        font-size: 1.3rem;
    }
    
    .cookie-category-header h4 {
        font-size: 1.1rem;
    }
    
    .cookie-modal-body,
    .cookie-modal-header,
    .cookie-modal-footer {
        padding: 1rem;
    }
}

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

.cookie-banner.show {
    animation: slideUp 0.5s ease forwards;
}

/* Fade animation for modal */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-modal.show {
    animation: fadeIn 0.3s ease forwards;
}

/* Scale animation for modal content */
@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.cookie-modal.show .cookie-modal-content {
    animation: scaleIn 0.3s ease forwards;
}

/* Focus styles for accessibility */
.toggle-switch input:focus + .slider {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.cookie-buttons .btn:focus,
.cookie-modal-footer .btn:focus,
.close-btn:focus,
.cookie-settings-link:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cookie-banner {
        border-top: 2px solid white;
    }
    
    .cookie-modal-content {
        border: 2px solid #2c3e50;
    }
    
    .toggle-switch input:checked + .slider {
        background-color: #000;
    }
    
    .cookie-buttons .btn-outline {
        border-width: 3px;
    }
}

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

/* Print styles - hide cookie components */
@media print {
    .cookie-banner,
    .cookie-modal,
    .cookie-settings-link,
    .cookie-notice {
        display: none !important;
    }
}
