/* WhatsApp Float Button Pro - Main Styles */

.wfb-container {
    position: fixed;
    z-index: 99999;
    transition: all 0.3s ease;
}

.wfb-container.wfb-bottom-right {
    bottom: 20px;
    right: 20px;
}

.wfb-container.wfb-bottom-left {
    bottom: 20px;
    left: 20px;
}

.wfb-container.wfb-top-right {
    top: 20px;
    right: 20px;
}

.wfb-container.wfb-top-left {
    top: 20px;
    left: 20px;
}

/* Botón principal */
.wfb-button {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    text-decoration: none;
}

.wfb-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.wfb-button.wfb-circle {
    border-radius: 50%;
}

.wfb-button.wfb-rounded {
    border-radius: 30px;
    padding: 0 20px;
}

.wfb-button.wfb-square {
    border-radius: 10px;
}

/* Ícono de WhatsApp */
.wfb-icon {
    width: 60%;
    height: 60%;
    fill: white;
}

.wfb-button.wfb-rounded .wfb-icon {
    margin-right: 10px;
    width: 24px;
    height: 24px;
}

.wfb-button-text {
    color: white;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

/* Tooltip */
.wfb-tooltip {
    position: absolute;
    background: #fff;
    color: #333;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    font-size: 14px;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
}

.wfb-container.wfb-bottom-right .wfb-tooltip,
.wfb-container.wfb-top-right .wfb-tooltip {
    right: 100%;
    margin-right: 15px;
}

.wfb-container.wfb-bottom-left .wfb-tooltip,
.wfb-container.wfb-top-left .wfb-tooltip {
    left: 100%;
    margin-left: 15px;
}

.wfb-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
}

.wfb-container.wfb-bottom-right .wfb-tooltip::after,
.wfb-container.wfb-top-right .wfb-tooltip::after {
    right: -8px;
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent #fff;
}

.wfb-container.wfb-bottom-left .wfb-tooltip::after,
.wfb-container.wfb-top-left .wfb-tooltip::after {
    left: -8px;
    border-width: 8px 8px 8px 0;
    border-color: transparent #fff transparent transparent;
}

.wfb-button:hover .wfb-tooltip {
    opacity: 1;
}

/* Badge de notificación */
.wfb-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3b30;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    border: 2px solid white;
}

/* Panel de agentes múltiples */
.wfb-agents-panel {
    position: absolute;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 15px;
    min-width: 280px;
    max-width: 320px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: scale(0.8);
}

.wfb-container.wfb-bottom-right .wfb-agents-panel,
.wfb-container.wfb-top-right .wfb-agents-panel {
    right: 0;
}

.wfb-container.wfb-bottom-left .wfb-agents-panel,
.wfb-container.wfb-top-left .wfb-agents-panel {
    left: 0;
}

.wfb-container.wfb-bottom-right .wfb-agents-panel,
.wfb-container.wfb-bottom-left .wfb-agents-panel {
    bottom: 80px;
}

.wfb-container.wfb-top-right .wfb-agents-panel,
.wfb-container.wfb-top-left .wfb-agents-panel {
    top: 80px;
}

.wfb-agents-panel.wfb-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.wfb-agents-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.wfb-agents-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.wfb-agents-subtitle {
    font-size: 12px;
    color: #999;
    margin: 5px 0 0;
}

.wfb-agent-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.wfb-agent-item:hover {
    background: #f5f5f5;
    transform: translateX(5px);
}

.wfb-agent-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    border: 2px solid #25D366;
}

.wfb-agent-info {
    flex: 1;
}

.wfb-agent-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin: 0 0 3px;
}

.wfb-agent-department {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.wfb-agent-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #25D366;
    border: 2px solid white;
    box-shadow: 0 0 0 1px #25D366;
}

/* Animaciones */
@keyframes wfb-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes wfb-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@keyframes wfb-shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes wfb-swing {
    20% {
        transform: rotate(15deg);
    }
    40% {
        transform: rotate(-10deg);
    }
    60% {
        transform: rotate(5deg);
    }
    80% {
        transform: rotate(-5deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

.wfb-button.wfb-animate-bounce {
    animation: wfb-bounce 2s infinite;
}

.wfb-button.wfb-animate-pulse {
    animation: wfb-pulse 2s infinite;
}

.wfb-button.wfb-animate-shake {
    animation: wfb-shake 0.5s;
}

.wfb-button.wfb-animate-swing {
    animation: wfb-swing 1s;
}

/* Responsive */
@media (max-width: 768px) {
    .wfb-container {
        bottom: 15px;
        right: 15px;
    }
    
    .wfb-agents-panel {
        max-width: calc(100vw - 30px);
    }
    
    .wfb-tooltip {
        display: none;
    }
}

/* Estado oculto */
.wfb-container.wfb-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
    .wfb-agents-panel {
        background: #2c2c2c;
        color: #fff;
    }
    
    .wfb-agents-title {
        color: #fff;
    }
    
    .wfb-agents-subtitle {
        color: #aaa;
    }
    
    .wfb-agent-item:hover {
        background: #3a3a3a;
    }
    
    .wfb-agent-name {
        color: #fff;
    }
    
    .wfb-agent-department {
        color: #aaa;
    }
}
