/* ─── 웹폰트 등록 ─── */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");


/* ─── 글로벌 변수 (여기트래블 테마) ─── */
:root {
  --color-primary: #0190f8;
  --color-primary-dark: #167fbf;
  --color-text: #333333;
  --color-text-light: #767676;
  --color-text-light2: #979797;
  --color-bg: #f2f2f6;
  --color-white: #ffffff;
  --color-border: #E1E1E1;
  --color-success: #00c851;
  --color-danger: #ff4444;
  --color-warning: #ffbb33;
  --color-lightgrey-1: #eeeeee;
  --color-lightgrey-2: #d3d3d3;
  --color-primary-light: #e8f4ff;
}

/* ─── 상품 선택 ─── */

.duration-btn.selected {
  border-color: var(--color-primary) !important;
  color: var(--color-primary) !important;
  font-weight: 700 !important;
  background-color: var(--color-primary-light) !important;
}

.data-plan-card:hover {
  border-color: var(--color-primary) !important;
}

.buy-btn-disabled {
  background-color: #99b7cc;
  cursor: not-allowed;
}

.buy-btn-active {
  background-color: var(--color-primary);
  cursor: pointer;
}

.data-plan-card.selected {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 1px var(--color-primary);
  background-color: var(--color-primary-light) !important;
}

/* ─── 모바일 퍼스트 앱 셸 ─── */

html, body {
  margin: 0;
  padding: 0;
  font-family: "Pretendard Variable", Pretendard, -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;  /* 2. 글꼴 테두리 부드럽게 (Mac/Chrome) */
  text-rendering: optimizeLegibility;  /* 4. 가독성 최적화 */
  box-sizing: border-box;
}

#app-wrapper {
  max-width: 500px;
  margin: 0 auto;
  background: var(--color-white);
  min-height: 100vh;
  position: relative;
}

.page-content {
  padding: 56px 0 0px;
}

.page-content.no-shell-padding {
  padding: 0;
  min-height: calc(100dvh + 1px);
}

/* ─── 유틸 ─── */
.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);
  }
}

/* ─── 아코디언 ─── */
[data-toggle-text] {
  display: inline-flex;
  transition: transform 0.2s ease;
}
[data-toggle-text].accordion-open {
  transform: rotate(180deg);
}

/* ─── 스크롤바 숨김 ─── */
.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;
  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);
}

.goods-flag-box span {
  width: 100%;
  background-size: cover;
  background-position: center;
}

.material-symbols-outlined {
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24
}

.gd-tab-btn.active {
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
}

.gd-tab-btn:not(.active) {
  border-bottom: 2px solid transparent;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: grid;
}

.gdlist-tab-btn.active{
  background-color: var(--color-primary);
  color:var(--color-white);
}

.gdlist-tab-btn:not(.active) {
  background-color: var(--color-lightgrey-1);
  color:var(--color-text);
}

/* ─── 팝업 (바텀시트) ─── */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.popup-overlay.active {
  display: flex;
}
.popup-sheet {
  background: #fff;
  width: 100%;
  max-width: 500px;
  border-radius: 20px 20px 0 0;
  padding: 12px 0 0;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.popup-handle {
  width: 40px;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  margin: 0 auto 16px;
}
.popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 16px;
  border-bottom: 1px solid #f0f0f0;
}
.popup-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  padding: 4px;
  display: flex;
  align-items: center;
}
.popup-body {
  padding: 20px;
  overflow-y: auto;
  scrollbar-width: none;
  flex: 1;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text, #222);
}
.popup-body::-webkit-scrollbar {
  display: none;
}

.mobile-list p{
  position:relative;
  padding-left:20px;
}
.mobile-list p::before{
  content:'•';
  position:absolute;
  left:4px;
  top:0px;
}

/* ─── autofill 배경색 제거 ─── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px white inset !important;
  box-shadow: 0 0 0px 1000px white inset !important;
}