/**
 * Cookie Consent Banner & Modal Styles
 * DSGVO-konforme Gestaltung
 */

/* Banner Styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--glass-bg, rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border, rgba(0, 0, 0, 0.1));
    padding: 24px;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.3s ease;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.1);
}

.cookie-consent-banner.visible {
    transform: translateY(0);
    opacity: 1;
}

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

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

.cookie-consent-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text-primary, #1a1a2e);
}

.cookie-consent-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary, #6b7280);
    margin: 0;
}

.cookie-consent-link {
    color: var(--color-primary, #2B8CA3);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-consent-link:hover {
    color: var(--color-primary-dark, #1a6b7f);
}

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

/* Button Styles */
.cookie-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: var(--color-primary, #2B8CA3);
    color: white;
}

.cookie-btn-accept:hover {
    background: var(--color-primary-dark, #1a6b7f);
    transform: translateY(-2px);
}

.cookie-btn-necessary {
    background: transparent;
    color: var(--text-primary, #1a1a2e);
    border: 1px solid var(--border-color, #e5e7eb);
}

.cookie-btn-necessary:hover {
    background: var(--bg-secondary, #f3f4f6);
}

.cookie-btn-settings {
    background: transparent;
    color: var(--color-primary, #2B8CA3);
    border: 1px solid var(--color-primary, #2B8CA3);
}

.cookie-btn-settings:hover {
    background: var(--color-primary, #2B8CA3);
    color: white;
}

.cookie-btn-save {
    background: var(--color-secondary, #10b981);
    color: white;
}

.cookie-btn-save:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Settings Modal */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-settings-modal.visible {
    opacity: 1;
    visibility: visible;
}

.cookie-settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.cookie-settings-content {
    position: relative;
    background: var(--bg-primary, #ffffff);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.cookie-settings-modal.visible .cookie-settings-content {
    transform: scale(1);
}

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

.cookie-settings-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary, #1a1a2e);
}

.cookie-settings-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary, #6b7280);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.cookie-settings-close:hover {
    background: var(--bg-secondary, #f3f4f6);
    color: var(--text-primary, #1a1a2e);
}

.cookie-settings-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.cookie-settings-intro {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary, #6b7280);
    margin: 0 0 24px 0;
}

/* Cookie Category */
.cookie-category {
    background: var(--bg-secondary, #f9fafb);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

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

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

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

.cookie-category-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text-primary, #1a1a2e);
}

.cookie-category-description {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary, #6b7280);
    margin: 0;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

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

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color, #d1d5db);
    transition: 0.3s;
    border-radius: 28px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: var(--color-primary, #2B8CA3);
}

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

.cookie-toggle-slider.disabled {
    background-color: var(--color-primary, #2B8CA3);
    opacity: 0.6;
    cursor: not-allowed;
}

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

/* Settings Footer */
.cookie-settings-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    justify-content: flex-end;
}

/* Dark Mode Support */
[data-theme="dark"] .cookie-consent-banner,
.dark .cookie-consent-banner {
    background: rgba(30, 30, 40, 0.95);
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .cookie-consent-title,
.dark .cookie-consent-title {
    color: #ffffff;
}

[data-theme="dark"] .cookie-consent-description,
.dark .cookie-consent-description {
    color: #9ca3af;
}

[data-theme="dark"] .cookie-settings-content,
.dark .cookie-settings-content {
    background: #1a1a2e;
}

[data-theme="dark"] .cookie-settings-title,
.dark .cookie-settings-title,
[data-theme="dark"] .cookie-category-title,
.dark .cookie-category-title {
    color: #ffffff;
}

[data-theme="dark"] .cookie-settings-intro,
.dark .cookie-settings-intro,
[data-theme="dark"] .cookie-category-description,
.dark .cookie-category-description {
    color: #9ca3af;
}

[data-theme="dark"] .cookie-category,
.dark .cookie-category {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .cookie-settings-header,
.dark .cookie-settings-header,
[data-theme="dark"] .cookie-settings-footer,
.dark .cookie-settings-footer {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .cookie-btn-necessary,
.dark .cookie-btn-necessary {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .cookie-btn-necessary:hover,
.dark .cookie-btn-necessary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .cookie-consent-banner {
        padding: 20px 16px;
    }

    .cookie-consent-content {
        flex-direction: column;
        gap: 16px;
    }

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

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

    .cookie-btn {
        width: 100%;
        justify-content: center;
    }

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

    .cookie-settings-content {
        max-height: 95vh;
    }

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

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

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