/* ==========================================
   Cookie Banner – A4Z BAU
   DSGVO-konform, minimalistisch, responsive
   ========================================== */

.cookie-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    max-width: 460px;
    margin-left: auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 22px 22px 18px;
    font-family: inherit;
    color: #1a1a1a;
    transform: translateY(30px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.cookie-banner.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.cookie-banner__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.cookie-banner__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #fdecec;
    color: #c1272d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

.cookie-banner__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
}

.cookie-banner__text {
    margin: 0 0 14px;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #555;
}

.cookie-banner__text a {
    color: #c1272d;
    text-decoration: underline;
}

.cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cookie-banner__btn {
    flex: 1 1 auto;
    min-width: 110px;
    padding: 11px 16px;
    border-radius: 10px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.cookie-banner__btn--accept {
    background: #c1272d;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(193, 39, 45, 0.25);
}

.cookie-banner__btn--accept:hover {
    background: #a31e23;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(193, 39, 45, 0.32);
}

.cookie-banner__btn--decline {
    background: #f3f4f6;
    color: #1a1a1a;
}

.cookie-banner__btn--decline:hover {
    background: #e5e7eb;
}

.cookie-banner__btn--settings {
    background: transparent;
    color: #555;
    padding: 11px 10px;
    flex: 0 0 auto;
    min-width: auto;
}

.cookie-banner__btn--settings:hover {
    color: #c1272d;
}

/* Settings Panel */
.cookie-banner__settings {
    display: none;
    margin: 14px 0 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.cookie-banner.is-settings-open .cookie-banner__settings {
    display: block;
}

.cookie-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.cookie-option:last-child {
    border-bottom: none;
}

.cookie-option__info strong {
    display: block;
    font-size: 0.9rem;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.cookie-option__info span {
    display: block;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #6b7280;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 4px;
}

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

.cookie-toggle__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #d1d5db;
    border-radius: 22px;
    transition: background 0.25s ease;
}

.cookie-toggle__slider::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle__slider {
    background: #c1272d;
}

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

.cookie-toggle input:disabled + .cookie-toggle__slider {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Mobile */
@media screen and (max-width: 600px) {
    .cookie-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
        padding: 18px 18px 14px;
        border-radius: 14px;
    }

    .cookie-banner__title {
        font-size: 1rem;
    }

    .cookie-banner__text {
        font-size: 0.85rem;
    }

    .cookie-banner__btn {
        min-width: 100%;
    }

    .cookie-banner__btn--settings {
        min-width: 100%;
    }
}
