/* =========================================================
   MZ COOKIE CONSENT
   Frontend
   Motion Z
========================================================= */

:root {
    --mzcc-primary: #6c5ce7;
    --mzcc-primary-hover: #5848d6;

    --mzcc-text: #1f2937;
    --mzcc-muted: #6b7280;

    --mzcc-bg: #ffffff;
    --mzcc-bg-soft: #f7f7fa;

    --mzcc-border: #e5e7eb;

    --mzcc-success: #16a085;

    --mzcc-overlay: rgba(15, 18, 30, 0.58);

    --mzcc-radius: 18px;
    --mzcc-radius-small: 11px;

    --mzcc-shadow:
        0 24px 70px rgba(15, 23, 42, 0.18);
}


/* =========================================================
   RESET LOCAL
========================================================= */

.mzcc-banner *,
.mzcc-modal *,
.mzcc-floating-button *,
.mzcc-banner *::before,
.mzcc-banner *::after,
.mzcc-modal *::before,
.mzcc-modal *::after,
.mzcc-floating-button *::before,
.mzcc-floating-button *::after {
    box-sizing: border-box;
}


/* =========================================================
   HIDDEN
========================================================= */

.mzcc-banner[hidden],
.mzcc-modal[hidden],
.mzcc-floating-button[hidden] {
    display: none !important;
}


/* =========================================================
   BANNER
========================================================= */

.mzcc-banner {
    position: fixed;

    left: 24px;
    right: 24px;
    bottom: 24px;

    z-index: 999999;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}

.mzcc-banner__inner {
    width: 100%;
    max-width: 1180px;

    margin: 0 auto;

    display: grid;

    grid-template-columns:
        auto
        minmax(0, 1fr)
        auto;

    align-items: center;

    gap: 18px;

    padding: 20px 22px;

    background:
        rgba(255, 255, 255, 0.98);

    border:
        1px solid
        rgba(226, 232, 240, 0.95);

    border-radius:
        var(--mzcc-radius);

    box-shadow:
        var(--mzcc-shadow);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);

    animation:
        mzccBannerEnter
        0.35s
        cubic-bezier(
            0.22,
            1,
            0.36,
            1
        )
        both;
}


/* =========================================================
   ICONO BANNER
========================================================= */

.mzcc-banner__icon {
    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #f3f0ff,
            #ebe7ff
        );

    border:
        1px solid
        #ded8ff;

    border-radius:
        14px;

    font-size: 24px;

    line-height: 1;
}


/* =========================================================
   CONTENIDO BANNER
========================================================= */

.mzcc-banner__content {
    min-width: 0;
}

.mzcc-banner__title {
    margin: 0 0 5px;

    color: var(--mzcc-text);

    font-size: 16px;
    line-height: 1.25;

    font-weight: 700;
}

.mzcc-banner__description {
    margin: 0;

    max-width: 730px;

    color: var(--mzcc-muted);

    font-size: 13px;
    line-height: 1.55;

    font-weight: 400;
}


/* =========================================================
   LINKS LEGALES BANNER
========================================================= */

.mzcc-banner__legal {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 7px;

    margin-top: 7px;

    color: #a0a5ae;

    font-size: 11.5px;
}

.mzcc-banner__legal a {
    color:
        var(--mzcc-primary);

    text-decoration:
        none;

    font-weight: 600;

    transition:
        color
        0.18s ease;
}

.mzcc-banner__legal a:hover,
.mzcc-banner__legal a:focus {
    color:
        var(--mzcc-primary-hover);

    text-decoration:
        underline;
}


/* =========================================================
   ACCIONES DEL BANNER
========================================================= */

.mzcc-banner__actions {
    display: flex;
    align-items: center;

    gap: 9px;

    flex-wrap: wrap;

    justify-content: flex-end;
}


/* =========================================================
   BOTONES
========================================================= */

.mzcc-button {
    appearance: none;
    -webkit-appearance: none;

    min-height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding:
        9px
        15px;

    border:
        1px solid
        transparent;

    border-radius:
        10px;

    cursor: pointer;

    font-family: inherit;

    font-size: 12.5px;
    line-height: 1.2;

    font-weight: 650;

    text-align: center;

    text-decoration: none;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}


/* =========================================================
   BOTÓN PRIMARIO
========================================================= */

.mzcc-button--primary {
    background:
        var(--mzcc-primary);

    border-color:
        var(--mzcc-primary);

    color:
        #ffffff;
}

.mzcc-button--primary:hover,
.mzcc-button--primary:focus {
    background:
        var(--mzcc-primary-hover);

    border-color:
        var(--mzcc-primary-hover);

    color:
        #ffffff;

    box-shadow:
        0 6px 18px
        rgba(108, 92, 231, 0.22);
}

.mzcc-button--primary:active {
    transform:
        translateY(1px);
}


/* =========================================================
   BOTÓN SECUNDARIO
========================================================= */

.mzcc-button--secondary {
    background:
        #ffffff;

    border-color:
        #d8dce3;

    color:
        #374151;
}

.mzcc-button--secondary:hover,
.mzcc-button--secondary:focus {
    background:
        #f7f7fa;

    border-color:
        #c9ced7;

    color:
        #111827;
}


/* =========================================================
   BOTÓN TEXTO
========================================================= */

.mzcc-button--text {
    background:
        transparent;

    border-color:
        transparent;

    color:
        var(--mzcc-primary);

    padding-left: 9px;
    padding-right: 9px;
}

.mzcc-button--text:hover,
.mzcc-button--text:focus {
    background:
        #f3f1ff;

    color:
        var(--mzcc-primary-hover);
}


/* =========================================================
   FOCUS ACCESIBLE
========================================================= */

.mzcc-button:focus-visible,
.mzcc-floating-button:focus-visible,
.mzcc-modal__close:focus-visible {
    outline:
        3px solid
        rgba(108, 92, 231, 0.26);

    outline-offset:
        2px;
}


/* =========================================================
   MODAL
========================================================= */

.mzcc-modal {
    position: fixed;

    inset: 0;

    z-index:
        1000000;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 24px;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}


/* =========================================================
   BACKDROP
========================================================= */

.mzcc-modal__backdrop {
    position: absolute;

    inset: 0;

    background:
        var(--mzcc-overlay);

    backdrop-filter:
        blur(5px);

    -webkit-backdrop-filter:
        blur(5px);

    animation:
        mzccBackdropEnter
        0.22s ease
        both;
}


/* =========================================================
   CONTENEDOR MODAL
========================================================= */

.mzcc-modal__dialog {
    position: relative;

    z-index: 2;

    width: 100%;
    max-width: 610px;

    max-height:
        calc(
            100vh - 48px
        );

    display: flex;
    flex-direction: column;

    background:
        var(--mzcc-bg);

    border:
        1px solid
        rgba(226, 232, 240, 0.9);

    border-radius:
        20px;

    box-shadow:
        0 30px 90px
        rgba(0, 0, 0, 0.25);

    overflow: hidden;

    animation:
        mzccModalEnter
        0.28s
        cubic-bezier(
            0.22,
            1,
            0.36,
            1
        )
        both;
}


/* =========================================================
   HEADER MODAL
========================================================= */

.mzcc-modal__header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    padding:
        23px
        24px
        18px;

    border-bottom:
        1px solid
        var(--mzcc-border);
}

.mzcc-modal__eyebrow {
    display: block;

    margin-bottom: 4px;

    color:
        var(--mzcc-primary);

    text-transform:
        uppercase;

    letter-spacing:
        0.08em;

    font-size:
        9px;

    font-weight:
        800;
}

.mzcc-modal__header h2 {
    margin: 0;

    color:
        var(--mzcc-text);

    font-size:
        21px;

    line-height:
        1.2;

    font-weight:
        750;
}


/* =========================================================
   CERRAR MODAL
========================================================= */

.mzcc-modal__close {
    appearance: none;
    -webkit-appearance: none;

    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 0;

    background:
        #f5f6f8;

    border:
        1px solid
        #e5e7eb;

    border-radius:
        9px;

    color:
        #6b7280;

    cursor:
        pointer;

    font-family:
        Arial,
        sans-serif;

    font-size:
        22px;

    font-weight:
        300;

    line-height:
        1;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease;
}

.mzcc-modal__close:hover {
    background:
        #eeeeF2;

    border-color:
        #d8dce4;

    color:
        #111827;
}


/* =========================================================
   BODY MODAL
========================================================= */

.mzcc-modal__body {
    flex: 1 1 auto;

    overflow-y: auto;

    padding:
        21px
        24px;
}

.mzcc-modal__description {
    margin:
        0
        0
        18px;

    color:
        var(--mzcc-muted);

    font-size:
        13px;

    line-height:
        1.6;
}


/* =========================================================
   PREFERENCIA
========================================================= */

.mzcc-preference {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 22px;

    padding:
        16px
        0;

    border-bottom:
        1px solid
        var(--mzcc-border);
}

.mzcc-preference:last-of-type {
    border-bottom: 0;
}


/* =========================================================
   CONTENIDO PREFERENCIA
========================================================= */

.mzcc-preference__content {
    display: flex;

    align-items: flex-start;

    gap: 13px;

    min-width: 0;
}

.mzcc-preference__icon {
    width: 39px;
    height: 39px;

    flex: 0 0 39px;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        #f4f2ff;

    border:
        1px solid
        #e5e1ff;

    border-radius:
        11px;

    font-size:
        17px;
}

.mzcc-preference h3 {
    margin:
        0
        0
        4px;

    color:
        var(--mzcc-text);

    font-size:
        14px;

    line-height:
        1.3;

    font-weight:
        700;
}

.mzcc-preference p {
    margin:
        0;

    max-width:
        410px;

    color:
        var(--mzcc-muted);

    font-size:
        12px;

    line-height:
        1.55;
}


/* =========================================================
   HEADING PREFERENCIA
========================================================= */

.mzcc-preference__heading {
    display: flex;

    align-items: center;

    gap: 8px;

    flex-wrap: wrap;

    margin-bottom: 4px;
}

.mzcc-preference__heading h3 {
    margin: 0;
}


/* =========================================================
   BADGE
========================================================= */

.mzcc-required-badge {
    display: inline-flex;

    align-items: center;

    padding:
        3px
        7px;

    background:
        #ecf8f4;

    color:
        #16846d;

    border-radius:
        999px;

    font-size:
        9px;

    font-weight:
        750;
}


/* =========================================================
   SWITCH FRONTEND
========================================================= */

.mzcc-consent-switch {
    position: relative;

    display: inline-flex;

    width: 46px;
    height: 26px;

    flex:
        0
        0
        46px;
}

.mzcc-consent-switch input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;

    pointer-events: none;
}

.mzcc-consent-switch__slider {
    position: absolute;

    inset: 0;

    cursor: pointer;

    background:
        #d1d5db;

    border-radius:
        999px;

    transition:
        background
        0.2s ease,
        box-shadow
        0.2s ease;
}

.mzcc-consent-switch__slider::before {
    content: "";

    position: absolute;

    width: 20px;
    height: 20px;

    top: 3px;
    left: 3px;

    background:
        #ffffff;

    border-radius:
        50%;

    box-shadow:
        0 2px 6px
        rgba(0, 0, 0, 0.2);

    transition:
        transform
        0.2s ease;
}

.mzcc-consent-switch
input:checked
+
.mzcc-consent-switch__slider {
    background:
        var(--mzcc-primary);
}

.mzcc-consent-switch
input:checked
+
.mzcc-consent-switch__slider::before {
    transform:
        translateX(20px);
}


/* =========================================================
   SWITCH BLOQUEADO
========================================================= */

.mzcc-consent-switch--locked
.mzcc-consent-switch__slider {
    cursor:
        not-allowed;

    background:
        var(--mzcc-success);

    opacity:
        0.85;
}


/* =========================================================
   LINKS LEGALES MODAL
========================================================= */

.mzcc-modal__legal {
    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 18px;

    padding-top: 16px;

    border-top:
        1px solid
        var(--mzcc-border);

    color:
        #9ca3af;

    font-size:
        11px;
}

.mzcc-modal__legal a {
    color:
        var(--mzcc-primary);

    text-decoration:
        none;

    font-weight:
        600;
}

.mzcc-modal__legal a:hover {
    text-decoration:
        underline;
}


/* =========================================================
   FOOTER MODAL
========================================================= */

.mzcc-modal__footer {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 10px;

    padding:
        16px
        24px;

    background:
        #fafafb;

    border-top:
        1px solid
        var(--mzcc-border);
}


/* =========================================================
   BOTÓN FLOTANTE
========================================================= */

.mzcc-floating-button {
    position: fixed;

    left: 20px;
    bottom: 20px;

    z-index:
        999998;

    display: inline-flex;

    align-items: center;

    gap: 8px;

    min-height:
        42px;

    padding:
        8px
        12px;

    background:
        #ffffff;

    border:
        1px solid
        #e1e4e9;

    border-radius:
        999px;

    box-shadow:
        0 8px 28px
        rgba(15, 23, 42, 0.14);

    color:
        #374151;

    cursor:
        pointer;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size:
        12px;

    font-weight:
        650;

    line-height:
        1;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.mzcc-floating-button:hover {
    transform:
        translateY(-2px);

    border-color:
        #cbc6f7;

    box-shadow:
        0 12px 34px
        rgba(15, 23, 42, 0.18);
}

.mzcc-floating-button__icon {
    font-size:
        17px;

    line-height:
        1;
}

.mzcc-floating-button__text {
    line-height:
        1;
}


/* =========================================================
   BLOQUEO SCROLL MODAL
========================================================= */

html.mzcc-modal-open,
body.mzcc-modal-open {
    overflow:
        hidden !important;
}


/* =========================================================
   ANIMACIONES
========================================================= */

@keyframes mzccBannerEnter {

    from {
        opacity: 0;

        transform:
            translateY(18px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}


@keyframes mzccModalEnter {

    from {
        opacity: 0;

        transform:
            translateY(12px)
            scale(0.975);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}


@keyframes mzccBackdropEnter {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* =========================================================
   REDUCIR ANIMACIONES
========================================================= */

@media (
    prefers-reduced-motion:
    reduce
) {

    .mzcc-banner__inner,
    .mzcc-modal__dialog,
    .mzcc-modal__backdrop {
        animation: none;
    }

    .mzcc-button,
    .mzcc-floating-button,
    .mzcc-consent-switch__slider,
    .mzcc-consent-switch__slider::before {
        transition: none;
    }
}


/* =========================================================
   TABLET
========================================================= */

@media (
    max-width: 900px
) {

    .mzcc-banner__inner {
        grid-template-columns:
            auto
            minmax(0, 1fr);

        align-items:
            flex-start;
    }

    .mzcc-banner__actions {
        grid-column:
            1 / -1;

        justify-content:
            flex-end;

        padding-left:
            66px;
    }
}


/* =========================================================
   MÓVIL
========================================================= */

@media (
    max-width: 640px
) {

    .mzcc-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .mzcc-banner__inner {
        display: block;

        padding:
            18px;

        border-radius:
            16px;
    }

    .mzcc-banner__icon {
        width: 42px;
        height: 42px;

        margin-bottom:
            12px;

        font-size:
            21px;
    }

    .mzcc-banner__title {
        font-size:
            15px;
    }

    .mzcc-banner__description {
        font-size:
            12.5px;
    }

    .mzcc-banner__actions {
        display: grid;

        grid-template-columns:
            1fr;

        gap:
            8px;

        padding-left:
            0;

        margin-top:
            15px;
    }

    .mzcc-button {
        width: 100%;

        min-height:
            42px;
    }


    /* =====================================================
       MODAL MÓVIL
    ====================================================== */

    .mzcc-modal {
        padding:
            10px;

        align-items:
            flex-end;
    }

    .mzcc-modal__dialog {
        max-height:
            calc(
                100vh - 20px
            );

        border-radius:
            18px
            18px
            12px
            12px;
    }

    .mzcc-modal__header {
        padding:
            19px
            18px
            15px;
    }

    .mzcc-modal__header h2 {
        font-size:
            18px;
    }

    .mzcc-modal__body {
        padding:
            18px;
    }

    .mzcc-preference {
        align-items:
            flex-start;

        gap:
            12px;
    }

    .mzcc-preference__content {
        gap:
            10px;
    }

    .mzcc-preference__icon {
        display:
            none;
    }

    .mzcc-preference p {
        font-size:
            11.5px;
    }

    .mzcc-modal__footer {
        display: grid;

        grid-template-columns:
            1fr;

        padding:
            14px
            18px;
    }

    .mzcc-modal__footer
    .mzcc-button {
        width:
            100%;
    }


    /* =====================================================
       BOTÓN FLOTANTE MÓVIL
    ====================================================== */

    .mzcc-floating-button {
        left:
            12px;

        bottom:
            12px;

        min-width:
            42px;

        width:
            42px;

        height:
            42px;

        padding:
            0;

        justify-content:
            center;
    }

    .mzcc-floating-button__text {
        display:
            none;
    }
}