:root {

    --blue: #1D69D4;

    --dark-blue: #011F50;

    --yellow: #FFFF00;

    --white: #ffffff;

    --header-height: 105px;

}





   /* Contenedor principal */
    .whatsapp-floating-container {
        position: fixed;
        bottom:50px;
        right: 24px;
        z-index: 9999;
        font-family: Arial, Helvetica, sans-serif;
    }

    /* ============================================================
       BOTÓN WHATSAPP ÚNICO
    ============================================================ */

    .whatsapp-single-button {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background-color: #22c55e;
        color: var(--white);
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
    }

    .whatsapp-single-button:hover {
        background-color: #16a34a;
        transform: scale(1.1);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    }

    .whatsapp-single-button i {
        font-size: 30px;
        transition: transform 0.3s ease;
    }

    .whatsapp-single-button:hover i {
        transform: scale(1.1);
    }


    /* ============================================================
       CONTENEDOR MÚLTIPLES WHATSAPP
    ============================================================ */

    .whatsapp-multiple-wrapper {
        position: relative;
    }


    /* ============================================================
       BOTÓN PRINCIPAL
    ============================================================ */

    .whatsapp-main-button {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 8px 20px 8px 12px;
        background-color: #22c55e;
        color: var(--white);
        border: none;
        border-radius: 999px;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
        font-family: inherit;
    }

    .whatsapp-main-button:hover {
        background-color: #16a34a;
        transform: scale(1.05);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    }

    /* Icono circular interno */
    .whatsapp-main-icon {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.3s ease;
    }

    .whatsapp-main-button:hover .whatsapp-main-icon {
        background-color: rgba(255, 255, 255, 0.3);
    }

    .whatsapp-main-icon i {
        font-size: 21px;
    }

    .whatsapp-main-text {
        font-size: 14px;
        font-weight: 500;
    }

    .whatsapp-chevron {
        font-size: 11px;
        margin-left: 4px;
        transition: transform 0.3s ease;
    }

    .whatsapp-main-button.active .whatsapp-chevron {
        transform: rotate(180deg);
    }


    /* ============================================================
       POPUP
    ============================================================ */

    .whatsapp-popup {
        position: absolute;
        bottom: 64px;
        right: 0;
        width: 240px;
        max-width: 300px;
        background-color: var(--white);
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        border: 1px solid #e5e7eb;
        padding: 12px;

        opacity: 0;
        visibility: hidden;
        transform: translateY(10px) scale(0.95);
        transition: all 0.2s ease;
    }

    .whatsapp-popup.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }


    /* ============================================================
       HEADER POPUP
    ============================================================ */

    .whatsapp-popup-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 8px;
        padding: 0 8px 8px;
        border-bottom: 1px solid #f3f4f6;
    }

    .whatsapp-popup-title {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #374151;
        font-size: 14px;
        font-weight: 600;
    }

    .whatsapp-popup-title i {
        color: #22c55e;
        font-size: 16px;
    }

    .whatsapp-close-button {
        border: none;
        background: transparent;
        color: #9ca3af;
        cursor: pointer;
        padding: 4px;
        transition: color 0.2s ease;
    }

    .whatsapp-close-button:hover {
        color: #4b5563;
    }


    /* ============================================================
       LISTA DE WHATSAPP
    ============================================================ */

    .whatsapp-list {
        display: flex;
        flex-direction: column;
        gap: 4px;
        max-height: 300px;
        overflow-y: auto;
    }


    /* ============================================================
       ITEM INDIVIDUAL
    ============================================================ */

    .whatsapp-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
        text-decoration: none;
        border-radius: 12px;
        transition: background-color 0.2s ease;
    }

    .whatsapp-item:hover {
        background-color: #f9fafb;
    }


    /* ============================================================
       AVATAR
    ============================================================ */

    .whatsapp-avatar {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #dcfce7;
        overflow: hidden;
    }

    .whatsapp-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
        border: 2px solid #bbf7d0;
    }

    .whatsapp-avatar i {
        color: #22c55e;
        font-size: 20px;
    }


    /* ============================================================
       INFORMACIÓN DEL CONTACTO
    ============================================================ */

    .whatsapp-info {
        flex: 1;
        min-width: 0;
    }

    .whatsapp-name {
        margin: 0;
        color: #1f2937;
        font-size: 14px;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .whatsapp-number {
        margin: 3px 0 0;
        color: #9ca3af;
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }


    /* ============================================================
       FLECHA
    ============================================================ */

    .whatsapp-item-arrow {
        color: #d1d5db;
        font-size: 11px;
        transition: color 0.2s ease;
    }

    .whatsapp-item:hover .whatsapp-item-arrow {
        color: #14b8a6;
    }


    /* ============================================================
       RESPONSIVE
    ============================================================ */

    @media (max-width: 480px) {

        .whatsapp-floating-container {
            bottom: 16px;
            right: 16px;
        }

        .whatsapp-popup {
            width: 230px;
        }

        .whatsapp-main-text {
            display: none;
        }

        .whatsapp-main-button {
            padding: 8px;
        }

        .whatsapp-main-icon {
            width: 40px;
            height: 40px;
        }
    }



/* ===== LOADER ===== */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

#loader::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 5px solid var(--white);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

#loader.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
