/* ─── 글로벌 변수 (여기트래블 테마) ─── */
:root {
  --color-primary: #4abdac;
  --color-primary-dark: #3a9e8f;
  --color-text: #191919;
  --color-text-light: #767676;
  --color-bg: #f2f2f6;
  --color-white: #ffffff;
  --color-border: #E1E1E1;
  --color-success: #00c851;
  --color-danger: #ff4444;
  --color-warning: #ffbb33;
}

/* ─── 모바일 퍼스트 앱 셸 ─── */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

#app-wrapper {
  max-width: 500px;
  margin: 0 auto;
  background: var(--color-white);
  min-height: 100vh;
  position: relative;
}

.page-content {
  padding: 56px 0 64px;
  min-height: 100vh;
}

.page-content.no-shell-padding {
  padding: 0;
}

/* ─── 유틸 ─── */
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* ─── 토스트 ─── */
.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  max-width: 460px;
  width: calc(100% - 32px);
}

.toast-item {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: toast-in 0.3s ease;
}

.toast-success { background: var(--color-success); color: #fff; }
.toast-danger  { background: var(--color-danger); color: #fff; }
.toast-warning { background: var(--color-warning); color: var(--color-text); }
.toast-info    { background: var(--color-primary); color: #fff; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── 스피너 ─── */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ─── 스크롤바 숨김 ─── */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* ─── 탭바 ─── */
.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--color-border);
}
.tab-bar button {
  flex: 1;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--color-text-light);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.tab-bar button.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* ─── 토글 스위치 ─── */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #ccc;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  padding: 0;
}
.toggle-switch.active {
  background: var(--color-primary);
}
.toggle-switch .toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}
.toggle-switch.active .toggle-knob {
  transform: translateX(20px);
}
