/**
 * Cookie Consent Banner Styles
 * GDPR compliant cookie consent notification
 */

/* Cookie Consent Banner Container */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: none;
    animation: slideUp 0.5s ease-out;
}

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

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

/* Banner Content */
.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

.cookie-consent-text h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #f0f0f0;
}

.cookie-consent-text a {
    color: #ffd700;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-consent-text a:hover {
    color: #ffed4a;
}

/* Button Group */
.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-consent-buttons button,
.cookie-consent-buttons a {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cookie-consent-buttons button:hover,
.cookie-consent-buttons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Accept All Button */
.btn-accept-all {
    background-color: #ffffff;
    color: #667eea;
}

.btn-accept-all:hover {
    background-color: #f0f0f0;
}

/* Accept Essential Button */
.btn-accept-essential {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 2px solid #ffffff;
}

.btn-accept-essential:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Settings Button */
.btn-cookie-settings {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 12px 20px;
}

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

/* Close Button */
.cookie-consent-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.cookie-consent-close:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Settings Modal */
#cookie-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.cookie-settings-modal-content {
    background-color: #ffffff;
    color: #333333;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cookie-settings-modal-content h2 {
    margin: 0 0 20px 0;
    color: #667eea;
    font-size: 28px;
}

.cookie-option {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.cookie-option h4 {
    margin: 0 0 8px 0;
    color: #333333;
    font-size: 16px;
}

.cookie-option p {
    margin: 0;
    font-size: 13px;
    color: #666666;
    line-height: 1.5;
}

.cookie-option-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

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

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

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

.toggle-switch input:checked + .toggle-slider {
    background-color: #667eea;
}

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

.toggle-switch:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-switch.disabled .toggle-slider {
    background-color: #667eea;
    cursor: not-allowed;
}

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

/* Modal Actions */
.cookie-settings-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.cookie-settings-actions button {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save-preferences {
    background-color: #667eea;
    color: #ffffff;
}

.btn-save-preferences:hover {
    background-color: #5568d3;
}

.btn-accept-all-modal {
    background-color: #28a745;
    color: #ffffff;
}

.btn-accept-all-modal:hover {
    background-color: #218838;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-consent-text {
        min-width: auto;
    }

    .cookie-consent-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cookie-consent-buttons button,
    .cookie-consent-buttons a {
        width: 100%;
        text-align: center;
    }

    .cookie-settings-modal-content {
        padding: 20px;
    }

    .cookie-settings-actions {
        flex-direction: column;
    }

    #cookie-consent-banner {
        padding: 15px;
    }

    .cookie-consent-close {
        display: none;
    }
}

/* Floating Cookie Settings Button (shown when consent exists) */
#cookie-settings-trigger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #667eea;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    transition: all 0.3s ease;
    display: none;
    cursor: pointer;
    border: none;
}

#cookie-settings-trigger:hover {
    background-color: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

#cookie-settings-trigger.show {
    display: inline-block;
}
