/* GDPR Cookie Consent Banner Styles */

:root {
    --consent-primary: #6366f1;
    --consent-primary-hover: #4f46e5;
    --consent-text: #1f2937;
    --consent-text-light: #6b7280;
    --consent-bg: #ffffff;
    --consent-border: #e5e7eb;
    --consent-overlay: rgba(0, 0, 0, 0.5);
    --consent-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

/* Cookie Consent Banner */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--consent-bg);
    border-top: 1px solid var(--consent-border);
    box-shadow: var(--consent-shadow);
    padding: 20px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

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

.cookie-consent-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--consent-text);
    margin-bottom: 8px;
}

.cookie-consent-text {
    font-size: 14px;
    color: var(--consent-text-light);
    line-height: 1.5;
    margin: 0;
}

.cookie-consent-text a {
    color: var(--consent-primary);
    text-decoration: none;
    font-weight: 500;
}

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

.cookie-consent-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-consent-btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

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

.cookie-consent-btn-accept:hover {
    background: var(--consent-primary-hover);
    transform: translateY(-1px);
}

.cookie-consent-btn-customize {
    background: transparent;
    color: var(--consent-text);
    border: 1px solid var(--consent-border);
}

.cookie-consent-btn-customize:hover {
    background: #f9fafb;
    border-color: var(--consent-primary);
}

.cookie-consent-btn-reject {
    background: transparent;
    color: var(--consent-text-light);
    border: 1px solid var(--consent-border);
}

.cookie-consent-btn-reject:hover {
    background: #f9fafb;
    color: var(--consent-text);
}

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

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

.cookie-settings-content {
    background: var(--consent-bg);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cookie-settings-header {
    padding: 24px;
    border-bottom: 1px solid var(--consent-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-settings-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--consent-text);
    margin: 0;
}

.cookie-settings-close {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--consent-text-light);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cookie-settings-close:hover {
    background: #f9fafb;
    color: var(--consent-text);
}

.cookie-settings-body {
    padding: 24px;
}

.cookie-settings-intro {
    font-size: 14px;
    color: var(--consent-text-light);
    line-height: 1.6;
    margin-bottom: 24px;
}

.cookie-category {
    border: 1px solid var(--consent-border);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.cookie-category-header {
    padding: 16px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cookie-category-header:hover {
    background: #f3f4f6;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--consent-text);
    margin: 0 0 4px 0;
}

.cookie-category-description {
    font-size: 13px;
    color: var(--consent-text-light);
    margin: 0;
}

.cookie-category-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-category-status {
    font-size: 12px;
    color: var(--consent-text-light);
    font-weight: 500;
}

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

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

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

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--consent-primary);
}

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

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

.cookie-category-details {
    display: none;
    padding: 16px;
    border-top: 1px solid var(--consent-border);
    background: white;
}

.cookie-category.expanded .cookie-category-details {
    display: block;
}

.cookie-category-details p {
    font-size: 14px;
    color: var(--consent-text);
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.cookie-category-details ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

.cookie-category-details li {
    font-size: 13px;
    color: var(--consent-text-light);
    margin-bottom: 6px;
}

.cookie-settings-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--consent-border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cookie-settings-btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cookie-settings-btn-save {
    background: var(--consent-primary);
    color: white;
}

.cookie-settings-btn-save:hover {
    background: var(--consent-primary-hover);
}

.cookie-settings-btn-cancel {
    background: transparent;
    color: var(--consent-text);
    border: 1px solid var(--consent-border);
}

.cookie-settings-btn-cancel:hover {
    background: #f9fafb;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-consent-container {
        flex-direction: column;
        gap: 16px;
    }

    .cookie-consent-content {
        min-width: 100%;
    }

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

    .cookie-consent-btn {
        width: 100%;
        text-align: center;
    }

    .cookie-settings-header {
        padding: 16px;
    }

    .cookie-settings-title {
        font-size: 20px;
    }

    .cookie-settings-body {
        padding: 16px;
    }

    .cookie-settings-footer {
        flex-direction: column-reverse;
    }

    .cookie-settings-btn {
        width: 100%;
    }
}

/* Accessibility */
.cookie-consent-btn:focus,
.toggle-switch input:focus + .toggle-slider {
    outline: 2px solid var(--consent-primary);
    outline-offset: 2px;
}

.cookie-settings-close:focus {
    outline: 2px solid var(--consent-primary);
    outline-offset: 2px;
}

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

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