/* FAQ専用スタイル */

/* -------------------------------------------------- */
/* 検索欄 */

.custom-faq-search-wrapper {
    margin-top: 1.5rem;
}

.custom-faq-search-inner {
    position: relative;
    display: flex;
    align-items: center;
}

.custom-faq-search-icon {
    position: absolute;
    left: 1rem;
    width: 18px;
    height: 18px;
    color: var(--custom-gray-dark);
    pointer-events: none;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.custom-faq-search-inner:focus-within .custom-faq-search-icon {
    color: var(--custom-purple);
}

.custom-faq-search-input {
    width: 100%;
    padding: 0.9375rem 2.75rem 0.9375rem 2.75rem;
    font-size: 0.875rem;
    border: 1.5px solid transparent;
    border-radius: 999px;
    background-color: var(--custom-bg-gray);
    color: var(--custom-text-color);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.custom-faq-search-input:focus {
    border-color: var(--custom-purple);
    background-color: var(--custom-white);
}

.custom-faq-search-input::placeholder {
    color: var(--custom-gray-dark);
}

.custom-faq-search-clear {
    position: absolute;
    right: 0.875rem;
    background: none;
    border: none;
    color: var(--custom-gray-dark);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    display: none;
}

.custom-faq-search-clear.visible {
    display: block;
}

/* 該当なし */
.custom-faq-no-results {
    text-align: center;
    color: var(--custom-gray-dark);
    font-size: 0.875rem;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
}

/* -------------------------------------------------- */
/* ハイライト */

.custom-faq-highlight {
    background: rgba(147, 1, 255, 0.15);
    border-radius: 3px;
    padding: 0 2px;
    font-weight: 600;
}

/* -------------------------------------------------- */
/* カテゴリ目次 */

.custom-faq-toc {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.custom-faq-toc-link {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: rgba(147, 1, 255, 0.06);
    border: 1px solid rgba(147, 1, 255, 0.25);
    border-radius: 9999px;
    font-size: 0.75rem;
    color: var(--custom-purple);
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}

.custom-faq-toc-link:hover,
.custom-faq-toc-link:focus-visible {
    background: rgba(147, 1, 255, 0.12);
    outline: none;
}

.custom-faq-toc-link:active {
    transform: scale(0.97);
}

/* -------------------------------------------------- */

.custom-faq-accordion {
    margin: 0 auto;
    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
}

.custom-faq-accordion-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* -------------------------------------------------- */
/* カテゴリ */

.custom-faq-category {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    scroll-margin-top: 5rem;
}

.custom-faq-category-title {
    font-size: 1rem;
    color: var(--custom-black);
    margin: 0;
    padding: 0.5rem 0 0.625rem;
    border-bottom: 2px solid var(--custom-purple);
    letter-spacing: 0.02em;
    scroll-margin-top: 5rem;
}

/* -------------------------------------------------- */
/* アイテム */

.custom-faq-accordion-item {
    display: flex;
    flex-direction: column;
    scroll-margin-top: 5rem;
}

/* -------------------------------------------------- */
/* 質問（吹き出しボタン） */

.custom-faq-question {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    padding: 0.875rem 1rem;
    background: rgba(147, 1, 255, 0.06);
    border: 1.5px solid rgba(147, 1, 255, 0.25);
    border-radius: 16px;
    transition: background 0.2s ease, transform 0.15s ease;
    user-select: none;
}

.custom-faq-question:active {
    transform: scale(0.99);
}

/* 吹き出し三角（質問が開いているとき表示） */
.custom-faq-question::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 22px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(147, 1, 255, 0.25);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.custom-faq-question.active::after {
    opacity: 1;
}

.custom-faq-q-label {
    color: var(--custom-purple);
    font-size: 1rem;
    min-width: 2.25rem;
    line-height: 1;
    flex-shrink: 0;
}

.custom-faq-question-title {
    flex: 1;
    font-size: 0.875rem;
    color: var(--custom-text-color);
    line-height: 1.5;
}

/* ▼ トグルアイコン */
.custom-faq-toggle {
    color: var(--custom-purple);
    font-size: 0.75rem;
    min-width: 1rem;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-block;
}

.custom-faq-question.active .custom-faq-toggle {
    transform: rotate(180deg);
}

/* -------------------------------------------------- */
/* 回答 */

.custom-faq-answer {
    display: none;
    margin-top: 0.5rem;
    padding: 1rem;
    background: var(--custom-white);
    border: 1.5px solid rgba(147, 1, 255, 0.15);
    border-radius: 12px;
    font-size: 0.875rem;
    color: var(--custom-text-color);
    line-height: 1.7;
    font-weight: 400;
}

.custom-faq-a-label {
    color: var(--custom-gray-mid);
    font-size: 1rem;
    margin-right: 0.5rem;
}

/* 回答内の内部リンク（<a href="#qNN">） */
.custom-faq-answer a {
    color: var(--custom-purple);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}

.custom-faq-answer.show {
    display: block;
}
