/**
 * ClickAgenda - Estilos da Central de Ajuda, FAQ, Suporte & Reembolso
 */

/* Layout do Painel de Ajuda e Suporte & Configurações */
.ca-support-tabs,
.ca-settings-tabs {
    display: flex;
    gap: 0.4rem;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.ca-support-tab-btn,
.ca-settings-tab-btn {
    background: none;
    border: none;
    padding: 0.65rem 1.15rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-radius: 6px 6px 0 0;
}

.ca-support-tab-btn:hover,
.ca-settings-tab-btn:hover {
    color: #4f46e5;
    background: #f8fafc;
}

.ca-support-tab-btn.active,
.ca-settings-tab-btn.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
    background: #f1f5f9;
}

.ca-support-tab-content,
.ca-settings-tab-content {
    display: none;
}

.ca-support-tab-content.active,
.ca-settings-tab-content.active {
    display: block;
    animation: fadeInTab 0.25s ease;
}

@media (max-width: 768px) {
    .ca-support-tabs,
    .ca-settings-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .ca-support-tabs::-webkit-scrollbar,
    .ca-settings-tabs::-webkit-scrollbar {
        display: none;
    }
    .ca-support-tab-btn,
    .ca-settings-tab-btn {
        padding: 0.6rem 0.85rem;
        font-size: 0.85rem;
    }
}


@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Card de Reembolso e CDC */
.ca-refund-banner {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.ca-refund-icon {
    background: #dbeafe;
    color: #1d4ed8;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.ca-badge-cdc {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #dcfce7;
    color: #15803d;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.ca-badge-cdc-expired {
    background: #f1f5f9;
    color: #64748b;
}

/* Lista de Chamados */
.ca-ticket-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ca-ticket-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateY(-1px);
}

.ca-ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.ca-ticket-protocol {
    font-family: monospace;
    font-weight: 700;
    color: #4f46e5;
    font-size: 0.9rem;
}

.ca-status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    text-transform: uppercase;
}

.ca-status-aberto { background: #fef3c7; color: #b45309; }
.ca-status-em_analise { background: #e0f2fe; color: #0369a1; }
.ca-status-respondido { background: #dcfce7; color: #15803d; }
.ca-status-resolvido { background: #f1f5f9; color: #64748b; }

.ca-ticket-subject {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.35rem;
}

.ca-ticket-meta {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Chat e Histórico de Mensagens do Chamado */
.ca-chat-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    max-height: 380px;
    overflow-y: auto;
    margin: 1rem 0;
}

.ca-chat-msg {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.92rem;
    line-height: 1.5;
    max-width: 85%;
}

.ca-chat-msg.usuario {
    background: #4f46e5;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 2px;
}

.ca-chat-msg.suporte {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    margin-right: auto;
    border-bottom-left-radius: 2px;
}

.ca-chat-msg-header {
    font-size: 0.75rem;
    opacity: 0.85;
    margin-bottom: 0.35rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

/* Acordeão de FAQ */
.ca-faq-search {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E") no-repeat 0.75rem center;
    background-size: 1.1rem;
}

.ca-faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.65rem;
    overflow: hidden;
    background: #ffffff;
}

.ca-faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: background 0.15s ease;
}

.ca-faq-question:hover {
    background: #f8fafc;
}

.ca-faq-icon {
    color: #64748b;
    transition: transform 0.2s ease;
}

.ca-faq-item.open .ca-faq-icon {
    transform: rotate(180deg);
}

.ca-faq-answer {
    display: none;
    padding: 0 1rem 1rem 1rem;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
    border-top: 1px solid #f1f5f9;
}

.ca-faq-item.open .ca-faq-answer {
    display: block;
}
