:root {
    --primary: #005f9d;
    --secondary: #252424;
    --hover: #00b5e8;   /* color hover del texto */
    --wave: #00b5e8;    /* color de la onda */
}

/* ===== Botón flotante ===== */
.custom-floating-chat-btn {
    position: fixed;
    bottom: 70px;
    right: 10px;

    /* sin fondo, solo texto y avatar */
    background: transparent;
    border: 0;
    padding: 10px 14px;

    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    line-height: 1;
    z-index: 999;

    /* efecto suave de elevación */
    transition: transform .22s cubic-bezier(.2,.7,.3,1), filter .22s ease;
}
.custom-floating-chat-btn:hover {
    background: transparent;               /* NO fondo */
    transform: translateY(-4px);           /* “sube” suavemente */
    filter: drop-shadow(0 8px 18px rgba(0,0,0,.25));
}
.custom-floating-chat-btn:focus { outline: none; }

/* Avatar un poco más grande */
.custom-avatar-wrap{
    position: relative;
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    transition: transform .22s ease;
}
.custom-floating-chat-btn:hover .custom-avatar-wrap{
    transform: translateY(-1px);
}
.custom-btn-avatar{
    width: 38px;
    height: 38px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid #e9ecef;
    background: #fff;
    position: relative;
    z-index: 3; /* siempre por encima de las ondas */
}

/* Onda amplia y llamativa (doble pulso desfasado) */
.custom-avatar-wrap::before,
.custom-avatar-wrap::after{
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px;
    border: 2px solid var(--wave);
    transform: scale(1);
    opacity: .55;
    pointer-events: none;
    z-index: 2;
    animation: pulseWide 2.8s ease-out infinite;
}
/* segundo anillo, desfasado para continuidad */
.custom-avatar-wrap::after{
    animation-delay: 1.2s;
}

/* al pasar el ratón, la onda acelera un poco (sin cambiar fondo) */
.custom-floating-chat-btn:hover .custom-avatar-wrap::before,
.custom-floating-chat-btn:hover .custom-avatar-wrap::after{
    animation-duration: 2.0s;
}

@keyframes pulseWide{
    0%   { transform: scale(1);    opacity: .55; }
    60%  { transform: scale(2.8);  opacity: 0; }
    100% { transform: scale(2.8);  opacity: 0; }
}

/* Texto: blanco con sombra; cambia a #00b5e8 en hover (sin fondo) */
.custom-btn-label{
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: .2px;
    user-select: none;
    text-shadow: 0 2px 6px rgba(0,0,0,.45), 0 1px 2px rgba(0,0,0,.6);
    transition: color .15s ease, transform .15s ease;
}
.custom-floating-chat-btn:hover .custom-btn-label{
    color: var(--hover);
    transform: translateY(-1px);
}

/* ===== Popup ===== */
.custom-chat-popup {
    position: fixed;
    bottom: 130px;
    right: 30px;
    width: 350px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    z-index: 9998;
    overflow: hidden;
}
.custom-chat-header {
    background-color: var(--secondary);
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.custom-chat-header h5 { margin: 0; font-size: 16px; }
.custom-chat-close { background: none; border: none; color: white; font-size: 20px; cursor: pointer; }

.custom-chat-body { padding: 15px; max-height: 400px; overflow-y: auto; }
.custom-chat-user {
    display: flex; align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px; margin-bottom: 10px;
    transition: background-color .3s ease; border-radius: 8px;
}
.custom-chat-user:last-child { border-bottom: none; margin-bottom: 0; }

.custom-user-avatar {
    width: 50px; height: 50px; border-radius: 50%;
    object-fit: cover; border: 2px solid #e9ecef;
    transition: transform .3s ease; margin-right: 15px;
}
.custom-chat-link { display: flex; align-items: center; color: inherit; text-decoration: none; flex-grow: 1; }
.custom-chat-link:hover { text-decoration: none; }
.custom-chat-link:hover .custom-user-avatar { transform: scale(1.05); }
.custom-chat-user:hover { background-color: #f8f9fa; }

.custom-user-info { display: flex; align-items: center; }
.custom-user-name { font-size: 16px; font-weight: 500; color: #333; }

/* ===== Responsive ===== */
@media (max-width: 420px){
    .custom-chat-popup{ right: 12px; width: calc(100vw - 24px); }
}
