/* ── MoovLogic Consent Banner & Modal ─────────────────────────────────────── */

/* ── Banner ──────────────────────────────────────────────────────────────── */

.ml-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #16181C;
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 1rem 1.5rem;
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 -4px 32px rgba(0,0,0,.45);
}

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

.ml-consent-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.ml-consent-banner__msg {
    flex: 1;
    min-width: 260px;
    margin: 0;
    font-size: .875rem;
    line-height: 1.65;
    color: #8E9098;
}

.ml-consent-banner__msg em {
    color: #ECECEA;
    font-style: normal;
}

.ml-consent-banner__actions {
    display: flex;
    align-items: center;
    gap: .625rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* ── Shared button base ──────────────────────────────────────────────────── */

.ml-consent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    font-size: .8125rem;
    font-weight: 600;
    padding: .5rem 1.25rem;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.4;
    text-decoration: none;
}

.ml-consent-btn--primary {
    background: #00D27A;
    color: #0E0F12;
}
.ml-consent-btn--primary:hover {
    background: #00bf6e;
    transform: translateY(-1px);
}

.ml-consent-btn--outline {
    background: transparent;
    color: #ECECEA;
    border: 1px solid rgba(255,255,255,.2);
}
.ml-consent-btn--outline:hover {
    border-color: rgba(255,255,255,.4);
    background: rgba(255,255,255,.05);
}

.ml-consent-btn--ghost {
    background: transparent;
    color: #8E9098;
    padding-left: .625rem;
    padding-right: .625rem;
}
.ml-consent-btn--ghost:hover {
    color: #ECECEA;
}

/* ── Modal overlay ───────────────────────────────────────────────────────── */

.ml-consent-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity .25s ease, visibility .25s ease;
}

.ml-consent-modal.is-open {
    visibility: visible;
    opacity: 1;
}

.ml-consent-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.72);
    cursor: pointer;
}

.ml-consent-modal__card {
    position: relative;
    background: #1D1F24;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    padding: 2rem;
    width: min(480px, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,.55);
}

.ml-consent-modal__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #ECECEA;
    margin: 0 0 .625rem;
    line-height: 1.3;
}

.ml-consent-modal__intro {
    font-size: .875rem;
    color: #8E9098;
    line-height: 1.65;
    margin: 0 0 1.5rem;
}

/* ── Category rows ───────────────────────────────────────────────────────── */

.ml-consent-modal__categories {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.ml-consent-cat {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
    padding: 1rem;
}

.ml-consent-cat__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .5rem;
}

.ml-consent-cat__name {
    font-size: .875rem;
    font-weight: 600;
    color: #ECECEA;
}

.ml-consent-cat__always-on {
    font-size: .75rem;
    color: #00D27A;
    font-weight: 500;
    margin-left: .375rem;
}

.ml-consent-cat__desc {
    font-size: .8125rem;
    color: #8E9098;
    line-height: 1.55;
    margin: 0;
}

/* ── Toggle switch ───────────────────────────────────────────────────────── */

.ml-consent-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    cursor: pointer;
}

.ml-consent-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.ml-consent-toggle__track {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.15);
    border-radius: 100px;
    transition: background .2s ease;
}

.ml-consent-toggle__track::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.ml-consent-toggle input:checked + .ml-consent-toggle__track {
    background: #00D27A;
}

.ml-consent-toggle input:checked + .ml-consent-toggle__track::after {
    transform: translateX(18px);
}

.ml-consent-toggle input:focus-visible + .ml-consent-toggle__track {
    outline: 2px solid #00D27A;
    outline-offset: 2px;
}

/* Always-on toggle (essential — visually on, non-interactive) */
.ml-consent-toggle--on {
    display: inline-block;
    width: 40px;
    height: 22px;
    border-radius: 100px;
    background: #00D27A;
    flex-shrink: 0;
    opacity: .5;
    position: relative;
    cursor: not-allowed;
}

.ml-consent-toggle--on::after {
    content: '';
    position: absolute;
    right: 3px;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

/* ── Modal footer ────────────────────────────────────────────────────────── */

.ml-consent-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,.08);
}

.ml-consent-modal__policy-link {
    font-size: .8125rem;
    color: #8E9098;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ml-consent-modal__policy-link:hover {
    color: #ECECEA;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .ml-consent-banner__inner {
        flex-direction: column;
        align-items: stretch;
    }
    .ml-consent-banner__actions {
        flex-direction: column-reverse;
    }
    .ml-consent-banner__actions .ml-consent-btn {
        width: 100%;
        justify-content: center;
        padding-top: .625rem;
        padding-bottom: .625rem;
    }
    .ml-consent-modal__footer {
        flex-direction: column;
        align-items: stretch;
    }
    .ml-consent-modal__footer .ml-consent-btn {
        width: 100%;
        justify-content: center;
    }
}
