/* AI Product FAQ Frontend Styles */

/* Mobile Touch Optimization */
.ai-faq-question,
.ai-faq-question-tab {
    /* Improve touch targets for mobile devices */
    min-height: 44px; /* Apple's recommended minimum touch target */
    display: flex;
    align-items: center;
    
    /* Prevent touch delays on iOS Safari */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    
    /* Remove tap highlight on mobile */
    -webkit-tap-highlight-color: transparent;
    
    /* Ensure proper cursor */
    cursor: pointer;
    
    /* Add touch feedback */
    transition: background-color 0.15s ease, transform 0.1s ease;
}

/* Touch feedback for better user experience */
.ai-faq-question:active,
.ai-faq-question-tab:active {
    transform: scale(0.98);
    background-color: rgba(0, 0, 0, 0.05);
}

/* Ensure clickable area covers full width */
.ai-faq-question,
.ai-faq-question-tab {
    width: 100%;
    padding: 12px 16px;
    box-sizing: border-box;
}

/* Additional styles for typing animation */
.ai-faq-answer.typing-active {
    display: block !important;
}

.ai-faq-highlight {
    background-color: #ffeb3b;
    padding: 1px 2px;
    border-radius: 2px;
}

/* Ensure proper display states */
.ai-faq-answer {
    display: none;
    overflow: hidden;
}

/* Animation states */
.ai-faq-answer.typing-active {
    display: block;
}

/* Progress bars for bulk operations */
.ai-faq-progress-bar {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.ai-faq-progress-fill {
    height: 100%;
    background-color: #4f46e5;
    width: 0%;
    transition: width 0.3s ease;
}

.ai-faq-progress-text {
    text-align: center;
    margin: 5px 0;
    font-weight: bold;
}

/* Success and error messages */
.ai-faq-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
}

.ai-faq-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
}

/* No results message */
.ai-faq-no-results {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* Mobile-specific optimizations */
@media (max-width: 768px) {
    .ai-faq-question,
    .ai-faq-question-tab {
        /* Larger touch targets on mobile */
        min-height: 48px;
        padding: 16px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Improve spacing on mobile */
    .ai-faq-item {
        margin-bottom: 8px;
    }
    
    /* Better search input on mobile */
    .ai-faq-search-input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Accessibility improvements */
.ai-faq-question:focus,
.ai-faq-question-tab:focus {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* Ensure icons and text are properly aligned */
.ai-faq-question-text {
    flex: 1;
}

.ai-faq-question-icon {
    margin-left: auto;
    transition: transform 0.2s ease;
}

/* Rotate icon when expanded */
.ai-faq-question[aria-expanded="true"] .ai-faq-question-icon {
    transform: rotate(180deg);
}
