/**
 * FAQアイテム - data-open方式アコーディオン
 */

 .tok-faq-item {
    padding: 20px;
    background: #f6f6f6;
}

.tok-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.2rem;
    user-select: none;
}

.tok-faq-question-text {
    position: relative;
    display: flex;
    gap: 10px;
    flex: 1;
    font-size: 18px;
    font-weight: 400;
}
.tok-faq-question-text::before {
    content: "Q.";
}
.tok-faq-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s 
ease;
    flex-shrink: 0;
    margin-left: 10px;
    font-size: 24px;
    color: #999;
}

/* 開いた時：アイコン回転 */
[data-open="open"] .tok-faq-icon {
    transform: rotate(180deg);
}

/* 回答エリア */
.tok-faq-answer {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding-top 0.3s ease, margin-top 0.3s ease;
}

/* 閉じている時 */
[data-open="closed"] .tok-faq-answer {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    margin-top: 0;
}

/* 開いている時 */
[data-open="open"] .tok-faq-answer {
    max-height: 500px; /* 十分大きな値 */
    opacity: 1;
    padding-top: 10px;
    margin-top: 10px;
}

.tok-faq-answer > div {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}

/* エディタ内では常に表示 */
.editor-styles-wrapper .tok-faq-item {
    outline: 1px dashed #e0e0e0;
    margin-bottom: 10px;
}

.editor-styles-wrapper .tok-faq-answer {
    max-height: none !important;
    opacity: 1 !important;
    margin-top: 15px !important;
    padding-top: 15px !important;
}

@media (max-width: 768px) {
    .tok-faq-question-text {
        font-size: .95rem;
    }
}
