/**
 * Modal promocional - Landimotos
 *
 * Desktop:
 * 1200 × 900 px
 *
 * Móvil:
 * 1080 × 1440 px
 */

/* ==================================================
   MODAL OCULTO
   ================================================== */

.lm-promo-modal[hidden] {
    display: none !important;
}

/* ==================================================
   BLOQUEAR SCROLL
   ================================================== */

html.lm-promo-modal-open,
body.lm-promo-modal-open {
    overflow: hidden !important;
}

/* ==================================================
   CONTENEDOR GENERAL
   ================================================== */

body .lm-promo-modal {
    position: fixed !important;

    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;

    z-index: 9999999 !important;

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    width: 100vw !important;

    height: 100vh !important;
    height: 100dvh !important;

    margin: 0 !important;
    padding: 24px !important;

    overflow: hidden !important;

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    background: transparent !important;

    box-sizing: border-box !important;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

/* ==================================================
   MODAL ABIERTO
   ================================================== */

body .lm-promo-modal.is-open {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}

/* ==================================================
   OVERLAY
   ================================================== */

body .lm-promo-modal__overlay {
    position: absolute !important;

    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;

    z-index: 1 !important;

    width: 100% !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    background:
        rgba(
            0,
            0,
            0,
            0.72
        ) !important;

    backdrop-filter: blur(3px);

    -webkit-backdrop-filter: blur(3px);

    cursor: pointer;
}

/* ==================================================
   VENTANA DEL MODAL
   ================================================== */

body .lm-promo-modal__dialog {
    position: relative !important;

    z-index: 2 !important;

    display: block !important;

    /*
     * Desktop:
     * reducido para que se vea más equilibrado.
     */

    width:
        min(
            700px,
            calc(100vw - 48px)
        ) !important;

    max-width: 700px !important;

    max-height:
        calc(
            100dvh - 48px
        ) !important;

    margin: 0 !important;

    padding: 0 !important;

    overflow: visible !important;

    border: 0 !important;

    border-radius: 12px !important;

    background: transparent !important;

    box-shadow:
        0 24px 70px
        rgba(
            0,
            0,
            0,
            0.38
        ) !important;

    transform:
        translateY(16px)
        scale(0.97);

    box-sizing: border-box !important;

    transition:
        transform 0.25s ease;
}

/* ==================================================
   ANIMACIÓN
   ================================================== */

body .lm-promo-modal.is-open
    .lm-promo-modal__dialog {
    transform:
        translateY(0)
        scale(1);
}

/* ==================================================
   ENLACE
   ================================================== */

body .lm-promo-modal__link {
    display: block !important;

    width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;

    color: inherit !important;

    text-decoration: none !important;

    line-height: 0 !important;
}

/* ==================================================
   PICTURE
   ================================================== */

body .lm-promo-modal__picture {
    display: block !important;

    width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    line-height: 0 !important;
}

/* ==================================================
   IMAGEN
   ================================================== */

body .lm-promo-modal__image {
    position: relative !important;

    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    height: auto !important;

    max-height:
        calc(
            100dvh - 48px
        ) !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;

    border-radius: 12px !important;

    background: transparent !important;

    object-fit: contain !important;
    object-position: center !important;

    vertical-align: top !important;

    user-select: none;

    -webkit-user-select: none;
    -webkit-user-drag: none;
}

/* ==================================================
   BOTÓN CERRAR
   ================================================== */

body .lm-promo-modal__close {
    position: absolute !important;

    top: -15px !important;
    right: -15px !important;

    z-index: 10 !important;

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;

    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;

    border-radius: 50% !important;

    background: #ffffff !important;

    color: #212322 !important;

    box-shadow:
        0 4px 18px
        rgba(
            0,
            0,
            0,
            0.28
        ) !important;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    font-size: 0 !important;
    line-height: 1 !important;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

/* ==================================================
   HOVER BOTÓN CERRAR
   ================================================== */

body .lm-promo-modal__close:hover {
    background: #fe5000 !important;

    color: #ffffff !important;

    transform: scale(1.06);
}

/* ==================================================
   FOCUS BOTÓN CERRAR
   ================================================== */

body .lm-promo-modal__close:focus {
    outline: none !important;
}

body .lm-promo-modal__close:focus-visible {
    outline:
        3px solid
        rgba(
            254,
            80,
            0,
            0.35
        ) !important;

    outline-offset: 3px;
}

/* ==================================================
   SVG DE LA X
   ================================================== */

body .lm-promo-modal__close svg {
    display: block !important;

    width: 18px !important;
    height: 18px !important;

    margin: 0 !important;
    padding: 0 !important;

    fill: none !important;

    stroke: currentColor !important;

    stroke-width: 2 !important;

    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

/* ==================================================
   QUITAR ICONOS DE WOODMART
   ================================================== */

body .lm-promo-modal__close::before,
body .lm-promo-modal__close::after {
    display: none !important;

    content: none !important;
}

/* ==================================================
   TABLET
   ================================================== */

@media (max-width: 991px) {

    body .lm-promo-modal {
        padding: 20px !important;
    }

    body .lm-promo-modal__dialog {
        width:
            min(
                700px,
                calc(
                    100vw - 40px
                )
            ) !important;

        max-width: 700px !important;

        max-height:
            calc(
                100dvh - 40px
            ) !important;
    }

    body .lm-promo-modal__image {
        max-height:
            calc(
                100dvh - 40px
            ) !important;
    }
}

/* ==================================================
   MÓVIL
   ================================================== */

@media (max-width: 767px) {

    body .lm-promo-modal {
        padding: 12px !important;
    }

    body .lm-promo-modal__dialog {
        width:
            min(
                430px,
                calc(
                    100vw - 24px
                )
            ) !important;

        max-width: 430px !important;

        max-height:
            calc(
                100dvh - 24px
            ) !important;

        border-radius:
            10px !important;
    }

    body .lm-promo-modal__image {
        max-height:
            calc(
                100dvh - 24px
            ) !important;

        border-radius:
            10px !important;
    }

    body .lm-promo-modal__close {
        top: 9px !important;
        right: 9px !important;

        width: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;

        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;

        background:
            rgba(
                255,
                255,
                255,
                0.96
            ) !important;

        box-shadow:
            0 3px 12px
            rgba(
                0,
                0,
                0,
                0.22
            ) !important;
    }

    body .lm-promo-modal__close svg {
        width: 17px !important;
        height: 17px !important;
    }
}

/* ==================================================
   TELÉFONOS PEQUEÑOS
   ================================================== */

@media (max-width: 380px) {

    body .lm-promo-modal {
        padding: 8px !important;
    }

    body .lm-promo-modal__dialog {
        width:
            calc(
                100vw - 16px
            ) !important;

        max-height:
            calc(
                100dvh - 16px
            ) !important;
    }

    body .lm-promo-modal__image {
        max-height:
            calc(
                100dvh - 16px
            ) !important;
    }

    body .lm-promo-modal__close {
        top: 7px !important;
        right: 7px !important;

        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;

        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
    }
}

/* ==================================================
   REDUCIR MOVIMIENTO
   ================================================== */

@media (prefers-reduced-motion: reduce) {

    body .lm-promo-modal,
    body .lm-promo-modal__dialog,
    body .lm-promo-modal__close {
        transition: none !important;
    }
}