/* 
 * FAQ Styling Fixes
 * This file contains explicit overrides for the FAQ styling issues
 */

/* FAQ Containers */
.km-faq-section {
    margin: 30px 0 !important;
    padding: 20px 0 !important;
}

.km-faq-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 30px 0 !important;
}

.km-faq-item {
    margin-bottom: 15px !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    direction: rtl !important;
    background-color: #f9f9f9 !important;
    transition: background-color 0.3s ease !important;
}

/* Question Styling */
.km-faq-question {
    background-color: #f9f9f9 !important;
    padding: 15px 20px !important;
    cursor: pointer !important;
    position: relative !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-radius: 4px !important;
    user-select: none !important;
    font-weight: 600 !important;
    transition: background-color 0.3s !important;
}

/* Remove the right side pseudo-element (+ sign) */
.km-faq-question:after {
    content: none !important;
    display: none !important;
}

.km-faq-question:hover {
    background-color: #f1f1f1 !important;
}

/* Fix for icon */
.km-faq-icon {
    margin-right: 10px !important;
    transition: transform 0.3s ease !important;
}

.km-faq-text {
    flex: 1 !important;
}

/* Active Question State */
.km-faq-item.active {
    background-color: #f5f5f5 !important;
}

.km-faq-item.active .km-faq-question {
    background-color: #e9e9e9 !important;
}

.km-faq-item.active .km-faq-icon i {
    transform: rotate(180deg) !important;
}

/* Answer Styling */
.km-faq-answer {
    height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    transition: height 0.4s ease, padding 0.4s ease !important;
    background-color: white !important;
    border-radius: 0 0 4px 4px !important;
    will-change: height, padding !important;
}

.km-faq-answer p {
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    line-height: 1.8 !important;
}

.km-faq-answer p:last-child {
    margin-bottom: 0 !important;
}

/* Active Answer State */
.km-faq-item.active .km-faq-answer {
    height: auto; /* Will be set by JS */
    padding: 20px !important;
    margin-bottom: 0 !important;
    border-top: 1px solid #eee !important;
    display: block !important;
}

/* Accessibility Focus State */
.km-faq-question:focus {
    outline: 2px solid #4a90e2 !important;
    outline-offset: -2px !important;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .km-faq-question {
        font-size: 14px !important;
        padding: 12px 15px !important;
    }
    
    .km-faq-icon {
        margin-right: 0 !important;
    }
    
    .km-faq-answer {
        font-size: 13px !important;
    }
    
    .km-faq-item.active .km-faq-answer {
        padding: 15px !important;
    }
} 