/**
 * NanoNside - FAQ 페이지 스타일
 */

/* 페이지 헤더 */
.page-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* 카테고리 탭 */
.faq-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.faq-tabs::-webkit-scrollbar {
    display: none;
}

.faq-tab {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    border: none;
    background: none;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    margin-bottom: -0.5rem;
}

.faq-tab:hover {
    color: #f59e0b;
}

.faq-tab.active {
    color: #f59e0b;
    border-bottom-color: #f59e0b;
    font-weight: 500;
}

.faq-tab .count {
    color: #9ca3af;
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.faq-tab.active .count {
    color: #f59e0b;
}

/* 검색 영역 */
.faq-search {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: #9ca3af;
}

.search-input {
    padding-left: 2.75rem;
}

/* FAQ 목록 */
.faq-list {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* FAQ 아이템 */
.faq-item {
    border-bottom: 1px solid #e5e7eb;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #1f2937;
    transition: background-color 0.2s, color 0.2s;
    gap: 1rem;
}

.faq-question:hover {
    background-color: #f9fafb;
    color: #f59e0b;
}

.faq-question-text {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.faq-category-badge {
    display: inline-flex;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #f59e0b;
    background-color: #fef3c7;
    border-radius: 9999px;
    white-space: nowrap;
}

.faq-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #9ca3af;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

/* FAQ 답변 */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 1000px;
}

.faq-answer-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: #6b7280;
    line-height: 1.7;
    border-left: 3px solid #f59e0b;
    margin-left: 1.5rem;
    padding-left: 1rem;
}

.faq-answer-content p {
    margin-bottom: 0.75rem;
}

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

.faq-answer-content ol,
.faq-answer-content ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.faq-answer-content li {
    margin-bottom: 0.25rem;
}

/* 로딩 상태 */
.faq-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #6b7280;
    gap: 1rem;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #e5e7eb;
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 빈 상태 */
.faq-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.faq-empty.hidden {
    display: none;
}

.empty-icon {
    width: 4rem;
    height: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-text {
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.empty-hint {
    font-size: 0.875rem;
    color: #9ca3af;
}

/* 반응형 */
@media (max-width: 640px) {
    .faq-search {
        flex-direction: column;
    }

    .faq-search .btn-primary {
        width: 100%;
    }

    .faq-question {
        padding: 1rem;
    }

    .faq-answer-content {
        margin-left: 1rem;
        padding-right: 1rem;
    }

    .faq-category-badge {
        display: none;
    }
}
