/* Container */
.efn-container {
    margin: 20px auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.efn-questions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.efn-q-item {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Question Button */
.efn-q-btn {
    align-self: flex-end;
    border: none;
    padding: 16px 14px 16px 24px;
    border-radius: 25px;
    border-top-right-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    max-width: calc(100% - 60px);
    min-width: 180px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    position: relative;
    text-align: left;
    z-index: 2;
}

.efn-btn-text {
    line-height: 1.5;
    flex: 1;
}

.efn-plus-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}
.efn-plus-icon::before,
.efn-plus-icon::after {
    content: '';
    position: absolute;
    transition: all 0.3s ease;
}
.efn-plus-icon::before {
    width: 2px;
    height: 14px;
}
.efn-plus-icon::after {
    width: 14px;
    height: 2px;
}

.efn-q-btn.efn-active .efn-plus-icon::before {
    transform: rotate(90deg);
    opacity: 0;
}
.efn-q-btn.efn-active .efn-plus-icon {
    transform: rotate(180deg);
}

/* Answer Area */
.efn-answer-drop-area {
    width: 100%;
    margin-top: 30px; /* 15pxから30pxに広げて余裕を持たせた */
    margin-bottom: 60px; /* セット間の余白 */
}

.efn-a-wrapper {
    display: flex;
    align-items: flex-start;
    animation: efn-fade-in 0.4s ease forwards;
    max-width: 100%;
}

.efn-a-icon-placeholder,
.efn-a-icon-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
    object-fit: cover;
}
.efn-a-icon-placeholder {
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
}
.efn-a-icon-placeholder .dashicons {
    font-size: 26px;
    color: #999;
}

/* Answer Bubble */
.efn-a-bubble {
    position: relative;
    padding: 18px 24px;
    border-radius: 25px;
    border-top-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    max-width: calc(100% - 60px);
    word-wrap: break-word;
}
.efn-a-bubble p {
    margin: 0 !important;
    line-height: 1.6;
}

.efn-a-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -12px;
    border: 12px solid transparent;
    border-right: 14px solid #f6f2ec; /* デフォルト背景。設定により上書き */
    border-top: 0;
}

@keyframes efn-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.efn-typing {
    display: flex;
    gap: 5px;
    padding: 8px 0;
}
.efn-typing span {
    width: 7px;
    height: 7px;
    background-color: #ccc;
    border-radius: 50%;
    animation: efn-bounce 1s infinite;
}
.efn-typing span:nth-child(2) {
    animation-delay: 0.2s;
}
.efn-typing span:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes efn-bounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}
