/**
 * FAQ手风琴组件样式
 * 
 * 独立的FAQ组件样式，遵循 DESIGN_SYSTEM.md 规范
 * 可在多个页面复用
 * 
 * @package MTO Moving
 * @since 1.0.0
 */

/* ================================
   组件容器
   ================================ */
.faq-accordion-component {
    width: 100%;
}

/* ================================
   搜索框样式
   ================================ */
.faq-search-wrapper {
    margin-bottom: 32px;
}

.faq-search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.faq-search-box .search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #555555;
    pointer-events: none;
    z-index: 1;
}

.faq-search-input {
    width: 100%;
    padding: 14px 56px 14px 52px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
    background: #ffffff;
}

.faq-search-input:focus {
    outline: none;
    border-color: #2c5f8d;
    box-shadow: 0 4px 12px rgba(44, 95, 141, 0.15);
}

.faq-search-input::placeholder {
    color: #999999;
}

.faq-search-box .search-clear {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999999;
    cursor: pointer;
    transition: color 0.3s ease;
    display: none;
    z-index: 1;
}

.faq-search-box .search-clear:hover {
    color: #555555;
}

/* ================================
   分类标签样式
   ================================ */
.faq-categories-wrapper {
    margin-bottom: 32px;
}

.faq-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.faq-category-tab {
    padding: 10px 20px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: #555555;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
}

.faq-category-tab:hover {
    border-color: #2c5f8d;
    color: #2c5f8d;
    transform: translateY(-2px);
}

.faq-category-tab.active {
    background: #2c5f8d;
    border-color: #2c5f8d;
    color: #ffffff;
}

/* ================================
   FAQ列表样式
   ================================ */
.faq-accordion-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-accordion-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-accordion-item:hover {
    border-color: #2c5f8d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faq-accordion-item.hidden {
    display: none;
}

/* FAQ问题按钮 */
.faq-accordion-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-accordion-question:hover {
    background: #f8f9fa;
}

.faq-question-text {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
    font-family: 'Noto Sans SC', sans-serif;
}

.faq-accordion-icon {
    flex-shrink: 0;
    color: #2c5f8d;
    transition: transform 0.3s ease;
}

.faq-accordion-question[aria-expanded="true"] .faq-accordion-icon {
    transform: rotate(180deg);
}

/* FAQ答案内容 */
.faq-accordion-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-accordion-question[aria-expanded="true"] + .faq-accordion-answer {
    max-height: 2000px;
    border-top: 1px solid #ecf0f1;
}

.faq-answer-content {
    padding: 20px 24px 24px;
}

.faq-answer-content p {
    font-size: 16px;
    color: #555555;
    line-height: 1.8;
    margin-bottom: 12px;
}

.faq-answer-content p:last-child {
    margin-bottom: 0;
}

.faq-answer-content strong {
    color: #2c3e50;
    font-weight: 600;
}

/* 有序列表 */
.faq-answer-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.faq-answer-content ol li {
    font-size: 16px;
    color: #555555;
    line-height: 1.8;
    margin-bottom: 12px;
}

.faq-answer-content ol li:last-child {
    margin-bottom: 0;
}

/* 无序列表 */
.faq-answer-content ul {
    margin: 16px 0;
    padding-left: 24px;
}

.faq-answer-content ul li {
    font-size: 16px;
    color: #555555;
    line-height: 1.8;
    margin-bottom: 8px;
}

.faq-answer-content ul li:last-child {
    margin-bottom: 0;
}

/* 警告提示框 */
.faq-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.6;
}

.faq-alert.warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.faq-alert svg {
    flex-shrink: 0;
}

/* ================================
   无结果提示
   ================================ */
.faq-no-results {
    text-align: center;
    padding: 60px 20px;
}

.faq-no-results svg {
    color: #e0e0e0;
    margin-bottom: 20px;
}

.faq-no-results h3 {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 600;
}

.faq-no-results p {
    font-size: 16px;
    color: #555555;
}

.faq-no-data {
    text-align: center;
    padding: 40px 20px;
    color: #999999;
    font-size: 16px;
}

/* ================================
   搜索高亮
   ================================ */
.faq-question-text mark.highlight,
.faq-answer-content mark.highlight {
    background: #fff3cd;
    color: #856404;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* ================================
   响应式设计
   ================================ */

/* 平板竖屏 (768px) */
@media (max-width: 768px) {
    .faq-search-wrapper {
        margin-bottom: 24px;
    }

    .faq-categories-wrapper {
        margin-bottom: 24px;
    }

    .faq-category-tabs {
        gap: 8px;
    }

    .faq-category-tab {
        padding: 8px 16px;
        font-size: 13px;
    }

    .faq-accordion-list {
        gap: 12px;
    }

    .faq-accordion-question {
        padding: 16px 20px;
    }

    .faq-question-text {
        font-size: 17px;
    }

    .faq-answer-content {
        padding: 16px 20px 20px;
    }

    .faq-answer-content p,
    .faq-answer-content ol li,
    .faq-answer-content ul li {
        font-size: 15px;
    }
}

/* 手机 (480px) */
@media (max-width: 480px) {
    .faq-search-input {
        padding: 12px 48px 12px 48px;
        font-size: 15px;
    }

    .faq-search-box .search-icon {
        left: 16px;
    }

    .faq-search-box .search-clear {
        right: 16px;
    }

    .faq-category-tab {
        padding: 6px 12px;
        font-size: 12px;
    }

    .faq-accordion-question {
        padding: 14px 16px;
    }

    .faq-question-text {
        font-size: 16px;
    }

    .faq-answer-content {
        padding: 14px 16px 18px;
    }

    .faq-answer-content p,
    .faq-answer-content ol li,
    .faq-answer-content ul li {
        font-size: 14px;
    }

    .faq-no-results {
        padding: 40px 16px;
    }

    .faq-no-results h3 {
        font-size: 20px;
    }

    .faq-no-results p {
        font-size: 15px;
    }
}

/* ================================
   打印样式
   ================================ */
@media print {
    .faq-search-wrapper,
    .faq-categories-wrapper {
        display: none;
    }

    .faq-accordion-item {
        page-break-inside: avoid;
        border: 1px solid #e0e0e0;
        margin-bottom: 16px;
    }

    .faq-accordion-question {
        background: #f8f9fa !important;
    }

    .faq-accordion-answer {
        max-height: none !important;
        border-top: 1px solid #ecf0f1 !important;
    }

    .faq-answer-content {
        padding: 16px 20px !important;
    }

    .faq-accordion-icon {
        display: none;
    }
}

