/* ========================================
   WIDGET WHATSAPP ECOSSISTEMA BYTE PLAY
   Estilos Universais
   ======================================== */

.whatsapp-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Botão Flutuante */
.whatsapp-float-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #25D366;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float-btn:hover {
    background-color: #20BA5A;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
}

.whatsapp-float-btn svg {
    width: 32px;
    height: 32px;
    color: white;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.7);
    }
}

/* Painel */
.whatsapp-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-height: 600px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

/* Header do Painel */
.whatsapp-panel-header {
    background: #ffffff;
    color: #1f2937;
    padding: 20px;
    position: relative;
    border-bottom: 1px solid #e5e7eb;
}

.whatsapp-panel-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
    color: #1f2937;
}

.whatsapp-panel-header p {
    font-size: 14px;
    margin: 0;
    color: #6b7280;
    line-height: 1.4;
}

.whatsapp-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f3f4f6;
    border: none;
    color: #6b7280;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-close-btn:hover {
    background-color: #e5e7eb;
    color: #1f2937;
    transform: rotate(90deg);
}

/* Body do Painel */
.whatsapp-panel-body {
    padding: 12px;
    max-height: 480px;
    overflow-y: auto;
}

.whatsapp-panel-body::-webkit-scrollbar {
    width: 6px;
}

.whatsapp-panel-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.whatsapp-panel-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.whatsapp-panel-body::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Botões de Setor */
.whatsapp-sector-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.whatsapp-sector-btn:hover {
    background-color: #f9fafb;
    border-color: #25D366;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateX(-4px);
}

.sector-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sector-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.sector-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sector-info strong {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.sector-info span {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

/* Responsivo */
@media (max-width: 480px) {
    .whatsapp-panel {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
        margin: 0 auto;
    }
    
    .whatsapp-float-btn {
        width: 56px;
        height: 56px;
    }
    
    .whatsapp-float-btn svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 360px) {
    .whatsapp-panel-header h3 {
        font-size: 16px;
    }
    
    .whatsapp-panel-header p {
        font-size: 13px;
    }
    
    .sector-info strong {
        font-size: 14px;
    }
    
    .sector-info span {
        font-size: 12px;
    }
}

/* Animação de entrada dos setores */
.whatsapp-panel.active .whatsapp-sector-btn {
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
}

.whatsapp-panel.active .whatsapp-sector-btn:nth-child(1) { animation-delay: 0.05s; }
.whatsapp-panel.active .whatsapp-sector-btn:nth-child(2) { animation-delay: 0.1s; }
.whatsapp-panel.active .whatsapp-sector-btn:nth-child(3) { animation-delay: 0.15s; }
.whatsapp-panel.active .whatsapp-sector-btn:nth-child(4) { animation-delay: 0.2s; }
.whatsapp-panel.active .whatsapp-sector-btn:nth-child(5) { animation-delay: 0.25s; }
.whatsapp-panel.active .whatsapp-sector-btn:nth-child(6) { animation-delay: 0.3s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
