/**
 * WooCommerce Central FAQ - Frontend Styles
 * Modern design inspired by EasyFAQ
 */

.woo-central-faq-container {
    margin: 30px 0;
    font-family: inherit;
}

.woo-faq-item {
    margin-bottom: 12px;
    transition: all 0.3s ease;
    border-radius: 12px;
    padding: 0;
    border: 1px solid #e5e5e5;
    background: #fff;
}

.woo-faq-item.is-expanded {
    background-color: #f8f9fa;
    border-color: #d5d5d5;
}

.woo-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
    text-align: left;
}

.woo-faq-question:hover {
    background-color: #fafafa;
}

.woo-faq-question:focus {
    outline: none;
    background-color: #fafafa;
}

.woo-faq-item.is-expanded .woo-faq-question {
    background: transparent;
}

.woo-faq-question-text {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: #000;
    line-height: 1.5;
    padding-right: 24px;
    letter-spacing: -0.02em;
}

.woo-faq-toggle-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #000;
    transition: transform 0.3s ease;
    font-weight: 300;
    font-size: 24px;
}

.woo-faq-toggle-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Rotated arrow when collapsed (default down arrow rotates to up when expanded) */
.woo-faq-question[aria-expanded="false"] .woo-faq-toggle-icon {
    transform: rotate(0deg);
}

.woo-faq-question[aria-expanded="true"] .woo-faq-toggle-icon {
    transform: rotate(180deg);
}

.woo-faq-answer {
    background: transparent;
    border: none;
    overflow: hidden;
}

.woo-faq-answer-content {
    padding: 0 24px 24px 24px;
    line-height: 1.7;
    color: #4a5568;
    font-size: 16px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Answer content formatting */
.woo-faq-answer-content p {
    margin: 0 0 12px 0;
}

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

.woo-faq-answer-content ul,
.woo-faq-answer-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.woo-faq-answer-content li {
    margin-bottom: 8px;
    color: #4a5568;
}

.woo-faq-answer-content strong {
    font-weight: 600;
    color: #000;
}

.woo-faq-answer-content a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.woo-faq-answer-content a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Blockquotes */
.woo-faq-answer-content blockquote {
    margin: 16px 0;
    padding-left: 16px;
    border-left: 3px solid #e5e5e5;
    font-style: italic;
    color: #6b7280;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .woo-faq-question {
        padding: 18px 20px;
    }

    .woo-faq-question-text {
        font-size: 17px;
    }

    .woo-faq-answer-content {
        padding: 0 20px 20px 20px;
        font-size: 15px;
    }

    .woo-faq-item {
        margin-bottom: 10px;
    }
}

@media screen and (max-width: 480px) {
    .woo-faq-question {
        padding: 16px 18px;
    }

    .woo-faq-question-text {
        font-size: 16px;
        padding-right: 16px;
    }

    .woo-faq-answer-content {
        padding: 0 18px 18px 18px;
        font-size: 14px;
    }

    .woo-faq-item {
        margin-bottom: 8px;
        border-radius: 10px;
    }

    .woo-faq-toggle-icon {
        width: 24px;
        height: 24px;
    }
}

/* Tab panel container styling (WooCommerce compatibility) */
.woocommerce-tabs #tab-faq {
    padding: 0;
}
