/* =============================================
   설문조사 - 단일 페이지 레이아웃
   ============================================= */
/* ========== 설문 섹션 ========== */
.survey-section {
    background: var(--light-gray);
    padding: 48px 24px;
    min-height: 100vh;
}

.survey-container {
    margin: 0 auto;
    padding:32px;
}

/* ========== 헤더 ========== */
.survey-header {
    margin-bottom: 48px;
}

.survey-title {
    font-family: 'Gmarket Sans', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-black);
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.survey-subtitle {
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
    color: var(--dark-gray);
    margin: 0;
}

/* ========== 질문 컨테이너 ========== */
#surveyQuestionsContainer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 6rem;
}

/* ========== 질문 카드 ========== */
.survey-question-card {
    background: var(--white);
    border-radius: 12px;
    padding: 32px;
    border: 1px solid var(--medium-gray);
    transition: border-color 0.2s ease;
}

.survey-question-card:hover {
    border-color: var(--dark-gray);
}

.survey-question-number {
    font-family: 'Pretendard', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.survey-question-title {
    font-family: 'Pretendard', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-black);
    margin: 0 0 24px 0;
    line-height: 1.4;
}

.survey-question-required {
    color: var(--error);
    margin-left: 2px;
}

.survey-question-body {
    /* 기본 body */
}

/* ========== 옵션 그리드 ========== */
.survey-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.survey-options-grid.grid-1 {
    grid-template-columns: 1fr;
}

.survey-options-grid.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.survey-options-grid.grid-3 {
    grid-template-columns: repeat(2, 1fr);
}

.survey-options-grid.grid-4 {
    grid-template-columns: repeat(2, 1fr);
}

.survey-options-grid.grid-5 {
    grid-template-columns: repeat(2, 1fr);
}

.survey-options-grid.grid-6 {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 480px) {
    .survey-options-grid.grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .survey-options-grid.grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .survey-options-grid.grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .survey-options-grid.grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== 옵션 버튼 ========== */
.survey-option-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 16px;
    background: var(--white);
    border: 2px solid var(--medium-gray);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 64px;
    font-family: 'Pretendard', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-black);
}

.survey-option-btn:hover {
    border-color: var(--primary-blue);
    background: rgba(0, 71, 171, 0.04);
}

.survey-option-btn.selected {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
    font-weight: 600;
}

.survey-option-text {
    line-height: 1.4;
    word-break: keep-all;
}

/* ========== 텍스트 입력 ========== */
.survey-text-input {
    width: 100%;
    padding: 14px 16px;
    font-family: 'Pretendard', sans-serif;
    font-size: 16px;
    border: 2px solid var(--medium-gray);
    border-radius: 10px;
    background: var(--white);
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.survey-text-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: var(--white);
}

.survey-text-input::placeholder {
    color: var(--text-muted);
}

.survey-text-input.textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.survey-input-hint {
    font-family: 'Pretendard', sans-serif;
    font-size: 13px;
    color: var(--dark-gray);
    margin-top: 10px;
}

.survey-input-label {
    display: block;
    font-family: 'Pretendard', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--dark-gray);
    margin-bottom: 8px;
}

/* ========== 기타 입력란 ========== */
.survey-text-input-wrap {
    margin-top: 12px;
    display: none;
}

.survey-text-input-wrap.show {
    display: block;
    animation: surveyFadeIn 0.2s ease;
}

@keyframes surveyFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 주소 검색 ========== */
.survey-address-wrap {
    display: flex;
    gap: 10px;
}

.survey-address-wrap .survey-text-input {
    flex: 1;
}

.survey-address-btn {
    padding: 14px 20px;
    background: var(--primary-blue);
    border: none;
    border-radius: 10px;
    font-family: 'Pretendard', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.survey-address-btn:hover {
    background: var(--primary-blue-dark);
}

.survey-address-detail {
    margin-top: 10px;
}

/* ========== 파일 업로드 ========== */
.survey-file-upload {
    border: 2px dashed var(--medium-gray);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--light-gray);
}

.survey-file-upload:hover {
    border-color: var(--primary-blue);
    background: rgba(0, 71, 171, 0.03);
}

.survey-file-upload.dragover {
    border-color: var(--primary-blue);
    background: rgba(0, 71, 171, 0.06);
}

.survey-file-text {
    font-family: 'Pretendard', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-black);
    margin-bottom: 8px;
}

.survey-file-hint {
    font-family: 'Pretendard', sans-serif;
    font-size: 13px;
    color: var(--dark-gray);
    margin-bottom: 4px;
}

.survey-file-formats {
    font-family: 'Pretendard', sans-serif;
    font-size: 12px;
    color: var(--primary-blue);
    font-weight: 500;
}

.survey-file-input {
    display: none;
}

/* ========== 파일 미리보기 ========== */
.survey-file-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

@media (min-width: 480px) {
    .survey-file-preview {
        grid-template-columns: repeat(4, 1fr);
    }
}

.survey-file-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--light-gray);
    border: 2px solid var(--medium-gray);
}

.survey-file-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.survey-file-icon-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 8px;
    background: var(--light-gray);
}

.survey-file-icon-preview .file-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.survey-file-icon-preview .file-name {
    font-family: 'Pretendard', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-black);
    text-align: center;
    word-break: break-all;
    line-height: 1.3;
}

.survey-file-icon-preview .file-size {
    font-family: 'Pretendard', sans-serif;
    font-size: 9px;
    color: var(--dark-gray);
    margin-top: 2px;
}

.survey-file-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.survey-file-remove:hover {
    background: var(--error);
}

/* ========== 제출 버튼 ========== */
.survey-submit-btn {
    width: 100%;
    padding: 16px 24px;
    margin-top: 24px;
    font-family: 'Pretendard', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    background: var(--primary-blue);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.survey-submit-btn:hover {
    background: var(--primary-blue-dark);
}

.survey-submit-btn:active {
    background: var(--primary-blue-dark);
}

/* ========== 하단 안내 ========== */
.survey-footer-note {
    text-align: center;
    margin-top: 24px;
    font-family: 'Pretendard', sans-serif;
    font-size: 13px;
    color: var(--dark-gray);
}

/* ========== 약관 모달 ========== */
.survey-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.survey-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.survey-modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    background: var(--white);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    animation: surveyModalUp 0.2s ease;
}

@keyframes surveyModalUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.survey-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--medium-gray);
}

.survey-modal-title {
    font-family: 'Pretendard', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-black);
    margin: 0;
}

.survey-modal-close {
    width: 32px;
    height: 32px;
    background: var(--light-gray);
    border: none;
    border-radius: 6px;
    font-size: 20px;
    color: var(--dark-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.survey-modal-close:hover {
    background: var(--error);
    color: var(--white);
}

.survey-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.survey-terms h4 {
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-black);
    margin: 0 0 8px 0;
}

.survey-terms h4:not(:first-child) {
    margin-top: 20px;
}

.survey-terms p {
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
    color: var(--dark-gray);
    line-height: 1.6;
    margin: 0;
}

.survey-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--medium-gray);
}

.survey-btn-primary {
    width: 100%;
    padding: 14px 24px;
    font-family: 'Pretendard', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    background: var(--primary-blue);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.survey-btn-primary:hover {
    background: var(--primary-blue-dark);
}

/* ========== 반응형 ========== */
@media (max-width: 480px) {
    .survey-section {
        padding: 32px 16px;
    }
    
    .survey-title {
        font-size: 24px;
    }
    
    .survey-question-card {
        padding: 24px 20px;
    }
    
    .survey-options-grid {
        grid-template-columns: 1fr;
    }
    
    .survey-options-grid.grid-2,
    .survey-options-grid.grid-3,
    .survey-options-grid.grid-4,
    .survey-options-grid.grid-5,
    .survey-options-grid.grid-6 {
        grid-template-columns: 1fr;
    }
    
    .survey-address-wrap {
        flex-direction: column;
    }
    
    .survey-address-btn {
        width: 100%;
    }
}
