/* =============================================
   자동차보험 스텝 랜딩 main.css
   디자인 기준: 750px / 표시 비율: 51%
   ============================================= */

:root {
  --color-orange: #ee7200;
  --color-orange-light: #fff4eb;
  --color-orange-border: #F5C89A;
  --color-text-primary: #333;
  --color-text-muted: #BBBBBB;
  --color-text-label: #555;
  --color-bg-input: #f7f8fa;
  --color-bg-dark: #565656;
  --color-divider: #EEEEEE;
  --color-sms-header: #f7f8fa;
  --color-btn-secondary: #777;
}

* {
  box-sizing: border-box;
}

body {
  /* background: #f0f0f0; */
  color: var(--color-text-primary);
  line-height: 1.5;
}

#wrap {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* =============================================
   스텝 공통
   ============================================= */
.step {
  display: none;
}
.step.active {
  display: block;
}
/* 비활성 스텝 강제 숨김 */
.step:not(.active) {
  display: none !important;
}
/* flex가 필요한 스텝 */
#step-0.active,
.step-question.active,
.step-result.active,
#step-4.active,
#step-form.active {
  display: flex !important;
  flex-direction: column;
}

/* =============================================
   STEP-0: 인트로 (랜딩)
   ============================================= */
#step-0 {
  padding: 0 0 135px;
}

.intro-header {
  padding: 36px 36px 0;
  background: #fff;
}

.intro-label {
  display: block;
  color: var(--color-orange);
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 4px;
}

.intro-title {
  font-size: 50px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: 36px;
  text-align: left;
}

.intro-img {
  display: block;
  width: 80%;
  max-width: 400px;
  margin: 0 0 70px;
}

.intro-body {
  padding: 24px 36px 0;
}

.notice-heading {
  font-size: 30px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.intro-notice {
  font-size: 17px;
  color: #888;
  line-height: 1.7;
  margin-bottom: 0;
  border: none;
  background: none;
  padding: 0;
  border-radius: 0;
  word-break: keep-all;
}

.intro-notice p {
  margin-bottom: 2px;
}

.intro-footer-dark {
  background: var(--color-bg-dark);
  padding: 16px 36px;
  margin: 16px -36px 0;
}

.intro-footer-dark p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 4px;
}

.intro-footer-dark button.privacy2 {
  display: inline-block;
  margin-top: 6px;
  font-size: 16px;
  color: #FFFFFF;
  text-decoration: none;
  cursor: pointer;
}

.intro-btn-wrap {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  min-width: 720px;
  padding: 20px 36px 20px;
  background: #fff;
  z-index: 100;
}

.btn-cta {
  display: block;
  width: 100%;
  background: var(--color-orange);
  color: #fff;
  font-size: 30px;
  font-weight: 600;
  text-align: center;
  padding: 30px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  margin-bottom: 0;
}

.btn-cta:active {
  opacity: 0.85;
}

/* =============================================
   STEP Q1 / Q2 / Q3 공통
   ============================================= */
.step-question {
  /* 750px×51% 기준 고정 여백 — 반응형 세로 확장 없음 */
  padding: 72px 36px 48px;
}

.step-count-icon {
  display: block;
  width: 60px;
  aspect-ratio: 1/1;
  margin-bottom: 40px;
}

.step-question-title {
  font-size: 50px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: 0;
  white-space: pre-line;
}

.choice-grid {
  display: flex;
  gap: 40px;
  align-items: stretch;
  margin: 50px 0 0;
}

.choice-card {
  flex: 1;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  background: #F5F5F5;
  position: relative;
  transition: border-color 0.15s, background 0.15s;
  aspect-ratio: 1 / 1.15;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.choice-card.selected {
  border-color: var(--color-orange-border);
  background: var(--color-orange-light);
}

.choice-check {
  display: block;
  width: 80px;
  aspect-ratio: 1/1;
  margin: 0;
}

.choice-text {
  font-size: 36px;
  font-weight: 400;
  color: var(--color-text-primary);
  line-height: 1.4;
}

.choice-card.selected .choice-text {
  color: var(--color-text-primary);
}

.btn-next {
  display: block;
  width: 100%;
  background: #CCCCCC;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  text-align: center;
  padding: 30px;
  border-radius: 8px;
  border: none;
  cursor: not-allowed;
  transition: background 0.2s;
  margin-top: 120px;
}

.btn-next.active {
  background: var(--color-orange);
  cursor: pointer;
}

/* =============================================
   STEP-4: 로딩
   ============================================= */
#step-4 {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  height: 100vh;
}

.loading-title {
  font-size: 50px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  text-align: center;
  margin-bottom: 12px;
  white-space: pre-line;
}

.loading-sub {
  font-size: 30px;
  font-weight: 500;
  color: #666;
  text-align: center;
  margin-bottom: 80px;
}

.progress-wrap {
  width: 100%;
  max-width: 560px;
  background: #F0F0F0;
  border-radius: 100px;
  height: 20px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--color-orange);
  border-radius: 100px;
  transition: width 0.05s linear;
}

.progress-count {
  margin-top: 12px;
  font-size: 30px;
  color: #888;
  text-align: center;
}

.progress-count .text-orange {
  font-weight: 700;
}

/* =============================================
   공통 오렌지 텍스트
   ============================================= */
.text-orange {
  color: var(--color-orange);
}
.text-orange-bold {
  color: var(--color-orange);
  font-weight: 700;
}

/* =============================================
   STEP RESULT 공통
   ============================================= */
.step-result {
  padding: 0;
  min-height: 100vh;
}

.result-top {
  background: #fff;
  padding: 56px 36px 0;
  text-align: center;
}

.result-title {
  font-size: 50px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.4;
  margin-bottom: 7px;
}

.result-sub {
  font-size: 30px;
  margin-bottom: 50px;
  color: #666;
  font-weight: 500;
}

.result-img {
  display: block;
  width: 75%;
  max-width: 560px;
  margin: 0 auto 50px;
}

.result-body {
  flex: 1;
  padding: 32px 36px 48px;
  display: flex;
  flex-direction: column;
}

.result-body .btn-cta {
  margin-top: 0px;
}

.result-items {
  margin-bottom: 80px;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  background: #FFF7F0;
  border-radius: 20px;
  padding: 26px 30px;
}

.result-item-icon {
  width: 38px;
  aspect-ratio: 1/1;
  flex-shrink: 0;
}

.result-item-text {
  font-size: 27px;
  font-weight: 500;
  color: var(--color-text-primary);
  line-height: 1.6;
}

/* =============================================
   STEP-FORM: 정보 입력
   ============================================= */
#step-form {
  padding: 72px 36px 48px;
  min-height: 100vh;
}

#step-form form {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#step-form .btn-cta {
  margin-top: 50px;
}

.form-title {
  font-size: 50px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: 40px;
  white-space: pre-line;
}

.form-group {
  margin-bottom: 50px;
}

.form-label {
  display: block;
  font-size: 30px;
  font-weight: 600;
  color: var(--color-text-label);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  height: 100px;
  border: none;
  border-radius: 8px;
  padding: 0 30px;
  font-size: 30px;
  color: var(--color-text-primary);
  background: var(--color-bg-input);
  outline: none;
  font-family: Pretendard, sans-serif;
}

.form-input:focus {
  border: none;
  outline: none;
  background: var(--color-bg-input);
}

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


/* =============================================
   스텝 전환 페이드
   ============================================= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.step.active {
  animation: fadeIn 0.25s ease;
}

/* =============================================
   모달 (중앙 팝업)
   ============================================= */
@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modalIn {
  from { opacity: 0; transform: translate(-50%, -48%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
}
.modal-overlay.is-open {
  display: block;
  animation: overlayIn 0.2s ease;
}

.modal-sheet {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
  max-width: 92%;
  background: #fff;
  border-radius: 0;
  padding: 24px 20px 28px;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.modal-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 16px;
}

.modal-close {
  width: 28px;
  height: 28px;
  padding: 4px;
  background: var(--color-bg-input);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

/* 탭 */
.modal-tabs {
  display: flex;
  border-bottom: 2px solid var(--color-divider);
  margin-bottom: 16px;
}
.modal-tab {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #AAAAAA;
  padding: 10px 4px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.modal-tab.active {
  color: var(--color-orange);
  border-color: var(--color-orange);
}
.modal-tab-content {
  display: none;
}
.modal-tab-content.active {
  display: block;
}

/* 개인정보 텍스트 */
.modal-sheet .btn-cta {
  font-size: 15px;
  font-weight: 500;
  padding: 16px;
}

.privacy-box {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  letter-spacing: -0.3px;
  max-height: 180px;
  overflow-y: auto;
  background: #F9F9F9;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.privacy-box p {
  padding: 2px 0;
}
.privacy-text {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 18px;
  padding: 0 2px;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.privacy-text p:first-child {
  margin-bottom: 5px;
}
.privacy-text::-webkit-scrollbar {
  width: 4px;
}
.privacy-text::-webkit-scrollbar-thumb {
  background: #DDDDDD;
  border-radius: 2px;
}
.privacy-section-title {
  font-weight: 700;
  color: var(--color-text-primary);
  margin-top: 12px;
  margin-bottom: 4px;
}
.privacy-section-title:first-child {
  margin-top: 0;
}

/* SMS 인증 */
.sms-info {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
  margin-bottom: 20px;
}
.sms-sub-label {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 10px;
  margin-top: -2px;
}
.sms-divider {
  height: 1px;
  background: var(--color-divider);
  margin: 16px 0;
}
.sms-resend-group {
  margin-top: 0;
}
.sms-tel-prefix {
  flex-shrink: 0;
  height: 31px;
  padding: 0 4px;
  border: none;
  border-bottom: 1.5px solid #CCCCCC;
  border-radius: 0;
  background: transparent;
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text-primary);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 18px;
}
.sms-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.sms-row .form-input {
  flex: 1;
}
.btn-sms-action {
  flex-shrink: 0;
  height: 31px;
  padding: 0 15px;
  background: var(--color-btn-secondary);
  border: none;
  border-radius: 0;
  font-size: 15px;
  font-weight: 400;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-sms-action:active {
  background: #333;
}
.btn-sms-confirm {
  background: var(--color-orange);
}
.btn-sms-confirm:active {
  background: #cc6100;
}

/* SMS 모달 오버라이드 */
#modal-sms .modal-header {
  background: var(--color-bg-input);
  margin: -24px -20px 20px;
  padding: 16px 20px;
}
#modal-sms .modal-title {
  color: var(--color-text-primary);
}
#modal-sms .form-label {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}
#modal-sms .sms-sub-label {
  font-size: 13px;
}
#modal-sms .form-input {
  background: transparent;
  border: none;
  border-bottom: 1.5px solid #CCCCCC;
  border-radius: 0;
  padding: 0 4px;
  height: 31px;
  font-size: 14px;
}
#modal-sms .sms-row {
  align-items: flex-end;
}
#modal-sms .form-input:focus {
  background: transparent;
  border-bottom-color: var(--color-orange);
}

