/* Giraffe360 CSS Overrides - Versão Completa com Modificações do Cliente */
/* ================================================================== */

/* ============================================ */
/* MOD 1: Redução da Barra Lateral (Sidebar) */
/* ============================================ */
[class*='sc-7372a9af-0'] {
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    overflow: hidden !important;
    transition: width 0.3s ease, max-width 0.3s ease !important;
}
[class*='sc-7372a9af-0']:hover {
    width: 220px !important;
    max-width: 220px !important;
}
[class*='sc-7372a9af-0'] [class*='sc-7372a9af-3'],
[class*='sc-7372a9af-0'] [class*='sc-7372a9af-5'],
[class*='sc-7372a9af-0'] [class*='sc-7372a9af-6'] {
    opacity: 0 !important;
    white-space: nowrap !important;
    transition: opacity 0.2s ease !important;
}
[class*='sc-7372a9af-0']:hover [class*='sc-7372a9af-3'],
[class*='sc-7372a9af-0']:hover [class*='sc-7372a9af-5'],
[class*='sc-7372a9af-0']:hover [class*='sc-7372a9af-6'] {
    opacity: 1 !important;
}

/* ============================================ */
/* MOD 1b: Ajuste de quebra de linha (textos encavalados) */
/* ============================================ */
[class*='sc-4f7527a1-3'],
[class*='sc-4f7527a1-4'],
[class*='sc-4f7527a1-5'],
[class*='sc-4f7527a1-6'],
[class*='sc-4f7527a1-7'],
[class*='sc-4f7527a1-8'] {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
    max-width: 100% !important;
}

/* ============================================ */
/* MOD 4: Layout compacto dos cards de conversa */
/* ============================================ */
[class*='sc-4f7527a1-0'] {
    padding: 0.5rem 0.65rem !important;
    gap: 0.3rem !important;
    border-bottom: 1px solid #f0f0f0 !important;
    min-height: 0 !important;
}
[class*='sc-4f7527a1-1'] {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
}

/* ============================================ */
/* Hide duplicate filters (Abertas/Encerradas/Todas) on top */
/* ============================================ */
[class*='sc-983b542e-8'] {
    display: none !important;
}
[class*='sc-983b542e-7'] {
    margin-bottom: 0.5rem;
}

/* Compactar a seção de filtros Minhas/Não atribuídas/Todas */
[class*='sc-983b542e-10'] {
    height: auto !important;
    min-height: 0 !important;
    padding: 0 0.4rem !important;
    flex-shrink: 0 !important;
}
[class*='sc-983b542e-11'] {
    padding: 0.35rem 0.6rem !important;
    font-size: 0.72rem !important;
    border-radius: 16px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
}

/* Compactar a barra de header laranja com Passos/dropdown */
[class*='sc-983b542e-4'] {
    height: 2.2rem !important;
    min-height: 0 !important;
    padding: 0 0.5rem !important;
    flex-shrink: 0 !important;
}
[class*='sc-983b542e-4'] h1 {
    font-size: 0.9rem !important;
}

/* Compactar a seção de título "Todas as conversas" */
[class*='sc-983b542e-1'] {
    height: auto !important;
    min-height: 0 !important;
    padding: 0.4rem 0.5rem !important;
    flex-shrink: 0 !important;
}
[class*='sc-983b542e-1'] p {
    font-size: 0.85rem !important;
    line-height: 1.2rem !important;
}

/* Compactar a barra de busca/filtro */
[class*='sc-983b542e-2'] {
    height: 2.2rem !important;
    min-height: 0 !important;
    flex-shrink: 0 !important;
}

/* Compactar os tabs do menu lateral */
[class*='sc-983b542e-9'] {
    height: 2rem !important;
    font-size: 0.8rem !important;
}

/* ============================================ */
/* MOD 5: Tela de Disparos Programados - Layout organizado */
/* ============================================ */
[class*='sc-'][class*='appointments'] {
    padding: 1rem !important;
}

/* ============================================ */
/* MOD 6: Chat overlay quando aberto do CRM Kanban */
/* ============================================ */
.chat-overlay-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 99999 !important;
    background: rgba(0,0,0,0.6) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    animation: fadeIn 0.2s ease !important;
}
.chat-overlay-modal .chat-overlay-content {
    width: 92vw !important;
    height: 92vh !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 25px 80px rgba(0,0,0,0.4) !important;
    background: #fff !important;
    position: relative !important;
}
.chat-overlay-modal .chat-overlay-close {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    z-index: 100000 !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 18px !important;
    color: #666 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}
.chat-overlay-modal .chat-overlay-close:hover {
    background: #f5f5f5 !important;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================ */
/* MOD 2: Tags - Design conforme protótipo */
/* ============================================ */
.giraffe-tag-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
    padding: 0.2rem 0.65rem !important;
    border-radius: 12px !important;
    font-size: 0.7rem !important;
    font-weight: 500 !important;
    background-color: #f5f5f5 !important;
    color: #333 !important;
    white-space: nowrap !important;
    margin: 0.15rem !important;
}
.giraffe-tag-dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}

/* ============================================ */
/* MOD 2b: Nível de Urgência - Dropdown selecionável */
/* ============================================ */
.giraffe-priority-dropdown {
    width: 100% !important;
    padding: 0.45rem 0.75rem !important;
    border-radius: 8px !important;
    border: 1px solid #ddd !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    background-color: #fff !important;
    appearance: auto !important;
    outline: none !important;
    color: #333 !important;
}
.giraffe-priority-dropdown:focus {
    border-color: #FF9800 !important;
    box-shadow: 0 0 0 2px rgba(255,152,0,0.15) !important;
}

/* ============================================ */
/* MOD 7: Botões Lead Ganho/Perdido no modal CRM */
/* ============================================ */
.giraffe-lead-actions {
    display: flex !important;
    gap: 0.5rem !important;
    margin-top: 1rem !important;
    padding-top: 0.75rem !important;
    border-top: 1px solid #eee !important;
}
.giraffe-lead-actions .btn-ganho {
    flex: 1 !important;
    padding: 0.6rem 1rem !important;
    border-radius: 8px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border: none !important;
    background-color: #4CAF50 !important;
    color: white !important;
    transition: opacity 0.2s !important;
}
.giraffe-lead-actions .btn-perdido {
    flex: 1 !important;
    padding: 0.6rem 1rem !important;
    border-radius: 8px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border: none !important;
    background-color: #F44336 !important;
    color: white !important;
    transition: opacity 0.2s !important;
}
.giraffe-lead-actions button:hover {
    opacity: 0.85 !important;
}
