/**
 * Order Tracking FAQ Section Styles
 * 
 * These styles define the appearance of the Frequently Asked Questions section
 * on the order tracking page. The section uses an accordion-style interaction
 * to show/hide answers when questions are clicked.
 */

/* 
 * Container for the entire FAQ section
 * Uses standard container width with centered alignment
 */
.order-tracking-faq {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-xl) 0; /* Adding vertical spacing */
}

/* 
 * Header for the FAQ section with centered title
 * Follows standard section header patterns from the theme
 */
.tracking-faq-header {
    text-align: center;
    margin-bottom: var(--space-xxl); /* Increased margin for better separation */
}

/* 
 * List container for FAQ items
 * Uses flexbox for vertical stacking with consistent spacing
 */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg); /* Increased gap between FAQ items */
}

/* 
 * Individual FAQ item container
 * Using overflow:hidden to contain expanding/collapsing answer
 */
.faq-item {
    overflow: hidden;
    transition: var(--transition-base);
    border-radius: var(--border-radius-md); /* Adding rounded corners */
    box-shadow: var(--shadow-md); /* Adding shadow for depth */
    background-color: var(--white); /* Ensuring white background */
}

/* 
 * Question row styling - this is the clickable header
 * Includes hover state and cursor pointer for better UX
 */
.faq-question {
    padding: var(--space-xl) var(--space-xl); /* Increased padding for more spacious appearance */
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-md); /* Setting explicit font size */
    color: var(--dark-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
    background-color: var(--white);
    border-radius: var(--border-radius-md); /* Matching card radius */
}

/* 
 * Hover state for questions to provide visual feedback
 * Uses light primary color as background for subtle highlight
 */
.faq-question:hover {
    background-color: #e6f0fa; /* Light version of primary color */
}

/* 
 * Icon animation for chevron in the FAQ
 * Smooth transition for rotation when expanding/collapsing
 */
.faq-question i {
    transition: transform 0.3s;
}

/* 
 * Active state for the icon when FAQ is open
 * Rotates chevron to indicate expanded state
 */
.faq-question.active i {
    transform: rotate(180deg);
}

/* 
 * Answer container styling
 * Hidden by default, shown when active via JavaScript
 */
.faq-answer {
    padding: var(--space-lg) var(--space-xl); /* Increased padding for better readability */
    border-top: 1px solid #E5E5E5; /* Using border color from the theme */
    display: none;
    line-height: 1.6; /* Improved line height */
}

/* 
 * List styling within FAQ answers
 * Proper spacing and indentation for lists in answer content
 */
.faq-answer ul {
    margin: var(--space-sm) 0;
    padding-left: 1.5rem;
}

/* 
 * List item spacing within answers
 * Consistent with theme's vertical rhythm
 */
.faq-answer li {
    margin-bottom: var(--space-xs);
}

/* 
 * Responsive adjustments for smaller screens
 * Tightens up spacing and padding for mobile views
 */
@media (max-width: 768px) {
    .faq-question, 
    .faq-answer {
        padding: var(--space-md) var(--space-lg); /* Still reduced but more spacious than before */
    }
    
    .tracking-faq-header {
        margin-bottom: var(--space-xl); /* Increased but still appropriate for mobile */
    }
    
    .faq-list {
        gap: var(--space-md); /* Reduced spacing on mobile */
    }
}
