/**
 * Cookie Consent Banner Styles
 * PDPL Compliant Cookie Consent for Theeb Car Rental
 */

#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 99999;
    padding: 20px;
    display: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    border-top: 3px solid #1B5A96;
}

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

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

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cookie-consent-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.cookie-consent-title {
    font-size: 24px;
    font-weight: 700;
    color: #1B5A96;
    margin: 0 0 10px 0;
}

.cookie-consent-description {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.cookie-consent-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.cookie-consent-btn-primary {
    background: #1B5A96;
    color: #ffffff;
}

.cookie-consent-btn-primary:hover {
    background: #154a7a;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(27, 90, 150, 0.3);
}

.cookie-consent-btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
}

.cookie-consent-btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.cookie-consent-btn-outline {
    background: transparent;
    color: #1B5A96;
    border: 1px solid #1B5A96;
}

.cookie-consent-btn-outline:hover {
    background: #1B5A96;
    color: #ffffff;
}

.cookie-consent-customize-panel {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.cookie-consent-customize-panel.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-consent-category {
    margin-bottom: 20px;
    padding: 15px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

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

.cookie-consent-category-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.cookie-consent-category-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.cookie-consent-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

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

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

.cookie-consent-switch input:checked + .cookie-consent-slider {
    background-color: #1B5A96;
}

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

.cookie-consent-switch input:disabled + .cookie-consent-slider {
    background-color: #1B5A96;
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-consent-links {
    margin-top: 15px;
    font-size: 13px;
}

.cookie-consent-links a {
    color: #1B5A96;
    text-decoration: none;
    margin-right: 15px;
}

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

/* RTL Support */
[dir="rtl"] #cookie-consent-banner {
    text-align: right;
}

[dir="rtl"] .cookie-consent-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .cookie-consent-category-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .cookie-consent-links a {
    margin-right: 0;
    margin-left: 15px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #cookie-consent-banner {
        padding: 15px;
    }
    
    .cookie-consent-title {
        font-size: 20px;
    }
    
    .cookie-consent-description {
        font-size: 13px;
    }
    
    .cookie-consent-actions {
        flex-direction: column;
    }
    
    .cookie-consent-btn {
        width: 100%;
        padding: 14px 24px;
    }
    
    .cookie-consent-header {
        flex-direction: column;
    }
    
    .cookie-consent-customize-panel {
        padding: 15px;
    }
}

/* Body padding when banner is visible */
body.cookie-banner-visible {
    padding-bottom: 200px;
}

@media (max-width: 768px) {
    body.cookie-banner-visible {
        padding-bottom: 300px;
    }
}

/* Accessibility */
.cookie-consent-btn:focus {
    outline: 2px solid #1B5A96;
    outline-offset: 2px;
}

.cookie-consent-switch input:focus + .cookie-consent-slider {
    box-shadow: 0 0 0 3px rgba(27, 90, 150, 0.2);
}

