/* =========================================================
   ULTRAPC - MINI CHAT WHATSAPP
   Modal integrado dentro del sitio
   ========================================================= */


/* ---------------------------------------------------------
   CONTENEDOR GENERAL
   --------------------------------------------------------- */

.ultrapc-whatsapp-modal {
    position: fixed;
    inset: 0;

    z-index: 10020;

    font-family: inherit;
}

.ultrapc-whatsapp-modal[hidden] {
    display: none !important;
}


/* ---------------------------------------------------------
   FONDO
   --------------------------------------------------------- */

.ultrapc-whatsapp-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(10, 24, 48, .16);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}


/* ---------------------------------------------------------
   VENTANA
   --------------------------------------------------------- */

.ultrapc-whatsapp-panel {
    position: absolute;

    right: 22px;
    bottom: 185px;

    width: min(370px, calc(100vw - 32px));

    overflow: hidden;

    background: #fff;

    border: 1px solid rgba(0, 62, 178, .10);
    border-radius: 20px;

    box-shadow:
        0 22px 60px rgba(13, 35, 67, .18),
        0 5px 18px rgba(13, 35, 67, .10);

    animation: ultrapc-whatsapp-modal-in .24s ease-out both;
}


/* ---------------------------------------------------------
   ENCABEZADO
   --------------------------------------------------------- */

.ultrapc-whatsapp-header {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 78px;

    padding: 14px 16px;

    background:
        radial-gradient(
            circle at 85% 10%,
            rgba(255, 255, 255, .14),
            transparent 40%
        ),
        linear-gradient(
            135deg,
            #003eb2 0%,
            #1268d3 100%
        );

    color: #fff;
}

.ultrapc-whatsapp-brand {
    display: flex;
    align-items: center;

    min-width: 0;

    gap: 11px;
}

.ultrapc-whatsapp-avatar {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    background: #25d366;

    border: 2px solid rgba(255, 255, 255, .92);
    border-radius: 50%;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, .14),
        0 0 14px rgba(37, 211, 102, .20);
}

.ultrapc-whatsapp-avatar .fa-whatsapp {
    color: #fff;

    font-size: 25px;
    line-height: 1;
}

.ultrapc-whatsapp-brand > div {
    display: flex;
    flex-direction: column;

    min-width: 0;

    line-height: 1.25;
}

.ultrapc-whatsapp-brand strong {
    color: #fff;

    font-size: 16px;
    font-weight: 700;
}

.ultrapc-whatsapp-brand span {
    margin-top: 3px;

    color: rgba(255, 255, 255, .80);

    font-size: 12px;
    font-weight: 400;
}


/* ---------------------------------------------------------
   CERRAR
   --------------------------------------------------------- */

.ultrapc-whatsapp-close {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    margin: 0;
    padding: 0;

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

    border: 0;
    border-radius: 50%;

    color: #fff;

    font-family: Arial, sans-serif;
    font-size: 27px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;
}

.ultrapc-whatsapp-close:hover {
    background: rgba(255, 255, 255, .20);

    transform: rotate(4deg);
}


/* ---------------------------------------------------------
   CUERPO DEL CHAT
   --------------------------------------------------------- */

.ultrapc-whatsapp-body {
    padding: 18px;

    background:
        linear-gradient(
            rgba(255, 255, 255, .94),
            rgba(255, 255, 255, .94)
        ),
        radial-gradient(
            circle at 20% 20%,
            rgba(37, 211, 102, .10),
            transparent 38%
        );
}


/* ---------------------------------------------------------
   MENSAJE
   --------------------------------------------------------- */

.ultrapc-whatsapp-message {
    position: relative;

    display: flex;
    flex-direction: column;

    width: fit-content;
    max-width: 90%;

    margin: 0 0 18px;
    padding: 12px 14px;

    background: #f1f7f4;

    border: 1px solid rgba(37, 211, 102, .13);
    border-radius: 4px 15px 15px 15px;

    color: #263238;

    box-shadow: 0 3px 10px rgba(0, 0, 0, .04);
}

.ultrapc-whatsapp-message strong {
    margin-bottom: 2px;

    color: #17232b;

    font-size: 14px;
    font-weight: 700;
}

.ultrapc-whatsapp-message span {
    color: #52616b;

    font-size: 13px;
    line-height: 1.45;
}


/* ---------------------------------------------------------
   CAMPO DE MENSAJE
   --------------------------------------------------------- */

.ultrapc-whatsapp-body label {
    display: block;

    margin: 0 0 7px;

    color: #354550;

    font-size: 12px;
    font-weight: 600;
}

#ultrapc-whatsapp-text {
    display: block;

    width: 100%;
    min-height: 92px;

    margin: 0;
    padding: 12px 13px;

    resize: vertical;

    background: #fff;

    border: 1px solid #dce4ea !important;
    border-radius: 12px !important;

    color: #27343c;

    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;

    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .025);

    outline: none;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

#ultrapc-whatsapp-text:focus {
    border-color: #25b968 !important;

    box-shadow:
        0 0 0 3px rgba(37, 211, 102, .11);
}


/* ---------------------------------------------------------
   BOTÓN CONTINUAR
   --------------------------------------------------------- */

.ultrapc-whatsapp-continue {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;

    margin-top: 13px;
    padding: 12px 16px;

    gap: 8px;

    background: #25d366;

    border: 0;
    border-radius: 12px;

    color: #fff !important;

    font-size: 13px;
    font-weight: 700;

    text-decoration: none !important;

    box-shadow:
        0 6px 16px rgba(37, 211, 102, .20);

    transition:
        background .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.ultrapc-whatsapp-continue:hover {
    background: #1fbd5a;

    color: #fff !important;

    transform: translateY(-1px);

    box-shadow:
        0 8px 19px rgba(37, 211, 102, .25);
}

.ultrapc-whatsapp-continue .fa-whatsapp {
    font-size: 19px;
}


/* ---------------------------------------------------------
   ANIMACIÓN ENTRADA
   --------------------------------------------------------- */

@keyframes ultrapc-whatsapp-modal-in {

    from {
        opacity: 0;
        transform: translateY(12px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 600px) {

    .ultrapc-whatsapp-backdrop {
        background: rgba(8, 22, 45, .27);

        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }

    .ultrapc-whatsapp-panel {
        position: absolute;

        right: 10px;
        bottom: 82px;
        left: 10px;

        width: auto;

        border-radius: 18px;
    }

    .ultrapc-whatsapp-header {
        min-height: 72px;

        padding: 12px 14px;
    }

    .ultrapc-whatsapp-avatar {
        width: 42px;
        height: 42px;
    }

    .ultrapc-whatsapp-avatar .fa-whatsapp {
        font-size: 23px;
    }

    .ultrapc-whatsapp-body {
        padding: 15px;
    }

    #ultrapc-whatsapp-text {
        min-height: 82px;
    }
}


/* =========================================================
   ACCESIBILIDAD
   ========================================================= */

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

    .ultrapc-whatsapp-panel {
        animation: none;
    }

}
