/* ============================================
   Cookie Consent Bar - MIASPI
   layout/bauen/assets/css/cookie-consent.css
   ============================================ */

.cookie-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: rgba(34, 34, 34, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,0.08);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
    font-family: 'Didact Gothic', sans-serif;
}

.cookie-bar.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.cookie-bar.is-hiding {
    transform: translateY(100%);
    opacity: 0;
}

.cookie-bar__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.cookie-bar__text p {
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.cookie-bar__text a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.2s;
}

.cookie-bar__text a:hover {
    opacity: 0.7;
}

.cookie-bar__actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-bar__btn {
    font-family: 'Didact Gothic', sans-serif;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 10px 24px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-bar__btn--accept {
    background: #c30f35;
    color: #fff;
    border-color: #c30f35;
}

.cookie-bar__btn--accept:hover {
    background: #a00d2d;
    border-color: #a00d2d;
}

.cookie-bar__btn--settings {
    background: transparent;
    color: rgba(255,255,255,0.7);
}

.cookie-bar__btn--settings:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

/* ---- Settings Panel ---- */
.cookie-settings {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-settings.is-open {
    max-height: 400px;
}

.cookie-settings__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px;
}

.cookie-settings__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cookie-settings__item:last-of-type {
    border-bottom: none;
    margin-bottom: 16px;
}

.cookie-settings__info h5 {
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin: 0 0 2px;
}

.cookie-settings__info p {
    color: rgba(255,255,255,0.45);
    font-size: 12px;
    margin: 0;
}

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

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

.cookie-toggle__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 24px;
    transition: background 0.3s ease;
}

.cookie-toggle__slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

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

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

.cookie-toggle--disabled .cookie-toggle__slider {
    cursor: not-allowed;
    opacity: 0.5;
}

.cookie-toggle--disabled input:checked + .cookie-toggle__slider {
    background: rgba(255,255,255,0.3);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .cookie-bar__inner {
        flex-direction: column;
        padding: 18px 20px;
        gap: 16px;
        text-align: center;
    }

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

    .cookie-bar__text p {
        font-size: 13px;
    }

    .cookie-settings__inner {
        padding: 0 20px 18px;
        padding-top: 18px;
    }
}
