/**
 * 설문 응답 페이지 스타일
 *
 * 모바일 우선 설계 (Mobile First)
 * - Step-by-Step 모드: 질문 하나씩 표시
 * - Scroll 모드: 전체 질문 스크롤
 *
 * @author  zRooKie
 * @since   2025.12.31
 */

/* ============================================================
   CSS Variables
   ============================================================ */
:root {
    --survey-primary: #000000;
    --survey-primary-hover: #333333;
    --survey-bg: #f8f9fa;
    --survey-card-bg: #ffffff;
    --survey-border: #e5e7eb;
    --survey-text: #1f2937;
    --survey-text-muted: #6b7280;
    --survey-error: #ef4444;
    --survey-success: #10b981;
    --survey-radius: 12px;
    --survey-radius-sm: 8px;
    --survey-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --survey-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --survey-max-width: 1000px;
}

/* ============================================================
   Base Reset
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

body.survey-page {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--survey-text);
    background-color: var(--survey-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   Survey Container
   ============================================================ */
.survey-container {
    width: 100%;
    max-width: var(--survey-max-width);
    margin: 0 auto;
    padding: 0.5rem;
    min-height: 100vh;
}

/* ============================================================
   Survey Top Header Bar (상단 고정 헤더)
   ============================================================ */
.survey-top-header {
    background: transparent;
    padding: 0.75rem 1rem;
    /*margin-bottom: 1rem;*/
}

.survey-top-header-inner {
    max-width: var(--survey-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.survey-top-logo {
    height: 55px;
    width: auto;
}

/* ============================================================
   Header Preview Label (미리보기용)
   ============================================================ */
.header-preview-label {
    background: linear-gradient(135deg, var(--survey-primary) 0%, #6b7280 100%);
    padding: 0.35rem;
    margin: 0;
}

/* ============================================================
   Survey Hero Styles
   ============================================================ */
.survey-hero {
    position: relative;
    background: var(--survey-card-bg);
    border-radius: var(--survey-radius);
    padding: 2.5rem 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--survey-shadow);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--survey-primary) 0%, #6b7280 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-icon svg {
    width: 32px;
    height: 32px;
    color: #fff;
}

/* 스타일 1: 웨이브 패턴 */
.survey-hero-wave {
    padding-top: 4rem;
}

.survey-hero-wave .wave-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
}

/* 스타일 2: 그라데이션 블롭 */
.survey-hero-blob {
    background: linear-gradient(180deg, rgba(var(--survey-primary-rgb, 0, 0, 0), 0.03) 0%, var(--survey-card-bg) 100%);
}

.survey-hero-blob .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.15;
}

.survey-hero-blob .blob-1 {
    width: 200px;
    height: 200px;
    background: var(--survey-primary);
    top: -80px;
    left: -60px;
}

.survey-hero-blob .blob-2 {
    width: 150px;
    height: 150px;
    background: var(--survey-primary);
    top: -40px;
    right: -40px;
    opacity: 0.1;
}

.survey-hero-blob .blob-3 {
    width: 100px;
    height: 100px;
    background: var(--survey-primary);
    bottom: 20px;
    right: 20%;
    opacity: 0.08;
}

/* ============================================================
   Preview Notice (미리보기 알림)
   ============================================================ */
.preview-notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: var(--survey-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    color: #92400e;
    font-size: 0.9rem;
    font-weight: 500;
}

.preview-notice svg {
    flex-shrink: 0;
    color: #f59e0b;
}

/* ============================================================
   Survey Info Card (설문 제목/설명 카드)
   ============================================================ */
.survey-info-card {
    background: var(--survey-card-bg);
    border-radius: var(--survey-radius);
    padding: 2rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--survey-shadow);
    text-align: center;
}

/* ============================================================
   Survey Header
   ============================================================ */
.survey-header {
    background: var(--survey-card-bg);
    border-radius: var(--survey-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--survey-shadow);
}

/* ============================================================
   Survey Logo (레거시 호환)
   ============================================================ */
.survey-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.survey-logo img {
    max-height: 40px;
    width: auto;
}

/* ============================================================
   Header Styles Preview (미리보기용)
   ============================================================ */
.survey-header-style {
    margin-bottom: 1.5rem;
    border-radius: var(--survey-radius);
    overflow: hidden;
    background: var(--survey-card-bg);
    box-shadow: var(--survey-shadow);
}

.header-style-label {
    padding: 0.5rem 1rem;
    background: var(--survey-text);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 스타일 1: 그라데이션 배너 */
.gradient-banner {
    height: 120px;
    background: linear-gradient(135deg, var(--survey-primary) 0%, #333 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.gradient-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
}

.gradient-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.gradient-icon svg {
    width: 28px;
    height: 28px;
    stroke: white;
}

/* 스타일 2: 회사 로고 헤더 */
.logo-banner {
    padding: 2rem 1.5rem;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    text-align: center;
    border-bottom: 3px solid var(--survey-primary);
}

.logo-banner img {
    max-height: 48px;
    width: auto;
}

/* 스타일 3: 일러스트 배너 */
.illustration-banner {
    height: 120px;
    position: relative;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.illustration-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.illustration-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: var(--survey-card-bg);
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.illustration-content svg {
    width: 24px;
    height: 24px;
    stroke: var(--survey-primary);
}

.illustration-content span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--survey-text);
}

/* 스타일 4: 미니멀 라인 */
.header-style-minimal {
    background: transparent;
    box-shadow: none;
}

.minimal-line {
    height: 4px;
    background: linear-gradient(90deg, var(--survey-primary) 0%, transparent 100%);
    border-radius: 2px;
}

.survey-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.25rem 0;
    color: var(--survey-text);
    text-align: center;
}

.survey-description,
.question-content {
    margin: 0.5rem 0 0 0;
    /* 에디터 컨테이너와 동일한 line-height 적용 (인라인 스타일 우선) */
    line-height: 1;
    /* admin.css(view.php)와 동일한 시스템 폰트 사용 */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    /* 부모(.hero-content)의 text-align: center 상속 방지 - 에디터 인라인 스타일이 우선 적용됨 */
    text-align: left;
}

/* 모든 자식 요소: 폰트/line-height 상속 + 마진/패딩 리셋 (admin.css 전역 리셋과 동일) */
.survey-description *,
.question-content * {
    margin: 0;
    padding: 0;
    font-family: inherit;
    line-height: inherit;
}

.survey-description img,
.question-content img {
    max-width: 100%;
    height: auto;
}

/* 에디터 콘텐츠 서식 스타일 */
.survey-description b,
.survey-description strong,
.question-content b,
.question-content strong {
    font-weight: bold !important;
}

.survey-description i,
.survey-description em,
.question-content i,
.question-content em {
    font-style: italic !important;
}

.survey-description u,
.question-content u {
    text-decoration: underline !important;
}

/* 레거시 <font size> 태그 정규화 */
.survey-description font[size="1"],
.question-content font[size="1"] {
    font-size: 10px !important;
}

.survey-description font[size="2"],
.question-content font[size="2"] {
    font-size: 12px !important;
}

.survey-description font[size="3"],
.question-content font[size="3"] {
    font-size: 14px !important;
}

.survey-description font[size="4"],
.question-content font[size="4"] {
    font-size: 16px !important;
}

.survey-description font[size="5"],
.question-content font[size="5"] {
    font-size: 18px !important;
}

.survey-description font[size="6"],
.question-content font[size="6"] {
    font-size: 24px !important;
}

.survey-description font[size="7"],
.question-content font[size="7"] {
    font-size: 32px !important;
}

/* Progress Bar */
.survey-progress {
    margin-top: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--survey-border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--survey-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--survey-text-muted);
}

/* ============================================================
   Submit Error Alert
   ============================================================ */
.submit-error-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--survey-radius);
    color: #dc2626;
    font-size: 0.938rem;
    font-weight: 500;
    animation: shake 0.5s ease-in-out;
}

.submit-error-alert svg {
    flex-shrink: 0;
    color: #dc2626;
}

.submit-error-alert span {
    flex: 1;
}

.submit-error-alert .error-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: #dc2626;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    font-size: 0.813rem;
    font-weight: 500;
    transition: background 0.2s;
    flex-shrink: 0;
}

.submit-error-alert .error-refresh-btn:hover {
    background: #b91c1c;
}

.submit-error-alert .error-refresh-btn svg {
    color: white;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* ============================================================
   Survey Intro (한 문항씩 모드 첫 화면)
   ============================================================ */
.survey-intro {
    padding-bottom: 140px;
}

.survey-intro .survey-header {
    margin-bottom: 2rem;
}

/* 인트로 하단 고정 네비게이션 */
.survey-intro-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: var(--survey-card-bg);
    border-top: 1px solid var(--survey-border);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    z-index: 100;
    max-width: var(--survey-max-width);
    margin: 0 auto;
}

.survey-intro-nav .view-mode-toggle {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.btn-start-survey {
    display: block;
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background: var(--survey-primary);
    border: none;
    border-radius: var(--survey-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* 전체보기 모드 전용 헤더 */
.scroll-mode-only {
    display: none;
}

/* ============================================================
   View Mode Toggle
   ============================================================ */
.view-mode-toggle {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* 질문 화면용 토글 - 오른쪽 정렬 */
.view-mode-toggle.question-mode-toggle {
    justify-content: flex-end;
    margin-top: 1rem;
    margin-right: 1rem;
    padding-top: 0.5rem;
}

/* 상단 프로그래스 바 (한 문항씩 모드) */
.top-progress {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

.top-progress .progress-bar {
    height: 6px;
    background: var(--survey-border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.top-progress .progress-fill {
    height: 100%;
    background: var(--survey-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.top-progress .progress-text {
    font-size: 0.85rem;
    color: var(--survey-text-muted);
    text-align: center;
}

.view-mode-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--survey-text-muted);
    background: var(--survey-card-bg);
    border: 1px solid var(--survey-border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-mode-btn.active {
    color: #fff;
    background: var(--survey-primary);
    border-color: var(--survey-primary);
}

.view-mode-btn:hover:not(.active) {
    background: var(--survey-bg);
}

/* ============================================================
   Question Card
   ============================================================ */
.question-card {
    background: var(--survey-card-bg);
    border-radius: var(--survey-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--survey-shadow);
}

.question-card.error {
    border: 2px solid var(--survey-error);
    animation: errorShake 0.5s ease-in-out, errorPulse 0.5s ease-in-out !important;
}

@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-8px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(8px);
    }
}

@keyframes errorPulse {
    0% {
        background-color: rgba(239, 68, 68, 0.1);
    }
    50% {
        background-color: rgba(239, 68, 68, 0.15);
    }
    100% {
        background-color: #fff;
    }
}

/* Question Header - 모바일: 세로 배치, PC: 가로 배치 */
.question-header {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* 답변 완료 체크 아이콘 */
.question-check-icon {
    display: none;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-left: auto;
    color: var(--survey-success, #22c55e);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.question-check-icon svg {
    width: 100%;
    height: 100%;
}

.question-card.answered .question-check-icon {
    display: block;
    opacity: 1;
    transform: scale(1);
    animation: checkPop 0.4s ease;
}

@keyframes checkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.question-number {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: var(--survey-primary);
    border-radius: 50%;
}

.question-title-wrap {
    flex: 1;
    padding-top: 0.2rem;
}

.question-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--survey-text);
    line-height: 1;
    /* admin.css(view.php)와 동일한 시스템 폰트 사용 */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 질문 제목 내부 요소: 폰트/line-height 상속 + 마진/패딩 리셋 + 인라인 표시 */
.question-label * {
    margin: 0;
    padding: 0;
    font-family: inherit;
    line-height: inherit;
    display: inline;
}

.question-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--survey-text);
}

.required {
    color: var(--survey-error);
    margin-left: 0.25rem;
    font-weight: 600;
}

.question-description {
    font-size: 0.9rem;
    color: var(--survey-text-muted);
    margin-bottom: 1rem;
}

.question-error {
    font-size: 0.85rem;
    color: var(--survey-error);
    margin-top: 0.5rem;
    display: none;
}

.question-card.error .question-error {
    display: block;
}

/* ============================================================
   Answer Types
   ============================================================ */

/* Radio & Checkbox Options */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    min-height: 44px;
    background: var(--survey-bg);
    border: 2px solid transparent;
    border-radius: var(--survey-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-item:hover {
    background: #f0f1f3;
}

.option-item.selected {
    background: #f0f7ff;
    border-color: var(--survey-primary);
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
    display: none;
}

.option-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--survey-border);
    border-radius: 50%;
    margin-right: 0.75rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.option-item input[type="checkbox"] + .option-check {
    border-radius: 4px;
}

.option-item.selected .option-check {
    border-color: var(--survey-primary);
    background: var(--survey-primary);
}

.option-check svg {
    width: 14px;
    height: 14px;
    stroke: #fff;
    stroke-width: 3;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.option-item.selected .option-check svg {
    opacity: 1;
}

.option-label {
    font-size: 1rem;
    color: var(--survey-text);
}

/* Text Input */
.text-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: var(--survey-text);
    background: var(--survey-bg);
    border: 2px solid transparent;
    border-radius: var(--survey-radius-sm);
    outline: none;
    transition: all 0.2s ease;
}

.text-input:focus {
    background: #fff;
    border-color: var(--survey-primary);
}

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

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

/* Slider */
.slider-container {
    padding: 1rem 0;
}

.slider-input {
    width: 100%;
    height: 8px;
    background: var(--survey-border);
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--survey-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.slider-input::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--survey-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--survey-text-muted);
}

.slider-value {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--survey-primary);
    margin-bottom: 1rem;
}

/* File Upload */
.file-upload {
    display: block;
    width: 100%;
    border: 2px dashed var(--survey-border);
    border-radius: var(--survey-radius-sm);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-upload:hover {
    border-color: var(--survey-primary);
    background: var(--survey-bg);
}

.file-upload.has-file {
    border-style: solid;
    border-color: var(--survey-success);
    background: #f0fdf4;
}

.file-upload-icon {
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: var(--survey-text-muted);
}

.file-upload-icon svg {
    width: 100%;
    height: 100%;
}

.file-upload-text {
    display: block;
    font-size: 0.95rem;
    color: var(--survey-text-muted);
}

.file-name {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--survey-text);
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
    line-height: 1.4;
}

.file-upload-text strong {
    color: var(--survey-primary);
}

.file-upload input[type="file"],
.file-upload .file-input {
    display: none;
}

/* 드래그 오버 상태 */
.file-upload.drag-over {
    border-color: var(--survey-primary);
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.02);
}

/* 업로드 중 상태 */
.file-upload.uploading {
    pointer-events: none;
    opacity: 0.7;
}

.file-upload-progress {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--survey-primary);
}

/* 파일 업로드 래퍼 */
.file-upload-wrapper {
    position: relative;
}

/* 파일 액션 영역 (삭제 버튼 + 썸네일) */
.file-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-top: 0.75rem;
    gap: 1rem;
}

/* 파일 삭제 버튼 (위험색상 강조) */
.file-remove-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--survey-error);
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--survey-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-remove-btn:hover {
    background: var(--survey-error);
    color: white;
    border-color: var(--survey-error);
}

.file-upload-hint {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--survey-text-muted);
    line-height: 1.4;
}

/* 파일 미리보기 (이미지 썸네일) */
.file-preview-image {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--survey-border);
    background: #fff;
}

/* Privacy Consent */
.privacy-content {
    background: var(--survey-bg);
    border-radius: var(--survey-radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
    max-height: auto;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1;
    /* admin.css(view.php)와 동일한 시스템 폰트 사용 */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 개인정보 동의 내부 요소: 폰트/line-height 상속 + 마진/패딩 리셋 */
.privacy-content * {
    margin: 0;
    padding: 0;
    font-family: inherit;
    line-height: inherit;
}

/* Rating Stars (0.5 단위) */
.rating-container {
    padding: 0.5rem 0;
}

.rating-stars {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
}

.rating-star {
    position: relative;
    cursor: pointer;
    width: 44px;
    height: 44px;
}

.rating-star svg {
    width: 44px;
    height: 44px;
    fill: transparent;
    stroke: var(--survey-border);
    transition: all 0.2s ease;
}

/* 반쪽 클릭 영역 */
.star-half {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    z-index: 1;
}

.star-half.star-left {
    left: 0;
}

.star-half.star-right {
    right: 0;
}

/* 활성화된 별 */
.rating-star.full svg {
    fill: #fbbf24;
    stroke: #f59e0b;
}

/* 반쪽 별 */
.rating-star.half svg polygon {
    fill: url(#halfStarGradient);
    stroke: #f59e0b;
}

/* 호버 상태 */
.rating-star.hovered svg {
    fill: #fde68a;
    stroke: #fbbf24;
}

.rating-star.hovered-half svg polygon {
    fill: url(#halfStarGradientHover);
    stroke: #fbbf24;
}

.rating-value {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--survey-text-muted);
    min-height: 1.4em;
    transition: all 0.15s ease;
}

.rating-value.hover-preview {
    color: #f59e0b;
    font-weight: 500;
}

/* Input Validation */
.text-input.valid {
    border-color: var(--survey-success);
    background: #f0fdf4;
}

.text-input.invalid {
    border-color: var(--survey-error);
    background: #fef2f2;
}

.input-hint {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    color: var(--survey-text-muted);
}

.input-hint.error {
    color: var(--survey-error);
}

.input-hint.success {
    color: var(--survey-success);
}

/* ============================================================
   Navigation Buttons
   ============================================================ */
.survey-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: var(--survey-card-bg);
    border-top: 1px solid var(--survey-border);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    z-index: 100;
    max-width: var(--survey-max-width);
    margin: 0 auto;
}

/* 하단 진행률 */
.nav-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-progress .progress-bar {
    flex: 1;
    height: 6px;
    background: var(--survey-border);
    border-radius: 3px;
    overflow: hidden;
}

.nav-progress .progress-fill {
    height: 100%;
    background: var(--survey-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.nav-progress .progress-text {
    flex-shrink: 0;
    font-size: 0.85rem;
    color: var(--survey-text-muted);
    white-space: nowrap;
}

/* 버튼 그룹 */
.nav-buttons {
    display: flex;
    gap: 0.75rem;
}

.nav-btn {
    flex: 1;
    padding: 1rem;
    min-height: 48px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--survey-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn-prev {
    background: var(--survey-bg);
    color: var(--survey-text);
    border: 1px solid var(--survey-border);
}

.nav-btn-prev:hover {
    background: var(--survey-border);
}

.nav-btn-next {
    background: var(--survey-primary);
    color: #fff;
}

.nav-btn-next:hover {
    background: var(--survey-primary-hover);
}

.nav-btn-submit {
    background: linear-gradient(135deg, var(--survey-primary) 0%, var(--survey-primary-hover) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    font-size: 1.05rem;
}

.nav-btn-submit:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   Step Mode Specific
   ============================================================ */
.survey-form.step-mode .question-card {
    display: none;
}

.survey-form.step-mode .question-card.active {
    display: block;
}

/* Add padding for fixed nav */
.survey-form {
    padding-bottom: 140px;
}

/* ============================================================
   Completion Page
   ============================================================ */
.survey-complete {
    text-align: center;
    padding: 3rem 1.5rem;
}

.complete-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--survey-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.complete-icon svg {
    width: 40px;
    height: 40px;
    stroke: #fff;
    stroke-width: 3;
}

.complete-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.complete-message {
    font-size: 1rem;
    color: var(--survey-text-muted);
    margin: 0;
}

/* 명찰 QR 코드 섹션 */
.nametag-qr-section {
    margin-top: 2rem;
    padding-top: 2rem;
}

.qr-divider {
    width: 60px;
    height: 1px;
    background: var(--survey-border);
    margin: 0 auto 1.5rem;
}

.qr-guide {
    font-size: 0.875rem;
    color: var(--survey-text-muted);
    margin: 0 0 1.5rem 0;
}

.qr-code-wrapper {
    display: inline-block;
    padding: 1rem;
    background: #fff;
    border-radius: var(--survey-radius);
    box-shadow: var(--survey-shadow);
    margin-bottom: 1rem;
}

.qr-code-image {
    display: block;
    width: 180px;
    height: 180px;
}

.nametag-fields {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.nametag-field {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: var(--survey-bg);
    border-radius: 999px;
    font-size: 0.875rem;
    color: var(--survey-text);
}

.qr-detail-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--survey-primary);
    text-decoration: none;
    border: 1px solid var(--survey-border);
    border-radius: var(--survey-radius-sm);
    transition: all 0.2s ease;
}

.qr-detail-link:hover {
    background: var(--survey-bg);
    border-color: var(--survey-primary);
}

/* ============================================================
   Error States
   ============================================================ */
.survey-closed,
.survey-not-found {
    text-align: center;
    padding: 3rem 1.5rem;
}

.survey-closed .error-icon,
.survey-not-found .error-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--survey-error);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.survey-closed .error-icon svg,
.survey-not-found .error-icon svg {
    width: 40px;
    height: 40px;
    stroke: #fff;
    stroke-width: 3;
}

/* ============================================================
   Loading Spinner
   ============================================================ */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--survey-border);
    border-top-color: var(--survey-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   PC Responsive (min-width: 768px)
   ============================================================ */
@media (min-width: 768px) {
    .survey-container {
        padding: 0.5rem;
    }

    .survey-header {
        padding: 2rem;
    }

    .survey-title {
        font-size: 1.75rem;
    }

    .question-card {
        padding: 2rem;
    }

    .question-title {
        font-size: 1.2rem;
    }

    /* PC에서 질문 헤더 가로 배치 */
    .question-header {
        flex-direction: row;
        gap: 0.75rem;
    }

    .view-mode-toggle {
        display: none; /* PC에서는 항상 스크롤 모드 */
    }

    .survey-nav.step-mode {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0;
        background: transparent;
    }

    .survey-form {
        padding-bottom: 8rem;
    }

    .survey-form.step-mode .question-card {
        display: block;
    }

    .nav-btn-prev {
        display: none; /* PC에서는 이전 버튼 숨김 */
    }

    .nav-btn-next {
        display: none; /* PC에서는 다음 버튼 숨김 */
    }
}

/* ============================================================
   FadeIn Animation (Mobile Step Mode)
   ============================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.survey-form.step-mode .question-card.active.fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ============================================================
   Small Mobile (max-width: 380px)
   ============================================================ */
@media (max-width: 380px) {
    .survey-container {
        padding: 0.5rem;
    }

    .survey-header,
    .question-card {
        padding: 1rem;
    }

    .survey-title {
        font-size: 1.25rem;
    }

    .option-item {
        padding: 0.75rem;
    }
}

/* ============================================================
   New Question Types (2025.01.07)
   ============================================================ */

/* Select Input (Dropdown) */
.select-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--survey-border);
    border-radius: var(--survey-radius-sm);
    background: var(--survey-card-bg);
    color: var(--survey-text);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.select-input:focus {
    outline: none;
    border-color: var(--survey-accent, var(--survey-primary));
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Date/Time Inputs */
.date-input,
.time-input,
.datetime-input {
    padding: 0.875rem 1rem;
    font-size: 1rem;
}

/* Matrix Table */
.matrix-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.5rem;
    padding: 0 0.5rem;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.matrix-table th {
    padding: 0.75rem 0.5rem;
    font-weight: 500;
    color: var(--survey-text-muted);
    text-align: center;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.matrix-table td {
    padding: 0.5rem;
    border-top: 1px solid var(--survey-border);
}

.matrix-row-label {
    font-weight: 500;
    color: var(--survey-text);
    white-space: nowrap;
    padding-right: 1rem !important;
}

.matrix-cell {
    text-align: center;
}

.matrix-radio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.matrix-radio input {
    display: none;
}

.matrix-radio-mark {
    width: 24px;
    height: 24px;
    border: 2px solid var(--survey-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.matrix-radio input:checked + .matrix-radio-mark {
    border-color: var(--survey-accent, var(--survey-primary));
    background: var(--survey-accent, var(--survey-primary));
}

.matrix-radio input:checked + .matrix-radio-mark::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Ranking */
.ranking-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ranking-hint {
    font-size: 0.8125rem;
    color: var(--survey-text-muted);
    margin: 0 0 0.5rem 0;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--survey-card-bg);
    border: 1px solid var(--survey-border);
    border-radius: var(--survey-radius-sm);
    cursor: grab;
    transition: all 0.2s;
    user-select: none;
}

.ranking-item:active {
    cursor: grabbing;
}

.ranking-item.dragging {
    opacity: 0.5;
    border-color: var(--survey-accent, var(--survey-primary));
}

.ranking-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--survey-accent, var(--survey-primary));
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.ranking-label {
    flex: 1;
    font-size: 0.9375rem;
}

.ranking-handle {
    color: var(--survey-text-muted);
    flex-shrink: 0;
}

/* Responsive Matrix */
@media (max-width: 600px) {
    .matrix-table th,
    .matrix-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }

    .matrix-radio-mark {
        width: 20px;
        height: 20px;
    }

    .matrix-radio input:checked + .matrix-radio-mark::after {
        width: 6px;
        height: 6px;
    }
}

/* ============================================================
   에이이노브 회원가입 폼
   ============================================================ */
.ainnov-signup-card {
    background: var(--survey-card-bg);
    border-radius: var(--survey-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--survey-shadow);
}

.ainnov-signup-card .question-number {
    background: var(--survey-primary);
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.ainnov-signup-card .question-number svg {
    width: 20px;
    height: 20px;
}

.signup-info-box {
    background: #f0f4f8;
    border: 1px solid #e2e8f0;
    border-left: 3px solid var(--survey-primary);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.signup-description {
    color: var(--survey-text);
    font-size: 0.95rem;
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}

.signup-description strong {
    color: var(--survey-primary);
}

.signup-description a {
    color: inherit;
    text-decoration: none;
}

.signup-description a:hover {
    text-decoration: underline;
}

.signup-description a strong {
    color: var(--survey-primary);
}

.signup-benefits {
    margin: 0;
    padding: 0;
    list-style: none;
}

.signup-benefits li {
    position: relative;
    padding-left: 1.25rem;
    color: var(--survey-text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

.signup-benefits li::before {
    content: '•';
    position: absolute;
    left: 0.25rem;
    color: var(--survey-primary);
    font-weight: bold;
}

.signup-benefits li:last-child {
    color: var(--survey-primary);
    font-weight: 500;
}

.signup-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.signup-fields .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.signup-fields label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--survey-text);
}

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

.signup-fields .text-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--survey-border);
    border-radius: var(--survey-radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.signup-fields .text-input:focus {
    outline: none;
    border-color: var(--survey-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.signup-fields .form-hint {
    font-size: 0.8rem;
    color: var(--survey-text-muted);
    margin: 0;
}

/* 이메일 입력 상태 표시 */
.input-with-status {
    position: relative;
}

.input-with-status .text-input {
    padding-right: 100px;
}

.email-status {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: 500;
}

.email-status.loading {
    color: var(--survey-text-muted);
}

.email-status.exists {
    color: var(--survey-success);
}

.email-status.new {
    color: var(--survey-primary);
}

.email-status.error {
    color: var(--survey-error);
}

/* 폼 힌트 상태별 스타일 */
.signup-fields .form-hint.error {
    color: var(--survey-error);
}

.signup-fields .form-hint.success {
    color: var(--survey-success);
}

/* 기존 회원 정보 표시 */
.existing-member-info {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--survey-radius-sm);
    padding: 1rem;
    margin-top: 0.5rem;
}

.member-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--survey-success);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    margin-bottom: 0.5rem;
}

.member-badge svg {
    width: 12px;
    height: 12px;
}

.member-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--survey-text);
}

/* 2열 그리드 폼 */
.signup-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 1.5rem;
}

/* 신규 회원 필드 (기존 회원일 때 숨김) */
.new-member-field {
    transition: opacity 0.2s, visibility 0.2s;
}

.new-member-field.hidden {
    display: none;
}

/* 약관 동의 */
.terms-row {
    grid-column: 1;
    display: flex;
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.terms-row .terms-link {
    flex-shrink: 0;
}

.terms-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

.terms-checkbox .checkbox-text {
    font-size: 0.875rem;
    line-height: 1.4;
}

/* 모바일에서는 1열로 */
@media (max-width: 640px) {
    .signup-grid {
        grid-template-columns: 1fr;
    }
}

.terms-link {
    font-size: 0.8rem;
    color: var(--survey-text-muted);
    text-decoration: underline;
}

.terms-link:hover {
    color: var(--survey-text);
}

/* 회원가입 폼 체크박스 스타일 */
.ainnov-signup-card .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.ainnov-signup-card .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--survey-primary);
    cursor: pointer;
}

/* PC 반응형 - 회원가입 폼 */
@media (min-width: 768px) {
    .ainnov-signup-card {
        padding: 2rem;
    }
}

/* ============================================================
   약관 모달
   ============================================================ */
.terms-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

.terms-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.terms-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.terms-modal-container {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.2s ease-out;
}

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

.terms-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.terms-modal-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.terms-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    border-radius: 8px;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.terms-modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.terms-modal-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #374151;
}

.terms-modal-body h4 {
    margin: 1.5rem 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.terms-modal-body h4:first-child {
    margin-top: 0;
}

.terms-modal-body p {
    margin: 0 0 1rem;
}

.terms-modal-body ul,
.terms-modal-body ol {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
}

.terms-modal-body li {
    margin-bottom: 0.5rem;
}

.terms-modal-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.85rem;
}

.terms-modal-body th,
.terms-modal-body td {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.terms-modal-body th {
    background: #f9fafb;
    font-weight: 600;
}

.terms-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.terms-modal-btn {
    padding: 0.625rem 1.5rem;
    background: var(--survey-primary, #000);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s;
}

.terms-modal-btn:hover {
    opacity: 0.9;
}

/* 모바일 대응 */
@media (max-width: 640px) {
    .terms-modal-container {
        width: 95%;
        max-height: 85vh;
    }

    .terms-modal-header {
        padding: 1rem 1.25rem;
    }

    .terms-modal-body {
        padding: 1.25rem;
    }

    .terms-modal-footer {
        padding: 1rem 1.25rem;
    }
}

/* =========================================================
   제출 버튼 상태 (비활성화, 로딩)
   ========================================================= */
.nav-btn-submit.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #9ca3af !important;
    box-shadow: none !important;
}

.nav-btn-submit.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-btn-submit .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   제출 확인 모달
   ========================================================= */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.confirm-modal-container {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    max-width: 360px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.3s ease;
}

.confirm-modal-icon {
    color: var(--survey-primary, #000);
    margin-bottom: 1rem;
}

.confirm-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.confirm-modal-desc {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 1.5rem 0;
}

.confirm-modal-actions {
    display: flex;
    gap: 0.75rem;
}

.confirm-modal-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.confirm-modal-btn-cancel {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.confirm-modal-btn-cancel:hover {
    background: #e5e7eb;
}

.confirm-modal-btn-submit {
    background: var(--survey-primary, #000);
    border: none;
    color: #fff;
}

.confirm-modal-btn-submit:hover {
    opacity: 0.9;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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