/* FAQ Tab Styles - Enhanced for consistency with other tabs */

/* Main FAQ tab container - Matching Overview section styling */
.sm-faq-tab-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 20px 24px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

/* Tab Header - Matching Overview section h2 styling */
.sm-faq-tab-content .sm-tab-header { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    margin-bottom: 20px; 
    padding: 0 0 16px 0;
    border-bottom: 2px solid #e8e8e8;
    background: transparent;
}

.sm-faq-tab-content .sm-tab-header h2 {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Remove blue gradient underline */
.sm-faq-tab-content .sm-tab-header h2::after {
    display: none !important;
    content: none !important;
}

.sm-faq-tab-content .sm-tab-logo { 
    width: 48px; 
    height: 48px; 
    object-fit: contain; 
    border-radius: 8px; 
    border: 1px solid #e5e7eb;
}

/* Section Styles - consistent with Overview section */
.sm-faq-tab-content .sm-section { 
    margin: 20px 0; 
    padding: 0;
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    box-sizing: border-box;
}

.sm-faq-tab-content .sm-section:first-child {
    margin-top: 0;
}

.sm-faq-tab-content .sm-section:last-child {
    margin-bottom: 0;
}

/* FAQ Items - enhanced styling */
.sm-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sm-faq-item { 
    border: 1px solid #e5e7eb; 
    border-radius: 8px; 
    background: #fff; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    overflow: visible;
    transition: all 0.3s ease;
}

.sm-faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* FAQ Question styling */
.sm-faq-question { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 16px 20px; 
    cursor: pointer;
    background: #f8fafc;
    border-radius: 8px 8px 0 0;
    transition: background-color 0.3s;
    user-select: none;
}

.sm-faq-question:hover {
    background: #f1f5f9;
}

.sm-faq-question h3 {
    margin: 0;
    color: #111827;
    font-size: 16px;
    font-weight: 600;
    flex-grow: 1;
    padding-right: 16px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* FAQ Asked Count Badge */
.sm-faq-asked-count {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 12px;
    flex-shrink: 0;
}

/* FAQ Toggle styling */
.sm-faq-toggle { 
    font-size: 18px;
    font-weight: bold;
    color: #6b7280;
    transition: transform 0.3s, color 0.3s;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(107, 114, 128, 0.1);
    flex-shrink: 0;
}

.sm-faq-toggle.active {
    transform: rotate(45deg);
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
}

/* FAQ Answer styling */
.sm-faq-answer { 
    padding: 0;
    border-top: none;
    background: white;
    display: none;
    height: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out;
}

.sm-faq-answer[style*="display: block"] { 
    padding: 20px; 
    border-top: 1px solid #e5e7eb;
    height: auto;
}

.sm-faq-answer.active,
.sm-faq-item .sm-faq-answer[style*="display: block"] { 
    padding: 20px; 
    border-top: 1px solid #e5e7eb;
    display: block;
    max-height: 1000px;
}

.sm-faq-answer p {
    margin: 0 0 12px 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
}

.sm-faq-answer p:last-child {
    margin-bottom: 0;
}

/* Animation for FAQ toggles */
@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
}

.sm-faq-answer.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.sm-faq-answer.hide {
    animation: slideUp 0.3s ease-out;
}

/* No FAQs message styling */
.sm-faq-list > p.sm-faq-empty-message {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 40px 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
    margin: 24px 0;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .sm-faq-tab-content {
        padding: 16px;
    }
    
    .sm-faq-tab-content .sm-tab-header {
        padding: 0 0 12px 0;
    }
    
    .sm-faq-tab-content .sm-tab-header h2 {
        font-size: 24px !important;
    }
    
    .sm-faq-tab-content .sm-section {
        padding: 0;
    }
    
    .sm-faq-question {
        padding: 14px 16px;
    }
    
    .sm-faq-question h3 {
        font-size: 15px;
    }
    
    .sm-faq-answer {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .sm-faq-tab-content {
        padding: 12px;
    }
    
    .sm-faq-tab-content .sm-tab-header h2 {
        font-size: 20px !important;
    }
    
    .sm-faq-question {
        padding: 12px;
    }
    
    .sm-faq-answer {
        padding: 12px;
    }
}
