/* ===========================
   0. 기본 토스 느낌 토큰 / 레이아웃
   =========================== */

:root {
  --app-bg: #f3f4f6;
  --app-bg-soft: linear-gradient(180deg, #eef2ff 0%, #f9fafb 40%, #ffffff 100%);
  --card-bg: #ffffff;
  --accent: #2563eb;
  --accent-soft: rgba(37,99,235,0.08);
  --accent-strong: #1d4ed8;
  --text-main: #111827;
  --text-sub: #6b7280;
  --border-soft: rgba(203,213,225,1);
  --shadow-soft: 0 18px 40px rgba(15,23,42,0.06);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--app-bg-soft);
  font-family: -apple-system, BlinkMacSystemFont, system-ui,
    "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: var(--text-main);
}

/* 스플래시는 구조만 남기고 숨김 */
#splash-overlay {
  display: none !important;
}

/* ===========================
   1. 카카오톡 버튼
   =========================== */
/* (기존 유지: 너가 따로 쓰는 스타일 있으면 여기 유지하면 됨) */


/* ===========================
   2. 앱 셸 / 카드 레이아웃
   =========================== */

.app-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 96px; /* 하단 네비 여유 */
}

@media (min-width: 992px) {
  .app-shell {
    padding-top: 32px;
    padding-bottom: 48px;
  }
}

.container.app-container {
  background: #ffffff;
  border-radius: 32px;
  padding: 20px 18px 18px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
}

@media (min-width: 768px) {
  .container.app-container {
    padding: 28px 28px 24px;
  }
}

/* 상단 헤더 (로고 + 안내문) */
.app-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.app-logo-wrap {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: radial-gradient(circle at 20% 0, #f6f7f7 0, #c7c7c7 45%, #787e89 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
  flex-shrink: 0;
}

.app-logo-wrap img {
  width: 32px;
  height: auto;
}

.app-header-text {
  color: var(--text-main);
}

.app-header-subtitle {
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 4px;
}

.app-header-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.app-header-desc {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.5;
}

@media (min-width: 768px) {
  .app-header-title {
    font-size: 20px;
  }
  .app-header-desc {
    font-size: 13px;
  }
}

/* ===========================
   3. 스텝 인디케이터
   =========================== */

.step-indicator {
  display: flex;
  gap: 6px;
  margin: 14px 0 10px;
}

.step-pill {
  flex: 1;
  min-width: 0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--text-sub);
  background: #f9fafb;
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.step-pill span.num {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #4b5563;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

.step-pill.is-active {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  border-color: transparent;
  color: #eff6ff;
}

.step-pill.is-active span.num {
  background: rgba(15, 23, 42, 0.18);
  color: #eff6ff;
}

/* ===========================
   4. 카드 스타일
   =========================== */

.card {
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.04);
  color: var(--text-main);
  overflow: hidden;
}

.card-header {
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: var(--text-main);
  padding: 12px 16px;
}

.card-body {
  padding: 14px 16px 16px;
}

.card + .card {
  margin-top: 12px;
 
}

/* ===========================
   5. 폼 요소 공통
   =========================== */

.form-label {
  font-size: 12px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.form-control {
  background: #f9fafb;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  color: var(--text-main);
  font-size: 13px;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
  background: #ffffff;
  color: var(--text-main);
}

.form-control::placeholder {
  color: #9ca3af;
}

textarea.form-control {
  min-height: 90px;
}

.form-check-label {
  font-size: 13px;
  color: var(--text-main);
}

.form-check-input {
  border-radius: 999px;
  border-color: #cbd5f5;
  background: #ffffff;
}

.form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.form-check-inline {
  margin-right: 10px;
}

/* 숫자 인풋 스피너 제거 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  text-align: center;
}

/* 유효성 에러 표시 */
.is-invalid {
  border-color: #dc3545 !important;
  background-color: #fef2f2;
}

.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.15rem rgba(220, 53, 69, 0.3);
}

/* 에러 텍스트 / 안내 */
.error-message {
  color: #dc2626;
  font-size: 0.9rem;
}

.age-note {
  color: #ef4444;
  font-size: 0.85rem;
  margin-left: 10px;
}

.font-red {
  color: #ef4444;
  font-size: 0.7em;
}

.checkbox-error {
  font-size: 0.9rem;
}

.summary-fields.small p {
  font-size: 0.9rem;
}

.summary-fields {
  margin-top: 10px;
}

#summary_section > p:nth-child(2) {
  font-size: 0.7em;
}

/* 구글 장소 자동완성 z-index */
.pac-container {
  z-index: 9999 !important;
  position: absolute;
}

/* ===========================
   6. 인원/나이 카드
   =========================== */

.room-section {
  display: none;
}

.room-details,
.age-details {
  margin-top: 10px;
}

.age-input {
  max-width: 70px;
  display: inline-block;
}

.age-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background-color: #f9fafb;
}

.age-card label {
  font-weight: 600;
  margin-bottom: 5px;
  display: block;
}

#age_section_children,
#age_section_infants {
  color: var(--text-main);
}

/* ===========================
   7. 스텝 섹션 / 네비게이션
   =========================== */

.step-section {
  display: none; /* 기본 숨김 */
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.step-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: stepFadeUp 0.28s ease-out;
}

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

.step-navigation {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-top: 16px;
}

.step-navigation .btn {
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}

#prev_step {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #4b5563;
}

#next_step,
#submit_form {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  border: none;
  color: #eff6ff;
}

/* ===========================
   8. 출발 공항/항공 추천 블록
   =========================== */

.departure-field {
  margin-bottom: 20px;
}

.dynamic-fields .border {
  margin-bottom: 15px;
}

/* ===========================
   9. 투어 안내 모달
   =========================== */

#tourInfoContent img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block;
}

.modal-content {
  border-radius: 20px;
}

.modal-header {
  border-bottom: 1px solid #e5e7eb;
}

/* ===========================
   10. 반응형 조정
   =========================== */

@media (max-width: 768px) {
  body {
    padding-bottom: 80px; /* 하단 네비 자리 */
  }

  .app-shell {
    padding: 12px 12px 96px;
  }

  .container.app-container {
    border-radius: 28px;
    padding: 18px 14px 18px;
  }

  .app-header {
    align-items: flex-start;
  }

  .app-header-title {
    font-size: 17px;
  }

  .step-navigation {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 8px 14px calc(10px + env(safe-area-inset-bottom));
    background: #ffffff;
    backdrop-filter: blur(18px);
    border-top: 1px solid #e5e7eb;
    z-index: 1000;
  }

  .step-navigation .btn {
    flex: 1;
    padding: 10px;
    justify-content: space-around;
  }
}

.passenger-flight-row.has-error {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.airport-error {
  font-size: 0.8rem;
}

/* =========================================================
   11. 인라인 스타일 제거용 유틸/컴포넌트
   ========================================================= */

/* 공통 숨김 유틸 */
.is-hidden{
  display: none !important;
}

/* Step2 OFF 강제 숨김 */
.step-section--disabled{
  display: none !important;
}

/* 라벨 아래 보조문구(기존 p style 대체) */
.label-subnote{
  font-size: 0.7em;
  letter-spacing: -1px;
  margin: 0;
  color: #6b7280;
  line-height: 1.1;
}
.label-subnote--empty{
  visibility: hidden; /* 높이만 유지 */
}

/* 요약 섹션(기존 inline style 대체) */
.summary-section{
  font-weight: 700;
  font-size: 1.1rem;
  display: none; /* JS에서 필요 시 display 변경 */
}

/* 동적 카드(기존 style="display:none" 대체) */
.dynamic-card{
  display: none; /* JS에서 필요 시 display 변경 */
}

/* 제출 버튼 기본 숨김(기존 style="display:none" 대체) */
.btn-submit{
  display: none; /* JS에서 필요 시 display 변경 */
}

/* 지도 영역(기존 inline style 대체) */
.map-preview{
  height: 300px;
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

/* 토스트 z-index(기존 inline style 대체) */
.toast-container{
  z-index: 1055;
}

/* =========================================================
   12. 투어 리스트 (왼쪽: 투어명 / 오른쪽: 일정보기 버튼)
   ========================================================= */

.tour-check-row{
    display: flex;

    gap: 10px;

    background: #ffffff;
    margin-bottom: 8px;

}



.tour-check-left{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  margin: 0;
  flex: 1;
  align-items: center;
}

.tour-check-left .form-check-input{
  margin-top: 3px; /* 라벨 첫 줄과 정렬 */
}

.tour-name{
  margin: 0;
  line-height: 1.35;
  word-break: keep-all;
}

/* 오른쪽 "일정보기" 버튼 */
.tour-info-btn{
  flex-shrink: 0;
  border: 1px solid rgba(37,99,235,0.25);
  background: rgba(37,99,235,0.08);
  color: #1d4ed8;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}

.tour-info-btn:hover{
  background: rgba(37,99,235,0.12);
  border-color: rgba(37,99,235,0.35);
}

.tour-info-btn:active{
  transform: translateY(1px);
}

.categoryName{
    font-size: 17px;
    font-weight: bold;
    color: #666
}
/* 항공 토스터 UI */
.flight-toast{
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.03);
  border-radius: 14px;
  padding: 14px 14px;
  margin-bottom: 12px;
}

.flight-toast-title{
  font-weight: 700;
  margin-bottom: 4px;
}

.flight-toast-desc{
  color: rgba(0,0,0,.65);
  font-size: 0.95rem;
}

.flight-toast-actions{
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.flight-toast-btn{
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.flight-toast-btn.is-primary{
  background: #111;
  color: #fff;
  border-color: #111;
}

.flight-same-picker{
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.flight-switch-mode{
  border: 0;
  background: transparent;
  color: rgba(0,0,0,.65);
  text-decoration: underline;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

@media (max-width: 480px){

  .tour-info-btn{
    padding: 7px 10px;
  }
}
