/* Cookie Consent Banner & Modal */

:root {
    --cookie-bg: #ffffff;
    --cookie-text: #2d3748;
    --cookie-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --cookie-primary: #e67e22;
    --cookie-secondary: #edf2f7;
}

/* Banner */
#cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--cookie-bg);
    color: var(--cookie-text);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--cookie-shadow);
    z-index: 9999;
    display: none;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid #e2e8f0;
}

@media (min-width: 768px) {
    #cookie-banner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        max-width: 1000px;
        margin: 0 auto;
    }
}

#cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.cookie-btn-accept { background: var(--cookie-primary); color: white; }
.cookie-btn-accept:hover { opacity: 0.9; }

.cookie-btn-reject { background: #f7fafc; color: #4a5568; border: 1px solid #e2e8f0; }
.cookie-btn-reject:hover { background: #edf2f7; }

.cookie-btn-settings { background: transparent; color: #718096; text-decoration: underline; padding: 0.6rem 0.5rem; }

/* Modal */
#cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#cookie-modal {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--cookie-shadow);
}

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

.cookie-modal-header h3 { margin: 0; font-size: 1.25rem; }

.cookie-modal-body { padding: 1.5rem; max-height: 60vh; overflow-y: auto; }

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.cookie-option-info h4 { margin: 0 0 0.25rem 0; font-size: 1rem; }
.cookie-option-info p { margin: 0; font-size: 0.85rem; color: #718096; line-height: 1.4; }

/* Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

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

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

input:checked + .cookie-slider { background-color: var(--cookie-primary); }
input:checked + .cookie-slider:before { transform: translateX(20px); }
input:disabled + .cookie-slider { opacity: 0.5; cursor: not-allowed; }

.cookie-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: flex-end;
}

/* Floating Settings Button */
#cookie-settings-trigger {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: white;
    color: #718096;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 9998;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s;
}

#cookie-settings-trigger:hover { transform: scale(1.1); }
#cookie-settings-trigger svg { width: 20px; height: 20px; }
