/* Cookie Consent Banner */

.cookie-consent {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%) translateY(120%);
    z-index: 1090;
    width: min(640px, calc(100vw - 1.5rem));
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
    opacity: 0;
    pointer-events: none;
}

.cookie-consent--with-nav {
    bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}

.cookie-consent.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Desktop: kompakte Ecke unten rechts statt volle Breite */
@media (min-width: 768px) {
    .cookie-consent {
        left: auto;
        right: 1.25rem;
        bottom: 1.25rem;
        width: min(22rem, calc(100vw - 2.5rem));
        transform: translateY(calc(100% + 1.5rem));
    }

    .cookie-consent--with-nav {
        bottom: 1.25rem;
    }

    .cookie-consent.is-visible {
        transform: translateY(0);
    }

    .cookie-consent-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-consent-actions .btn {
        width: 100%;
    }

    .cookie-consent-settings-toggle {
        text-align: center;
    }
}

.cookie-consent-inner {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.15);
    padding: 1.25rem;
}

[data-bs-theme="dark"] .cookie-consent-inner {
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.45);
}

.cookie-consent-main {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.cookie-consent-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--accent-color, #0d6efd) 12%, transparent);
    color: var(--accent-color, #0d6efd);
    font-size: 1.25rem;
}

.cookie-consent-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.375rem;
    line-height: 1.3;
}

.cookie-consent-text {
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
    line-height: 1.5;
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.cookie-consent-settings-toggle {
    font-size: 0.875rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.cookie-consent-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bs-border-color);
}

.cookie-consent-category + .cookie-consent-category {
    margin-top: 0.875rem;
}

.cookie-consent-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.cookie-consent-details-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

.cookie-consent-fab {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 1040;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.cookie-consent-fab--with-nav {
    bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}

.cookie-consent-fab:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    transform: scale(1.05);
}

.cookie-consent-fab i {
    color: var(--accent-color, #0d6efd);
    font-size: 1.1rem;
}

@media (max-width: 575.98px) {
    .cookie-consent-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-consent-actions .btn {
        width: 100%;
    }

    .cookie-consent-settings-toggle {
        text-align: center;
    }
}
