/* ==============================> Estilos de WhatsApp Flotante */

/* ANIMACIONES */

@keyframes pulso-wsp-footer {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgb(37, 211, 102, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 12px rgba(37, 211, 102, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* BOTON WHATSAPP FLOTANTE */

.boton-wsp-izquierdo {
    position: fixed;
    bottom: 36px;
    left: 36px;
    z-index: 1000;
    padding: 8px;
    background: #25d366;
    width: 65px;
    height: 65px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50px;
    color: #fff;
    font-size: 32px;
    animation: pulso-wsp-footer 1.6s infinite;
    transition: .4s all ease-in-out;
}

.boton-wsp-izquierdo:hover {
    color: #fff;
    background: #128c7e;
}

@media(max-width: 768px) {
	.boton-wsp-izquierdo {
		bottom: 16px;
    	left: 16px;
	}
}

/* ==============================> WHATSAPP POPUP FLOTANTE DERECHO */

/* -> Contenedor principal */

.wsp-popup-contenedor {
    position: fixed;
    bottom: 36px;
    left: 36px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

/* -> Disparador (botón flotante) */

.wsp-popup-disparador {
    padding: 16px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: #25d366;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    flex-shrink: 0;
    animation: pulso-wsp-footer 1.6s infinite;
    transition: background 0.4s ease-in-out, transform 0.2s ease-in-out;
    -webkit-tap-highlight-color: transparent;
}

.wsp-popup-disparador:hover {
    background: #128c7e;
    animation: none;
    transform: scale(1.06);
}

/* -> Caja del popup */

.wsp-popup-caja {
    width: 320px;
	height: 0;
	background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-origin: bottom right;
}

.wsp-popup-caja--visible {
    opacity: 1;
	height: auto;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* -> Cabecera */

.wsp-popup-cabecera {
    background: var(--wd-primary-color);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.wsp-popup-cabecera-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.wsp-popup-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.wsp-popup-avatar img{
	border-radius: 100px;
}

.wsp-popup-cabecera-texto {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.wsp-popup-cabecera-texto strong {
    color: #fff;
    font-size: 14px;
    line-height: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wsp-popup-cabecera-texto span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    line-height: 16px;
}

/* -> Botón cerrar */

.wsp-popup-cerrar {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.85);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
    transition: color 0.2s ease, background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.wsp-popup-cerrar:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

/* -> Área de chat */

.wsp-popup-chat {
    background: #ece5dd;
    padding: 16px;
}

/* -> Burbuja de mensaje */

.wsp-popup-burbuja {
    background: #fff;
    border-radius: 0 10px 10px 10px;
    padding: 10px 12px 8px;
    max-width: 85%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    position: relative;
}

.wsp-popup-burbuja-nombre {
    font-size: 13px;
    font-weight: 700;
    color: var(--wd-primary-color);
    margin-bottom: 4px;
    line-height: 16px;
}

.wsp-popup-burbuja p {
    font-size: 13px;
    color: #303030;
    line-height: 18px;
    margin: 0 0 4px;
}

.wsp-popup-burbuja-hora {
    font-size: 11px;
    color: #999;
    display: block;
    text-align: right;
    line-height: 14px;
}

/* -> Formulario */

.wsp-popup-formulario {
    padding: 8px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #ece5dd;
}

.wsp-popup-campo {
    width: 100%;
}

.wsp-popup-input {
    width: 100% !important;
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 25px !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    color: #303030 !important;
    background: #fff !important;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease !important;
    -webkit-appearance: none !important;
}

.wsp-popup-input::placeholder {
    color: #aaa;
}

.wsp-popup-input:focus {
    border-color: var(--wd-primary-color) !important;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.12);
}

/* -> Botón enviar */

.wsp-popup-enviar {
    width: 100%;
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    margin-top: 2px;
}

.wsp-popup-enviar i {
    font-size: 18px;
}

.wsp-popup-enviar:hover {
    background: #128c7e;
	color: #fff;
    transform: translateY(-1px);
}

.wsp-popup-enviar:active {
    transform: translateY(0);
}

/* -> Responsive movil */

@media (max-width: 768px) {
    .wsp-popup-contenedor {
        bottom: 16px;
        left: 16px;
    }

    .wsp-popup-caja {
        width: calc(100vw - 32px);
        max-width: 320px;
    }
}

/* -> Responsive tablet */

@media (min-width: 769px) and (max-width: 1024px) {
    .wsp-popup-contenedor {
        bottom: 24px;
        right: 24px;
    }
}

/* ==============================> Estilos del Shortcode de WhatsApp */

/* WSP Predeterminado */

.whatsapp-predeterminado {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    background: var(--wd-primary-color);
    font-size: var(--wd-text-font-size);
	font-weight: 600;
    line-height: calc(var(--wd-text-font-size) + 4px);
    color: #fff;
    transition: .4s all ease-in-out;
}

.whatsapp-predeterminado i {
    font-size: calc(var(--wd-text-font-size) + 4px);
    transition: .4s all ease-in-out;
}

.whatsapp-predeterminado:hover {
    color: #fff;
    background: #25d366;
}

/* WSP Cabecera */

.whatsapp-cabecera {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--e-global-color-text);
    font-size: var(--wd-text-font-size);
    line-height: calc(var(--wd-text-font-size) + 4px);
    transition: .4s all ease-in-out;
}

.whatsapp-cabecera i {
    font-size: calc(var(--wd-text-font-size) + 4px);
    transition: .4s all ease-in-out;
}

.whatsapp-cabecera:hover {
    color: var(--wd-primary-color);
}

/* WSP Icono */

.whatsapp-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px;
    border-radius: var(--wd-brd-radius);
    font-size: var(--wd-text-font-size);
    font-weight: 600;
    color: var(--e-global-color-secondary);
    transition: .4s all ease-in-out;
}

.whatsapp-icono i {
	font-size: 20px;
}

.whatsapp-icono:hover {
    color: var(--wd-primary-color);
}