/*
 * REDECOMSA-SOCIO-MODAL-POLISH-1.1.0
 *
 * Modal institucional REDECOMSA.
 */


/* ====================================================
   BOTONES CONTACTO / VENTAS
   ==================================================== */

.rdc-redecomsa-contact-modal-button {
    display: inline-flex !important;

    width: 100%;

    min-height: 40px;

    gap: .45rem;

    align-items: center;
    justify-content: center;

    padding:
        .58rem
        .9rem;

    margin: 0;

    border-radius: 999px;

    cursor: pointer;

    font: inherit;

    font-size: .78rem;
    line-height: 1.15;
    font-weight: 800;

    text-decoration: none;

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        background-color .18s ease,
        border-color .18s ease;
}


.rdc-redecomsa-contact-modal-button.is-contact {
    border:
        1px solid
        rgba(0, 47, 103, .22);

    background: #f3f7fb;

    color: #003b73;
}


.rdc-redecomsa-contact-modal-button.is-sales {
    border:
        1px solid
        #f5a20b;

    background: #f5a20b;

    color: #082e5b;
}


.rdc-redecomsa-contact-modal-button .fa {
    font-size: .9rem;
}


/* ====================================================
   DIALOG
   ==================================================== */

.rdc-company-contact-dialog {
    box-sizing: border-box;

    width:
        min(
            720px,
            calc(100vw - 2rem)
        ) !important;

    max-width: 720px !important;
    max-height: 92dvh;

    margin: auto;

    padding: 0 !important;

    border: 0 !important;

    border-radius: 20px !important;

    overflow: hidden;

    background: #fff !important;

    color: #153c62;

    box-shadow:
        0 28px 80px
        rgba(0, 28, 66, .30) !important;
}


.rdc-company-contact-dialog::backdrop {
    background:
        rgba(0, 25, 58, .72);

    backdrop-filter:
        blur(4px);
}


.rdc-company-contact-dialog-shell {
    display: flex;

    width: 100%;

    max-height: 92dvh;

    flex-direction: column;

    background: #fff;
}


/* ====================================================
   CABECERA
   ==================================================== */

.rdc-company-contact-dialog-header {
    position: relative;

    display: flex !important;

    gap: 1rem;

    align-items: flex-start;
    justify-content: space-between;

    padding:
        1.05rem
        1.2rem
        1.1rem !important;

    border-top:
        4px solid
        #f5a20b;

    background:
        linear-gradient(
            135deg,
            #002359 0%,
            #00467f 100%
        ) !important;

    color: #fff !important;
}


.rdc-company-contact-dialog-header > div {
    min-width: 0;

    flex: 1 1 auto;
}


.rdc-company-contact-dialog-kicker {
    display: block;

    margin:
        0
        0
        .32rem;

    color: #f5a20b !important;

    font-size: .69rem;
    line-height: 1;

    font-weight: 900;

    letter-spacing: .10em;

    text-transform: uppercase;
}


.rdc-company-contact-dialog-header h2 {
    margin:
        0
        0
        .28rem !important;

    color: #fff !important;

    font-size: 1.34rem;
    line-height: 1.15;

    font-weight: 800;
}


.rdc-company-contact-dialog-header p {
    max-width: 560px;

    margin: 0 !important;

    color:
        rgba(
            255,
            255,
            255,
            .84
        ) !important;

    font-size: .82rem;
    line-height: 1.4;
}


/* ====================================================
   CERRAR
   ==================================================== */

.rdc-company-contact-dialog-close {
    display: inline-flex !important;

    width: 38px;
    height: 38px;

    flex:
        0
        0
        38px;

    align-items: center;
    justify-content: center;

    padding: 0 !important;

    margin: 0;

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            .24
        ) !important;

    border-radius: 50% !important;

    background:
        rgba(
            255,
            255,
            255,
            .10
        ) !important;

    color: #fff !important;

    cursor: pointer;

    box-shadow: none !important;
}


.rdc-company-contact-dialog-close .fa {
    font-size: .95rem;
}


/* ====================================================
   IFRAME
   ==================================================== */

.rdc-company-contact-dialog-frame {
    display: block;

    width: 100% !important;

    height:
        min(
            72dvh,
            700px
        );

    min-height: 520px;

    border: 0 !important;

    background: #fff;

    transition:
        height .25s ease,
        min-height .25s ease;
}


.rdc-company-contact-dialog-frame.is-success {
    height: 270px !important;

    min-height: 270px !important;
}


/* ====================================================
   HOVER
   ==================================================== */

@media (hover: hover) and (pointer: fine) {

    .rdc-redecomsa-contact-modal-button:hover,
    .rdc-redecomsa-contact-modal-button:focus-visible {
        transform:
            translateY(-2px);

        box-shadow:
            0 6px 16px
            rgba(0, 35, 89, .16);
    }


    .rdc-redecomsa-contact-modal-button.is-contact:hover,
    .rdc-redecomsa-contact-modal-button.is-contact:focus-visible {
        background: #e8f0f8;

        border-color:
            rgba(
                0,
                47,
                103,
                .35
            );
    }


    .rdc-redecomsa-contact-modal-button.is-sales:hover,
    .rdc-redecomsa-contact-modal-button.is-sales:focus-visible {
        background: #ffb52e;

        border-color: #ffb52e;
    }


    .rdc-company-contact-dialog-close:hover,
    .rdc-company-contact-dialog-close:focus-visible {
        background:
            rgba(
                255,
                255,
                255,
                .20
            ) !important;
    }

}


/* ====================================================
   TABLETA / CELULAR
   ==================================================== */

@media (max-width: 640px) {

    .rdc-company-contact-dialog {
        width:
            calc(
                100vw -
                .75rem
            ) !important;

        max-height: 96dvh;

        border-radius: 15px !important;
    }


    .rdc-company-contact-dialog-shell {
        max-height: 96dvh;
    }


    .rdc-company-contact-dialog-header {
        padding:
            .85rem
            .9rem
            .9rem !important;

        border-top-width: 3px;
    }


    .rdc-company-contact-dialog-header h2 {
        font-size: 1.12rem;
    }


    .rdc-company-contact-dialog-header p {
        font-size: .76rem;
    }


    .rdc-company-contact-dialog-close {
        width: 34px;
        height: 34px;

        flex-basis: 34px;
    }


    .rdc-company-contact-dialog-frame {
        height: 76dvh;

        min-height: 500px;
    }


    .rdc-company-contact-dialog-frame.is-success {
        height: 280px !important;

        min-height: 280px !important;
    }

}


/* ====================================================
   REDUCIR MOVIMIENTO
   ==================================================== */

@media (prefers-reduced-motion: reduce) {

    .rdc-redecomsa-contact-modal-button,
    .rdc-company-contact-dialog-frame {
        transition: none;
    }

}


/* REDECOMSA-SOCIO-MODAL-VIEWPORT-FIX-1.0.0 START */


/*
 * El problema anterior era:
 *
 * header del modal
 * +
 * iframe con min-height: 520px
 *
 * podía superar la altura máxima real del <dialog>.
 *
 * El navegador recortaba la parte inferior del iframe.
 */


/* ====================================================
   MODAL PADRE
   ==================================================== */

.rdc-company-contact-dialog {
    max-height:
        calc(
            100dvh -
            1rem
        ) !important;

    overflow:
        hidden !important;
}


.rdc-company-contact-dialog-shell {
    display: flex !important;

    min-height: 0;

    max-height:
        calc(
            100dvh -
            1rem
        ) !important;

    overflow:
        hidden !important;
}


/* ====================================================
   IFRAME
   ==================================================== */

.rdc-company-contact-dialog-frame {
    /*
     * Importante:
     * eliminamos el mínimo rígido de 520px.
     *
     * 62dvh permite que:
     * iframe + header
     * siempre entren en el viewport.
     */

    flex:
        0
        1
        auto;

    width:
        100% !important;

    height:
        min(
            62dvh,
            610px
        ) !important;

    min-height:
        360px !important;

    max-height:
        610px !important;

    overflow:
        hidden;

    border:
        0 !important;
}


/* ====================================================
   ÉXITO
   ==================================================== */

.rdc-company-contact-dialog-frame.is-success {
    height:
        270px !important;

    min-height:
        270px !important;

    max-height:
        270px !important;
}


/* ====================================================
   VENTANAS BAJAS
   ==================================================== */

@media (max-height: 760px) {

    .rdc-company-contact-dialog-frame {
        height:
            56dvh !important;

        min-height:
            320px !important;
    }

}


/* ====================================================
   CELULAR
   ==================================================== */

@media (max-width: 640px) {

    .rdc-company-contact-dialog {
        max-height:
            calc(
                100dvh -
                .5rem
            ) !important;
    }


    .rdc-company-contact-dialog-shell {
        max-height:
            calc(
                100dvh -
                .5rem
            ) !important;
    }


    .rdc-company-contact-dialog-frame {
        height:
            68dvh !important;

        min-height:
            360px !important;

        max-height:
            none !important;
    }


    .rdc-company-contact-dialog-frame.is-success {
        height:
            280px !important;

        min-height:
            280px !important;
    }

}


/* REDECOMSA-SOCIO-MODAL-VIEWPORT-FIX-1.0.0 END */
