/* --------------------------------------------------------------------------
 * 설문 — 만들기의 문항 상자(번호 · 질문 · 종류 | 보기 | 필수 · 이동 · 삭제),
 * 보기의 표식은 하나 고르기면 동그라미, 여러 개면 네모. 응답 · 결과는 문항마다 카드 하나.
 * -------------------------------------------------------------------------- */
.survey-questions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.survey-question {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--ln);
    border-radius: 0.5rem;
    background: var(--sf-card);
}
.survey-question-head {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}
.survey-question-no {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-top: 0.3rem;
    border-radius: 50%;
    background: var(--sf-raised);
    color: var(--tx-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.survey-question-type {
    width: 9.5rem;
    flex-shrink: 0;
}
.survey-options {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding-left: 2.375rem;
}
.survey-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 30rem;
}
.survey-option-mark {
    flex-shrink: 0;
    width: 0.875rem;
    height: 0.875rem;
    border: 1.5px solid var(--tx-muted);
    border-radius: 50%;
}
.survey-question[data-type="multiple"] .survey-option-mark {
    border-radius: 3px;
}
.survey-option-add {
    align-self: flex-start;
}
.survey-question-foot {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 2.375rem;
}
.survey-question-preview {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin: 0;
    padding-left: 1.25rem;
}
@media (max-width: 575.98px) {
    .survey-question-head {
        flex-wrap: wrap;
    }
    .survey-question-type {
        width: 100%;
    }
    .survey-options,
    .survey-question-foot {
        padding-left: 0;
    }
}

.survey-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.875rem;
    color: var(--tx-muted);
    font-size: 0.8125rem;
}
.survey-answer-title {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
    font-weight: 600;
}
.survey-answer-title > span:not(.survey-question-no) {
    padding-top: 0.3rem;
}
.survey-choices {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.survey-choice {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--ln);
    border-radius: 0.5rem;
    cursor: pointer;
}
.survey-choice .form-check-input {
    margin-top: 0;
}
.survey-choice:hover {
    border-color: var(--brand-accent);
}
.survey-choice:has(:checked) {
    border-color: var(--brand-accent);
    background: var(--theme-primary-bg-subtle);
}
.survey-bars .bar-list-row {
    grid-template-columns: minmax(6rem, 14rem) minmax(0, 1fr) auto;
}
.survey-bars .bar-list-value {
    min-width: 6.5rem;
}
/* 휴대폰: 보기 이름이 칸을 다 차지해 막대 폭이 0 이 됐다 — 이름은 한 줄 위에, 그 아래 막대 | 명 · %. */
@media (max-width: 575.98px) {
    .survey-bars .bar-list-row {
        grid-template-columns: minmax(0, 1fr) auto;
        row-gap: 0.25rem;
    }
    .survey-bars .bar-list-label {
        grid-column: 1 / -1;
        white-space: normal;
    }
}
.survey-texts {
    display: flex;
    flex-direction: column;
    max-height: 24rem;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}
.survey-texts > li {
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--ln);
}
.survey-texts > li:last-child {
    border-bottom: 0;
}
.survey-progress {
    height: 0.5rem;
}
/* 설문 정보 아래 참여 현황 한 줄 — "참여 12 / 30명 · 40%" · 막대(남은 폭) · [미참여 n명 ▾]. 명단은 버튼으로 펼친다. */
.survey-participation {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 0.875rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--ln-soft);
}
.survey-participation-label {
    color: var(--tx-muted);
    font-size: 0.8125rem;
}
.survey-participation-count {
    color: var(--tx-muted);
    font-size: 0.875rem;
    white-space: nowrap;
}
.survey-participation-count strong {
    color: var(--tx-strong);
    font-size: 1rem;
}
.survey-participation .survey-progress {
    min-width: 6rem;
}
.survey-non-respondents {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding-top: 0.625rem;
}

/* 설문 만들기 — 오른쪽 설정 칸. 선택 막대는 칸 폭을 채우고, 넓은 화면에서는 문항을 내려도 따라온다. */
.survey-settings {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.survey-settings .board-segment {
    width: 100%;
}
.survey-audience-pick {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
@media (min-width: 1200px) {
    .survey-form-side {
        position: sticky;
        top: calc(var(--theme-topbar-height) + 1.5rem);
    }
}

