/**
 * Estilos para FAQ (Perguntas Frequentes) - Design Moderno e Clean
 * Completamente isolado para evitar conflitos com tabela Dropdown
 * 
 * @package Upgram
 * @since 2.0.0
 */

/* ============================================
   CONTAINER PRINCIPAL - ISOLAMENTO TOTAL
   ============================================ */
.upgram-faq-wrapper {
    /* Isolamento CSS completo */
    isolation: isolate;
    contain: layout style;
    position: relative;
    z-index: 1;
    
    /* Layout */
    display: block;
    width: 100%;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0;
    box-sizing: border-box;
    
    /* Reset completo */
    background: transparent;
    border: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1f2937;
}

.upgram-faq-inner {
    width: 100%;
    box-sizing: border-box;
}

/* ============================================
   TÍTULO
   ============================================ */
.upgram-faq-title {
    display: block;
    width: 100%;
    margin: 0 0 40px 0;
    padding: 0;
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    text-align: center;
    box-sizing: border-box;
    letter-spacing: -0.5px;
}

/* ============================================
   LISTA DE FAQs
   ============================================ */
.upgram-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    box-sizing: border-box;
}

/* ============================================
   ITEM INDIVIDUAL DO FAQ - ESTILO PADRÃO
   ============================================ */
.upgram-faq-item {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    position: relative;
}

.upgram-faq-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.upgram-faq-item[data-expanded="true"] {
    border-color: #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    background: #ffffff;
}

/* ============================================
   BOTÃO TOGGLE
   ============================================ */
.upgram-faq-toggle {
    /* Reset completo */
    all: unset;
    box-sizing: border-box;
    
    /* Layout */
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 28px;
    margin: 0;
    
    /* Estilo */
    background: #ffffff;
    border: none;
    border-radius: 0;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    color: #374151;
    line-height: 1.5;
    transition: all 0.2s ease;
    
    /* Interação */
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.upgram-faq-toggle:hover {
    color: inherit;
    background: transparent;
}

.upgram-faq-toggle:focus {
    outline: none;
    outline-offset: 0;
}

.upgram-faq-item[data-expanded="true"] .upgram-faq-toggle {
    color: inherit;
    background: transparent;
}

/* ============================================
   TEXTO DA PERGUNTA
   ============================================ */
.upgram-faq-question-text {
    flex: 1;
    display: block;
    margin: 0;
    padding: 0;
    font-size: 17px;
    font-weight: 600;
    color: inherit;
    line-height: 1.5;
    min-width: 0;
    transition: color 0.2s ease;
}

/* ============================================
   ÍCONE
   ============================================ */
.upgram-faq-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: #9ca3af;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    margin: 0;
}

.upgram-faq-item:hover .upgram-faq-icon {
    color: #9ca3af;
}

.upgram-faq-item[data-expanded="true"] .upgram-faq-icon {
    transform: rotate(180deg);
    color: #9ca3af;
}

/* ============================================
   CONTEÚDO (RESPOSTA)
   ============================================ */
.upgram-faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.upgram-faq-content:not([hidden]) {
    max-height: 2000px;
    opacity: 1;
}

.upgram-faq-answer {
    padding: 0 28px 28px 28px;
    margin: 0;
    font-size: 15px;
    line-height: 1.75;
    color: #4b5563;
    box-sizing: border-box;
}

.upgram-faq-answer p {
    margin: 0 0 14px 0;
    color: #4b5563;
}

.upgram-faq-answer p:last-child {
    margin-bottom: 0;
}

.upgram-faq-answer ul,
.upgram-faq-answer ol {
    margin: 14px 0;
    padding-left: 24px;
    color: #4b5563;
}

.upgram-faq-answer li {
    margin: 8px 0;
}

/* ============================================
   ESTILO MODERNO - Design Premium
   ============================================ */
.upgram-faq-style-modern .upgram-faq-title {
    color: #111827;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 48px;
    letter-spacing: -0.8px;
}

.upgram-faq-style-modern .upgram-faq-list {
    gap: 16px;
}

.upgram-faq-style-modern .upgram-faq-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: visible;
}

.upgram-faq-style-modern .upgram-faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #d1d5db;
}

.upgram-faq-style-modern .upgram-faq-item[data-expanded="true"] {
    border-color: #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    background: #ffffff;
}

.upgram-faq-style-modern .upgram-faq-toggle {
    padding: 26px 32px;
    font-size: 18px;
}

.upgram-faq-style-modern .upgram-faq-toggle:hover {
    background: transparent;
}

.upgram-faq-style-modern .upgram-faq-question-text {
    font-size: 18px;
    font-weight: 700;
    color: #374151;
    background: none;
    -webkit-text-fill-color: #374151;
}

.upgram-faq-style-modern .upgram-faq-item[data-expanded="true"] .upgram-faq-question-text {
    color: #374151;
    background: none;
    -webkit-text-fill-color: #374151;
}

.upgram-faq-style-modern .upgram-faq-icon {
    width: 26px;
    height: 26px;
    color: #9ca3af;
    background: transparent;
    border-radius: 50%;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upgram-faq-style-modern .upgram-faq-item:hover .upgram-faq-icon {
    background: transparent;
    transform: scale(1.05);
}

.upgram-faq-style-modern .upgram-faq-item[data-expanded="true"] .upgram-faq-icon {
    background: transparent;
    transform: rotate(180deg) scale(1.05);
}

.upgram-faq-style-modern .upgram-faq-answer {
    padding: 0 32px 32px 32px;
    font-size: 16px;
    line-height: 1.8;
    color: #475569;
}

/* ============================================
   ESTILO MINIMALISTA - Design Ultra Clean
   ============================================ */
.upgram-faq-style-minimal .upgram-faq-title {
    font-size: 34px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 48px;
    text-align: center;
    letter-spacing: -0.6px;
    position: relative;
    padding-bottom: 24px;
}

.upgram-faq-style-minimal .upgram-faq-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: transparent;
    border-radius: 2px;
}

.upgram-faq-style-minimal .upgram-faq-list {
    gap: 0;
    max-width: 900px;
    margin: 0 auto;
}

.upgram-faq-style-minimal .upgram-faq-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    box-shadow: none;
    transition: all 0.2s ease;
}

.upgram-faq-style-minimal .upgram-faq-item:first-child {
    border-top: 1px solid #e2e8f0;
}

.upgram-faq-style-minimal .upgram-faq-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: none;
    box-shadow: none;
}

.upgram-faq-style-minimal .upgram-faq-item[data-expanded="true"] {
    background: #f1f5f9;
    border-bottom-color: #cbd5e1;
}

.upgram-faq-style-minimal .upgram-faq-toggle {
    padding: 24px 0;
    background: transparent;
    font-size: 17px;
}

.upgram-faq-style-minimal .upgram-faq-toggle:hover {
    background: transparent;
    color: inherit;
}

.upgram-faq-style-minimal .upgram-faq-question-text {
    font-size: 17px;
    font-weight: 600;
    color: #374151;
    letter-spacing: -0.2px;
}

.upgram-faq-style-minimal .upgram-faq-item[data-expanded="true"] .upgram-faq-question-text {
    color: #374151;
}

.upgram-faq-style-minimal .upgram-faq-icon {
    width: 20px;
    height: 20px;
    color: #64748b;
    transition: all 0.3s ease;
}

.upgram-faq-style-minimal .upgram-faq-item:hover .upgram-faq-icon {
    color: #64748b;
}

.upgram-faq-style-minimal .upgram-faq-item[data-expanded="true"] .upgram-faq-icon {
    transform: rotate(180deg);
    color: #64748b;
}

.upgram-faq-style-minimal .upgram-faq-answer {
    padding: 0 0 28px 0;
    padding-left: 28px;
    font-size: 15px;
    line-height: 1.8;
    border-left: 3px solid transparent;
    transition: border-color 0.3s ease;
    color: #475569;
}

.upgram-faq-style-minimal .upgram-faq-item[data-expanded="true"] .upgram-faq-answer {
    border-left-color: transparent;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 768px) {
    .upgram-faq-wrapper {
        margin: 2rem auto;
        padding: 0 16px;
    }
    
    .upgram-faq-title {
        font-size: 26px;
        margin-bottom: 32px;
    }
    
    .upgram-faq-toggle {
        padding: 18px 20px;
        font-size: 16px;
        gap: 16px;
    }
    
    .upgram-faq-question-text {
        font-size: 16px;
    }
    
    .upgram-faq-icon {
        width: 20px;
        height: 20px;
    }
    
    .upgram-faq-answer {
        padding: 0 20px 20px 20px;
        font-size: 14px;
    }
    
    .upgram-faq-style-modern .upgram-faq-title {
        font-size: 28px;
        margin-bottom: 36px;
    }
    
    .upgram-faq-style-modern .upgram-faq-toggle {
        padding: 22px 24px;
    }
    
    .upgram-faq-style-modern .upgram-faq-question-text {
        font-size: 17px;
    }
    
    .upgram-faq-style-modern .upgram-faq-icon {
        width: 24px;
        height: 24px;
    }
    
    .upgram-faq-style-modern .upgram-faq-answer {
        padding: 0 24px 24px 24px;
        font-size: 15px;
    }
    
    .upgram-faq-style-minimal .upgram-faq-title {
        font-size: 24px;
        margin-bottom: 36px;
    }
    
    .upgram-faq-style-minimal .upgram-faq-toggle {
        padding: 20px 0;
    }
    
    .upgram-faq-style-minimal .upgram-faq-question-text {
        font-size: 16px;
    }
    
    .upgram-faq-style-minimal .upgram-faq-answer {
        padding: 0 0 24px 0;
        padding-left: 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .upgram-faq-wrapper {
        padding: 0 12px;
    }
    
    .upgram-faq-title {
        font-size: 22px;
        margin-bottom: 24px;
    }
    
    .upgram-faq-toggle {
        padding: 16px 16px;
        font-size: 15px;
    }
    
    .upgram-faq-answer {
        padding: 0 16px 16px 16px;
        font-size: 14px;
    }
}
