/* Estodas - Chat de WhatsApp
   Botón flotante + panel de agentes. Responsive. Sin librerías externas. */

.estodas-wa {
    position: fixed;
    bottom: 20px;
    z-index: 99998;
}
.estodas-wa--right { right: 20px; }
.estodas-wa--left  { left: 20px; }

/* --- Botón flotante (FAB) --- */
.estodas-wa-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}
.estodas-wa-fab:hover,
.estodas-wa-fab:focus {
    background: #1da851;
    color: #fff;
    transform: scale(1.05);
    outline: none;
}
.estodas-wa-fab .estodas-wa-svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

/* --- Panel de agentes --- */
.estodas-wa-panel {
    position: absolute;
    bottom: 70px;
    width: 320px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}
.estodas-wa--right .estodas-wa-panel { right: 0; }
.estodas-wa--left  .estodas-wa-panel { left: 0; }

.estodas-wa.is-open .estodas-wa-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Cabecera */
.estodas-wa-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 16px 14px;
    background: #075e54; /* verde WhatsApp oscuro */
    color: #fff;
    position: relative;
}
.estodas-wa-head-ic .estodas-wa-svg {
    width: 30px;
    height: 30px;
    fill: #fff;
    opacity: 0.95;
}
.estodas-wa-head-txt { line-height: 1.25; }
.estodas-wa-title { display: block; font-size: 15px; font-weight: 700; }
.estodas-wa-subtitle { display: block; font-size: 12px; opacity: 0.85; }

.estodas-wa-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 24px;
    height: 24px;
    padding: 0;
    line-height: 22px;
    font-size: 20px;
    color: #fff;
    background: transparent;
    border: 0;
    cursor: pointer;
    opacity: 0.85;
}
.estodas-wa-close:hover,
.estodas-wa-close:focus { opacity: 1; outline: none; }

/* Lista de agentes */
.estodas-wa-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    max-height: 50vh;
    overflow-y: auto;
}
.estodas-wa-list li { margin: 0; }

.estodas-wa-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    text-decoration: none;
    color: #333;
    transition: background 0.15s ease;
}
.estodas-wa-item:hover,
.estodas-wa-item:focus {
    background: #f4f6f6;
    color: #333;
    text-decoration: none;
}
.estodas-wa-item-ic {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #25d366;
}
.estodas-wa-item-ic .estodas-wa-svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}
.estodas-wa-item-txt { display: flex; flex-direction: column; line-height: 1.25; }
.estodas-wa-item-name { font-weight: 600; font-size: 14px; }
.estodas-wa-item-role { font-size: 12px; color: #777; }

/* --- Responsive --- */
@media (max-width: 767px) {
    .estodas-wa { bottom: 14px; }
    .estodas-wa--right { right: 14px; }
    .estodas-wa--left  { left: 14px; }
    .estodas-wa-fab { width: 50px; height: 50px; }
    .estodas-wa-fab .estodas-wa-svg { width: 28px; height: 28px; }
    .estodas-wa-panel { width: calc(100vw - 28px); bottom: 64px; }
    .estodas-wa--hide-mobile { display: none; }
}

/* Ocultar en impresión */
@media print {
    .estodas-wa { display: none; }
}
