@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap');

/* ── 앱 컨테이너 CSS 격리 (테마 스타일 간섭 방지) ── */
#swr-app, #swr-iv-app {
  font-family: 'Noto Sans KR', sans-serif;
  color: #333;
  line-height: 1.5;
  padding: 10px 0;
  -webkit-text-size-adjust: 100%;
}
#swr-app *, #swr-app *::before, #swr-app *::after,
#swr-iv-app *, #swr-iv-app *::before, #swr-iv-app *::after {
  box-sizing: border-box;
}
#swr-app h1, #swr-app h2, #swr-app h3, #swr-app h4, #swr-app p,
#swr-iv-app h1, #swr-iv-app h2, #swr-iv-app h3, #swr-iv-app h4, #swr-iv-app p {
  margin-top: 0;
}
#swr-app input, #swr-app select, #swr-app textarea, #swr-app button,
#swr-iv-app input, #swr-iv-app select, #swr-iv-app textarea, #swr-iv-app button {
  font-family: 'Noto Sans KR', sans-serif;
}
.sw-hide { display: none !important; }

/* 스텝바 */
.step-bar { display: flex; background-color: #E9ECEF; border-radius: 4px; overflow: hidden; margin-bottom: 30px; }
.step { flex: 1; text-align: center; padding: 15px 10px; font-size: 14px; color: #666; position: relative; font-weight: 700; transition: 0.3s; }
.step.active { background-color: var(--swr-primary); color: #fff; }
.step.active::after { content: ''; position: absolute; right: -14px; top: 0; border-top: 25px solid transparent; border-bottom: 25px solid transparent; border-left: 14px solid var(--swr-primary); z-index: 10; }

/* 섹션 */
.section { margin-bottom: 40px; }
.section-header { background-color: var(--swr-primary); color: #fff; padding: 12px 20px; font-weight: 700; font-size: 16px; border-radius: 4px 4px 0 0; }
.form-box { background-color: #fff; border: 1px solid #ddd; border-top: none; padding: 30px; border-radius: 0 0 4px 4px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-full { grid-column: 1 / -1; }

/* 입력 */
.field-group { margin-bottom: 20px; }
.label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; color: #333; }
.label span { color: #d9534f; margin-left: 3px; }
.input-field { width: 100%; border: 1px solid #ccc; padding: 12px 15px; border-radius: 4px; font-size: 14px; background-color: #fff; color: #333; transition: border-color 0.2s; font-family: inherit; }
.input-field:focus { border-color: var(--swr-accent); outline: none; box-shadow: 0 0 0 2px rgba(0,88,171,0.1); }
.input-field:disabled { background-color: #f1f5f9; cursor: not-allowed; color: #64748b; }
select.input-field { appearance: auto; cursor: pointer; }
textarea.input-field { resize: vertical; min-height: 120px; }
.field-help { font-size: 12px; color: #64748b; margin: 5px 0 0; }

/* 트랙 카드 */
.track-cards { display: flex; gap: 15px; }
.track-card { flex: 1; border: 2px solid #E2E8F0; border-radius: 6px; padding: 20px; text-align: center; cursor: pointer; transition: all 0.2s; background-color: #fff; position: relative; }
.track-card.active { border-color: var(--swr-accent); background-color: #F0F7FF; }
.track-title { font-weight: 700; font-size: 16px; margin: 0; color: #333; }
.track-card.active .track-title { color: var(--swr-accent); }
.check-mark { position: absolute; top: 10px; right: 12px; color: var(--swr-accent); font-size: 18px; display: none; }
.track-card.active .check-mark { display: block; }

/* 사진 */
.photo-wrap { display: flex; gap: 20px; align-items: flex-start; background-color: #F8F9FA; padding: 20px; border: 1px solid #E9ECEF; border-radius: 6px; margin-bottom: 25px; }
.photo-preview { width: 110px; height: 145px; border: 2px dashed #cbd5e1; background-color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #94a3b8; text-align: center; overflow: hidden; flex-shrink: 0; border-radius: 4px; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-info { font-size: 12px; color: #64748b; margin-top: 8px; line-height: 1.5; }

/* 버튼 */
.btn-container { text-align: right; margin-top: 30px; border-top: 1px solid #eee; padding-top: 25px; }
.btn { background-color: #5CB85C; color: #fff; border: none; padding: 14px 35px; border-radius: 4px; font-size: 15px; font-weight: 700; cursor: pointer; transition: background-color 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: inherit; }
.btn:hover { filter: brightness(0.9); }
.btn:disabled { background-color: #cbd5e1; cursor: not-allowed; }
.btn-primary-dark { background-color: var(--swr-primary); font-size: 16px; padding: 16px 40px; }
.btn-accent { background-color: var(--swr-accent); font-size: 16px; padding: 16px 40px; }

/* 학교 인증 */
.edu-verify-box { background-color: #f8fafc; border: 1px solid #e2e8f0; padding: 20px; border-radius: 6px; margin-top: 10px; }
.notice { display: flex; align-items: center; gap: 10px; background-color: #EBF5FF; color: var(--swr-accent); padding: 15px; border-radius: 4px; font-size: 14px; margin-top: 15px; font-weight: 500; }

/* 인적성 */
.test-desc { color: #64748b; font-size: 14px; margin-bottom: 30px; padding-bottom: 15px; border-bottom: 1px solid #e2e8f0; }
.question { margin-bottom: 30px; }
.question h4 { font-size: 15px; font-weight: 700; margin-bottom: 15px; color: #0f172a; line-height: 1.4; }
.option { display: block; padding: 14px 20px; border: 1px solid #e2e8f0; border-radius: 6px; margin-bottom: 10px; cursor: pointer; transition: 0.2s; font-size: 14px; background-color: #fff; }
.option:hover { background-color: #f8fafc; }
.question input[type="radio"] { display: none; }
.question input[type="radio"]:checked + .option { border-color: var(--swr-accent); background-color: #F0F7FF; font-weight: 700; color: var(--swr-accent); }

/* 완료 */
.success-box { text-align: center; padding: 60px 20px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; margin-top: 20px; }
.success-icon { width: 80px; height: 80px; background-color: #dcfce7; color: #16a34a; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 35px; margin: 0 auto 20px auto; }

/* ── 신분증 업로드 ─────────────────────────────── */
.id-card-wrap {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

/* 미리보기 박스 */
.id-card-preview {
    width: 180px;
    height: 114px;   /* 신분증 가로 비율 16:10 */
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    transition: border-color .2s;
}
.id-card-preview.has-image { border-style: solid; border-color: var(--swr-accent); }
.id-card-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.id-card-preview-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 500;
    color: #c1c8d4;
    text-align: center;
    line-height: 1;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

/* 우측 정보 영역 */
.id-card-info { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.id-card-input { cursor: pointer; }

/* 정책 안내 */
.id-card-policy {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}
.id-card-policy svg { flex-shrink: 0; margin-top: 1px; }

/* 분석 결과 상태 배지 (인라인) */
.id-card-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid;
    transition: all .3s;
}
.id-card-status.status-analyzing {
    background: #f1f5f9; color: #475569; border-color: #e2e8f0;
}
.id-card-status.status-pass {
    background: #f0fdf4; color: #16a34a; border-color: #bbf7d0;
}
.id-card-status.status-fail {
    background: #fef2f2; color: #dc2626; border-color: #fecaca;
}
.id-card-status.status-warn {
    background: #fffbeb; color: #d97706; border-color: #fde68a;
}

/* 분석 결과 배너 (Step 2 상단) */
.id-analysis-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1.5px solid;
    line-height: 1.4;
}
.id-analysis-banner.status-pass  { background:#f0fdf4; color:#16a34a; border-color:#bbf7d0; }
.id-analysis-banner.status-fail  { background:#fef2f2; color:#dc2626; border-color:#fecaca; }
.id-analysis-banner.status-warn  { background:#fffbeb; color:#d97706; border-color:#fde68a; }
.id-analysis-banner.status-info  { background:#f0f9ff; color:#0369a1; border-color:#bae6fd; }

/* ── 화상 면접 UI ──────────────────────────── */

/* 권한 요청 게이트 */
.interview-permission-gate {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; padding: 40px 20px; gap: 16px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
}
.interview-perm-icon {
    width: 80px; height: 80px; border-radius: 50%;
    background: #eff6ff; color: #2563eb;
    display: flex; align-items: center; justify-content: center;
}
.interview-perm-title {
    font-size: 20px; font-weight: 800; color: #0f172a; margin: 0;
}
.interview-perm-desc {
    font-size: 14px; color: #475569; line-height: 1.7; margin: 0; max-width: 420px;
}
.interview-perm-checklist {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 8px; text-align: left;
}
.interview-perm-checklist li {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: #334155; font-weight: 500;
}
.interview-perm-checklist li i { color: #16a34a; }

/* 안내 배너 */
.interview-notice {
    display: flex; align-items: flex-start; gap: 10px;
    background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe;
    border-radius: 8px; padding: 14px 18px; font-size: 13px;
    line-height: 1.6; margin-bottom: 16px; font-weight: 500;
}
.interview-notice-warn {
    background: #fffbeb; color: #92400e; border-color: #fde68a;
}

/* ══════════════════════════════════════════════════════
   면접 질문 카드 — HR 솔루션 수준 리디자인
   #swr-app / #swr-iv-app 이중 prefix로 테마 완전 격리
   ══════════════════════════════════════════════════════ */

/* ── 카드 컨테이너 ── */
#swr-app .swr-iq-card,
#swr-iv-app .swr-iq-card {
    background: #1D1D4B !important;
    background: var(--swr-primary, #1D1D4B) !important;
    border-radius: 16px !important;
    padding: 40px !important;
    margin-bottom: 28px !important;
    box-shadow:
        0 20px 25px -5px rgba(0,0,0,0.20),
        0 8px 10px -6px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.08) !important;
    position: relative !important;
    overflow: hidden !important;
}

/* ── 배경 장식 대형 "Q" ── */
#swr-app .swr-iq-deco,
#swr-iv-app .swr-iq-deco {
    position: absolute !important;
    right: -10px !important;
    top: -30px !important;
    font-size: 220px !important;
    font-weight: 900 !important;
    font-style: italic !important;
    font-family: Georgia, 'Times New Roman', serif !important;
    color: rgba(255,255,255,0.045) !important;
    line-height: 1 !important;
    letter-spacing: -0.05em !important;
    pointer-events: none !important;
    user-select: none !important;
    z-index: 0 !important;
}

/* ── 소제목 행 ("Interview Question" + 마이크 아이콘) ── */
#swr-app .swr-iq-eyebrow,
#swr-iv-app .swr-iq-eyebrow {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 0 20px 0 !important;
    position: relative !important;
    z-index: 1 !important;
}
#swr-app .swr-iq-eyebrow-icon,
#swr-iv-app .swr-iq-eyebrow-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 26px !important;
    height: 26px !important;
    background: rgba(59,130,246,0.22) !important;
    border: 1px solid rgba(59,130,246,0.35) !important;
    border-radius: 7px !important;
    flex-shrink: 0 !important;
    color: #60a5fa !important;
}
#swr-app .swr-iq-eyebrow-icon svg,
#swr-iv-app .swr-iq-eyebrow-icon svg {
    stroke: #60a5fa !important;
    display: block !important;
}
#swr-app .swr-iq-eyebrow-text,
#swr-iv-app .swr-iq-eyebrow-text {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #3b82f6 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    line-height: 1 !important;
}

/* ── 질문 텍스트 (테마 color 차단 핵심) ── */
#swr-app .swr-iq-text,
#swr-iv-app .swr-iq-text {
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.6 !important;
    color: #ffffff !important;
    margin: 0 0 28px 0 !important;
    padding: 0 !important;
    position: relative !important;
    z-index: 1 !important;
    word-break: keep-all !important;
    text-shadow: none !important;
}

/* ── 안내 팁 박스 ── */
#swr-app .swr-iq-tip,
#swr-iv-app .swr-iq-tip {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 14px 18px !important;
    background: rgba(0,0,0,0.22) !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    border-radius: 10px !important;
    position: relative !important;
    z-index: 1 !important;
}
#swr-app .swr-iq-tip-icon,
#swr-iv-app .swr-iq-tip-icon {
    flex-shrink: 0 !important;
    margin-top: 1px !important;
    stroke: #fbbf24 !important;
    color: #fbbf24 !important;
    display: block !important;
}
#swr-app .swr-iq-tip span,
#swr-iv-app .swr-iq-tip span {
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: rgba(255,255,255,0.72) !important;
    font-weight: 400 !important;
}
/* "60초 이내" 노란색 강조 */
#swr-app .swr-iq-highlight,
#swr-iv-app .swr-iq-highlight {
    color: #fbbf24 !important;
    font-weight: 800 !important;
}

/* 웹캠 + 컨트롤 레이아웃 */
.interview-wrap {
    display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap;
}
.interview-video-area {
    flex: 0 0 300px; display: flex; flex-direction: column; gap: 8px;
}
.interview-video-box {
    position: relative; border-radius: 12px; overflow: hidden; background: #0f172a;
    aspect-ratio: 4/3;
}
#webcam-preview {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.rec-badge {
    position: absolute; top: 10px; left: 10px;
    display: flex; align-items: center; gap: 6px;
    background: rgba(0,0,0,0.55); color: #fff;
    font-size: 12px; font-weight: 700; padding: 4px 10px;
    border-radius: 999px; letter-spacing: 0.05em;
}
.rec-dot-circle {
    display: inline-block; width: 8px; height: 8px;
    background: #ef4444; border-radius: 50%;
    animation: swr-blink 1s infinite;
}
@keyframes swr-blink { 0%,100%{opacity:1} 50%{opacity:0.25} }

.interview-timer-overlay {
    position: absolute; bottom: 10px; right: 12px;
    font-size: 22px; font-weight: 900; color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}
.interview-video-label {
    font-size: 11px; color: #94a3b8; text-align: center; margin: 0;
}

/* 컨트롤 패널 */
.interview-control-panel {
    flex: 1; display: flex; flex-direction: column; gap: 16px; min-width: 220px;
}

/* 상태 표시 */
.interview-state {
    display: flex; align-items: center; gap: 14px;
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 10px; padding: 14px 18px;
}
.interview-state-icon {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.interview-state-icon--ready { background: #eff6ff; color: #2563eb; }
.interview-state-icon--rec   { background: #fef2f2; color: #ef4444; font-size: 20px; }
.interview-state-title { font-size: 14px; font-weight: 700; color: #0f172a; margin-bottom: 2px; }
.interview-state-desc  { font-size: 12px; color: #64748b; line-height: 1.5; }

/* 실시간 전사 */
.live-transcript-label {
    font-size: 11px; font-weight: 700; color: #64748b;
    text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px;
}
.live-transcript {
    min-height: 80px; max-height: 140px; overflow-y: auto;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
    padding: 12px 16px; font-size: 13px; line-height: 1.7; color: #475569;
}

/* 버튼 그룹 */
.interview-btn-group { display: flex; flex-direction: column; gap: 10px; }
.interview-btn { width: 100%; justify-content: center; font-size: 15px; padding: 15px 20px; }
.btn-stop { background-color: #ef4444; }
.btn-stop:hover { filter: brightness(0.9); }

/* 업로드 중 */
.interview-uploading {
    display: flex; align-items: center; gap: 10px;
    background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px;
    padding: 14px 18px; font-size: 13px; font-weight: 600; color: #d97706;
}

/* 에러 */
.interview-cam-error {
    background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px;
    padding: 14px 18px; font-size: 13px; color: #dc2626; margin-top: 10px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .interview-video-area { flex: 0 0 100%; }
}

/* ── 접수번호 박스 ──────────────────────────── */
.accession-box {
    display: inline-flex; flex-direction: column; align-items: center;
    background: #f0f9ff; border: 2px solid #bae6fd; border-radius: 12px;
    padding: 20px 40px; margin: 0 auto 24px; gap: 6px;
}
.accession-label {
    font-size: 12px; font-weight: 700; color: #0369a1;
    text-transform: uppercase; letter-spacing: 0.08em;
}
.accession-number {
    font-size: 26px; font-weight: 900; color: #0c4a6e;
    letter-spacing: 0.05em; font-family: monospace;
}
.accession-desc {
    font-size: 12px; color: #64748b; margin: 4px 0 0; text-align: center;
}

/* ── 트랙 토글 ──────────────────────────────── */
#swr-app.swr-track-current-univ .swr-track-youth { display: none !important; }
#swr-app.swr-track-current-youth .swr-track-univ { display: none !important; }

@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; gap: 15px; }
    .track-cards { flex-direction: column; }
    .step-bar { flex-direction: column; }
    .step.active::after { display: none; }
}
