/**
 * Estilos para el sistema de estados visuales (badges)
 * Incluye: Estados de colores (naranja/amarillo/verde), pausado, finalizado
 */

/* ===================================
   BADGES DE ESTADO
   =================================== */

.estado-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin: 10px 0;
    transition: all 0.3s ease;
}

.estado-badge .badge-emoji {
    font-size: 18px;
}

.estado-badge .badge-text {
    font-size: 13px;
}

/* Estado NARANJA - Esperando contacto */
.estado-badge.estado-naranja {
    background: linear-gradient(135deg, #ff9800 0%, #ff6f00 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.estado-badge.estado-naranja:hover {
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
    transform: translateY(-2px);
}

/* Estado AMARILLO - En proceso (1-2 contactos) */
.estado-badge.estado-amarillo {
    background: linear-gradient(135deg, #ffd54f 0%, #ffb300 100%);
    color: #5d4037;
    box-shadow: 0 2px 8px rgba(255, 213, 79, 0.3);
}

.estado-badge.estado-amarillo:hover {
    box-shadow: 0 4px 12px rgba(255, 213, 79, 0.4);
    transform: translateY(-2px);
}

/* Estado VERDE CLARO - Muy activo (3+ contactos) */
.estado-badge.estado-verde-claro {
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 187, 106, 0.3);
}

.estado-badge.estado-verde-claro:hover {
    box-shadow: 0 4px 12px rgba(102, 187, 106, 0.4);
    transform: translateY(-2px);
}

/* Estado VERDE - Finalizado */
.estado-badge.estado-verde {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.estado-badge.estado-verde:hover {
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
}

/* Estado PAUSADO - Gris */
.estado-badge.estado-pausado {
    background: linear-gradient(135deg, #9e9e9e 0%, #616161 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(158, 158, 158, 0.3);
}

.estado-badge.estado-pausado:hover {
    box-shadow: 0 4px 12px rgba(158, 158, 158, 0.4);
    transform: translateY(-2px);
}

/* ===================================
   BOTONES DE ACCIÓN
   =================================== */

/* Botones compactos (solo iconos) */
.action-btn-icon {
    background: transparent;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 3px;
}

.action-btn-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.action-btn-icon.pause {
    border-color: #ff9800;
    color: #ff9800;
}

.action-btn-icon.pause:hover {
    background: #ff9800;
    color: white;
}

.action-btn-icon.resume {
    border-color: #4caf50;
    color: #4caf50;
}

.action-btn-icon.resume:hover {
    background: #4caf50;
    color: white;
}

.action-btn-icon.finalize {
    border-color: #2196f3;
    color: #2196f3;
}

.action-btn-icon.finalize:hover {
    background: #2196f3;
    color: white;
}

.action-btn-icon.delete {
    border-color: #f44336;
    color: #f44336;
}

.action-btn-icon.delete:hover {
    background: #f44336;
    color: white;
}

/* Botones con texto (modal) */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.action-btn .icon-pause,
.action-btn .icon-resume,
.action-btn .icon-finalize,
.action-btn .icon-delete {
    font-size: 16px;
}

.action-btn.pause {
    background: linear-gradient(135deg, #ff9800 0%, #ff6f00 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.action-btn.pause:hover {
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
    transform: translateY(-2px);
}

.action-btn.resume {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.action-btn.resume:hover {
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
}

.action-btn.finalize {
    background: linear-gradient(135deg, #2196f3 0%, #1565c0 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.action-btn.finalize:hover {
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    transform: translateY(-2px);
}

.action-btn.delete {
    background: linear-gradient(135deg, #f44336 0%, #c62828 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.action-btn.delete:hover {
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
    transform: translateY(-2px);
}

/* ===================================
   ESTADÍSTICAS EN MODAL
   =================================== */

.modal-estadisticas {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.stat-item {
    flex: 1;
    min-width: 150px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    display: block;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* ===================================
   ADAPTACIONES PARA TARJETAS
   =================================== */

.report-card .estado-badge,
.report-item .estado-badge {
    margin: 8px 0;
    font-size: 12px;
}

.report-card .estado-badge .badge-emoji,
.report-item .estado-badge .badge-emoji {
    font-size: 14px;
}

.report-card .estado-badge .badge-text,
.report-item .estado-badge .badge-text {
    font-size: 11px;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .estado-badge {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .estado-badge .badge-emoji {
        font-size: 16px;
    }
    
    .estado-badge .badge-text {
        font-size: 11px;
    }
    
    .action-btn {
        font-size: 13px;
        padding: 8px 16px;
    }
    
    .action-btn-icon {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    .modal-estadisticas {
        flex-direction: column;
        gap: 10px;
    }
    
    .stat-item {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .estado-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
        margin: 3px 0;
    }
    
    .action-btn-icon {
        flex: 1;
        margin: 2px;
    }
}

/* ===================================
   ANIMACIONES
   =================================== */

@keyframes pulseOrange {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
    }
    50% {
        box-shadow: 0 4px 16px rgba(255, 152, 0, 0.6);
    }
}

@keyframes pulseYellow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(255, 213, 79, 0.3);
    }
    50% {
        box-shadow: 0 4px 16px rgba(255, 213, 79, 0.6);
    }
}

.estado-badge.estado-naranja.pulse {
    animation: pulseOrange 2s infinite;
}

.estado-badge.estado-amarillo.pulse {
    animation: pulseYellow 2s infinite;
}

/* ===================================
   TOOLTIPS PARA BADGES
   =================================== */

.estado-badge[title] {
    position: relative;
    cursor: help;
}

.estado-badge[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
    pointer-events: none;
}

.estado-badge[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}
