/**
 * 로그인 / 회원가입 / 비밀번호 찾기
 * kafclift _form.scss .sub-content.login 참고
 */

/* ── 공통 ── */
.wrap-content .sub-content.auth-page {
  padding: 120px 0;
}

@media (max-width: 768px) {
  .wrap-content .sub-content.auth-page {
    padding: 60px 0 80px;
  }
}

.auth-inner {
  max-width: 650px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 타이틀 */
.auth-title-box {
  text-align: center;
  margin-bottom: 60px;
}

@media (max-width: 768px) {
  .auth-title-box {
    margin-bottom: 40px;
  }
}

.auth-title-box h3 {
  font-size: 40px;
  font-weight: 700;
  color: #202020;
  margin: 0 0 12px;
}

@media (max-width: 768px) {
  .auth-title-box h3 {
    font-size: 28px;
    margin-bottom: 8px;
  }
}

.auth-title-box span {
  display: block;
  font-size: 16px;
  font-weight: 400;
  color: #8a8a8a;
}

@media (max-width: 768px) {
  .auth-title-box span {
    font-size: 14px;
  }
}

/* ── 로그인 박스 ── */
.auth-login-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 25px;
}

@media (max-width: 768px) {
  .auth-login-box {
    margin-bottom: 16px;
  }
}

.auth-page.auth-find .auth-login-box {
  margin-bottom: 15px;
}

/* 필드 */
.auth-field {
  width: 100%;
  margin-bottom: 24px;
}

.auth-field:last-child {
  margin-bottom: 0;
}

/* 로그인·아이디/비밀번호 찾기: 간격은 .auth-login-box gap만 사용 */
.auth-page.auth-login .auth-field,
.auth-page.auth-find .auth-field {
  margin-bottom: 0;
}

.auth-input-box {
  width: 100%;
}

.auth-input-box input[type="text"],
.auth-input-box input[type="email"],
.auth-input-box input[type="password"],
.auth-input-box input[type="tel"],
.auth-input-box input[type="date"] {
  display: block;
  width: 100%;
  height: 60px;
  padding: 0 24px;
  font-size: 16px;
  font-family: inherit;
  color: #202020;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background-color: #fff;
  box-sizing: border-box;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.3s;
}

.auth-input-box input[readonly] {
  background-color: #f5f5f5;
  color: #555;
}

/* 생년월일 등 date: 네이티브 달력 아이콘 영역 */
.auth-input-box input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.55;
  margin-left: 4px;
}

.auth-input-box input[type="date"][readonly]::-webkit-calendar-picker-indicator {
  display: none;
  pointer-events: none;
}

.auth-input-box input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

@media (max-width: 768px) {
  .auth-input-box input[type="text"],
  .auth-input-box input[type="email"],
  .auth-input-box input[type="password"],
  .auth-input-box input[type="date"] {
    height: 52px;
    font-size: 14px;
    padding: 0 16px;
  }
}

.auth-input-box input::placeholder {
  font-weight: 400;
  color: #bbb;
}

.auth-input-box input:focus {
  border-color: #1B1735;
}

/* 체크박스 (아이디 저장) */
.auth-input-box input[type="checkbox"] {
  display: none;
}

.auth-chk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
  color: #8a8a8a;
  cursor: pointer;
  user-select: none;
}

@media (max-width: 768px) {
  .auth-chk {
    font-size: 14px;
  }
}

.auth-chk span {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #b8b8b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: border-color 0.2s;
  flex-shrink: 0;
}

.auth-chk span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-radius: 50%;
  background: transparent;
  transition: all 0.2s;
}

input[type="checkbox"]:checked + .auth-chk {
  color: #202020;
}

input[type="checkbox"]:checked + .auth-chk span {
  border-color: #1B1735;
}

input[type="checkbox"]:checked + .auth-chk span::before {
  width: 8px;
  height: 8px;
  background: #1B1735;
}

/* ── 버튼 ── */
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 60px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
  -webkit-appearance: none;
  appearance: none;
  border: none;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .auth-btn {
    height: 52px;
    font-size: 16px;
  }
}

.auth-btn--primary {
  background: #1B1735;
  color: #fff!important;
  margin-bottom: 16px;
}

.auth-btn--primary:hover {
  background: #1a1f2e;
  opacity: 1;
}

.auth-btn--primary:disabled {
  background: #b8b8b8;
  cursor: not-allowed;
}

.auth-btn--outline {
  background: #fff;
  border: 1px solid #e6e6e6;
  color: #202020;
  font-size: 16px;
  font-weight: 500;
}

.auth-btn--outline:hover {
  background: #f9f9f9;
  opacity: 1;
}

.auth-btn-row {
  display: flex;
  gap: 16px;
}

/* ── 탭 (아이디/비밀번호 찾기) ── */
.auth-tab-box {
  display: flex;
  border-bottom: 2px solid #e6e6e6;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .auth-tab-box {
    margin-bottom: 24px;
  }
}

.auth-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  font-size: 18px;
  font-weight: 500;
  color: #b8b8b8;
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: none;
  transition: all 0.3s;
  -webkit-appearance: none;
  appearance: none;
}

@media (max-width: 768px) {
  .auth-tab {
    height: 48px;
    font-size: 15px;
  }
}

.auth-tab:hover {
  color: #5c5c5c;
}

.auth-tab--active {
  color: #202020;
  font-weight: 700;
  border-bottom-color: #202020;
}

/* 비밀번호 찾기: 재설정 방법(이메일 / 휴대폰 문자) */
.auth-pw-method {
  display: flex;
  gap: 8px;
  margin: 0 0 24px;
  padding: 4px;
  border-radius: 10px;
  background: #f3f3f5;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .auth-pw-method {
    margin-bottom: 20px;
  }
}

.auth-pw-method__btn {
  flex: 1;
  min-height: 48px;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  color: #6b6b6b;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

@media (max-width: 768px) {
  .auth-pw-method__btn {
    min-height: 44px;
    font-size: 14px;
  }
}

.auth-pw-method__btn:hover {
  color: #202020;
}

.auth-pw-method__btn--active {
  background: #fff;
  color: #202020;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.auth-pw-method__btn:focus-visible {
  outline: 2px solid #1b1735;
  outline-offset: 2px;
}

/* 탭 패널 */
.auth-tab-panel[hidden] {
  display: none;
}

/* 라벨 (아이디 찾기 등) */
.auth-label {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: #202020;
  margin-bottom: 12px;
}

/* 결과 박스 */
.auth-result {
  margin-bottom: 20px;
  padding: 16px 20px;
  background: #eff6ff;
  border-radius: 8px;
  text-align: center;
  font-size: 15px;
  color: #1e3a8a;
  line-height: 1.6;
}

.auth-result strong {
  color: #1e40af;
}

/* 안내 텍스트 */
.auth-noti {
  margin: 0 0 20px;
  font-size: 13px;
  color: #8a8a8a;
  line-height: 1.6;
}

/* ── 스텝 인디케이터 ── */
.auth-step-box {
  text-align: center;
  margin-bottom: 60px;
}

@media (max-width: 768px) {
  .auth-step-box {
    margin-bottom: 40px;
  }
}

.auth-step-box h3 {
  font-size: 40px;
  font-weight: 700;
  color: #202020;
  margin: 0 0 48px;
}

@media (max-width: 768px) {
  .auth-step-box h3 {
    font-size: 28px;
    margin-bottom: 32px;
  }
}

.auth-steps {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.auth-steps::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 180px);
  height: 1px;
  background: #1B1735;
  z-index: 0;
}

.auth-steps__item {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}

.auth-steps__round {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 1px solid #1B1735;
  background: #fff;
  font-size: 20px;
  font-weight: 500;
  color: #1B1735;
}

.auth-steps__txt {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #1B1735;
}

.auth-steps__item.active .auth-steps__round {
  background: #1B1735;
  color: #fff;
}

.auth-steps__item.done .auth-steps__round {
  background: #1B1735;
  color: #fff;
  font-size: 0;
}

.auth-steps__item.done .auth-steps__round::after {
  content: "✓";
  font-size: 16px;
}

/* ── 회원가입: 회원 구분 카드 ── */
.auth-signup-type {
  margin-bottom: 32px;
}

.auth-signup-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
}

.auth-signup-type-card {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
  border: 1px solid #e6e6e6;
  padding: 20px 14px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.auth-signup-type-card:hover {
  border-color: #cfcfcf;
}

.auth-signup-type-card:has(input:checked) {
  border-color: #1B1735;
  box-shadow: 0 0 0 1px #1B1735;
}

.auth-signup-type-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

.auth-signup-type-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  pointer-events: none;
}

.auth-signup-type-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1B1735;
}

.auth-signup-type-card__title {
  font-size: 16px;
  font-weight: 700;
  color: #202020;
}


.auth-general-lead {
  margin: -24px 0 28px;
  font-size: 15px;
  line-height: 1.5;
  color: #525252;
  text-align: center;
}

@media (max-width: 768px) {
  .auth-general-lead {
    margin-top: -12px;
    font-size: 14px;
  }
}

/* ── 약관 섹션 ── */
.auth-terms-section {
  margin-bottom: 32px;
}

.auth-terms-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: #202020;
}

/* 약관 단계: 수신 동의 등 한 블록 안 짧은 안내(체크박스와 중복 문구 방지) */
.auth-terms-lead {
  margin: -4px 0 14px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.55;
}

.auth-scroll-box {
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #f9f9f9;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  max-height: 160px;
  overflow-y: auto;
  font-size: 13px;
  color: #8a8a8a;
  line-height: 1.6;
}

#terms-box.auth-scroll-box,
#privacy-box.auth-scroll-box {
  max-height: 320px;
}

.auth-scroll-box--legal p {
  margin: 0 0 12px;
  color: #525252;
}

.auth-scroll-box--legal p:last-child {
  margin-bottom: 0;
}

.auth-scroll-box--legal strong {
  color: #202020;
  font-weight: 700;
}

.auth-scroll-box--legal a {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-scroll-box--legal a:hover {
  color: #1e40af;
}

.auth-chk-row {
  display: flex;
  align-items: center;
  cursor: pointer;
}

/* 회원가입 등: 체크 항목을 동일한 ‘배열’ 카드 줄로 */
.auth-chk-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-chk-row--array {
  align-items: center;
  margin: 0;
  padding: 5px 0;
}

.auth-chk-row--array:hover {
  border-color: #d4d4d4;
  background: #f5f5f5;
}

/* .auth-chk > span 만 원형 — 접두 (필수)/(선택)은 em.auth-req-inline · em.auth-optional */

.auth-chk-row input[type="checkbox"],
.auth-radio input[type="radio"] {
  display: none;
}

/* 약관 체크·라디오 공통: .auth-chk 안 첫 번째 span = 원 + ::before 점 */
/* flex gap 미사용: em·strong·텍스트가 flex item마다 벌어짐 → 체크 원에만 margin-right */
.auth-chk-row .auth-chk,
.auth-radio .auth-chk {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  color: #8a8a8a;
  user-select: none;
}

@media (max-width: 768px) {
  .auth-chk-row .auth-chk,
  .auth-radio .auth-chk {
    font-size: 14px;
  }
}

.auth-chk-row .auth-chk > span,
.auth-radio .auth-chk > span {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #b8b8b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex-shrink: 0;
  margin-right: 8px;
  transition: border-color 0.2s;
}

.auth-chk-row .auth-chk > span::before,
.auth-radio .auth-chk > span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-radius: 50%;
  background: transparent;
  transition: all 0.2s;
}

.auth-chk-row input:checked + .auth-chk,
.auth-radio input:checked + .auth-chk {
  color: #202020;
}

.auth-chk-row input:checked + .auth-chk > span,
.auth-radio input:checked + .auth-chk > span {
  border-color: #1B1735;
}

.auth-chk-row input:checked + .auth-chk > span::before,
.auth-radio input:checked + .auth-chk > span::before {
  width: 8px;
  height: 8px;
  background: #1B1735;
}

.auth-optional {
  font-style: normal;
  color: #8a8a8a;
  font-weight: 400;
}

/* ── 가입 완료 ── */
.auth-complete {
  text-align: center;
  padding: 40px 0;
}

.auth-complete__icon {
  margin-bottom: 32px;
}

.auth-complete__title {
  font-size: 28px;
  font-weight: 700;
  color: #202020;
  margin: 0 0 16px;
}

@media (max-width: 768px) {
  .auth-complete__title {
    font-size: 22px;
  }
}

.auth-complete__desc {
  font-size: 16px;
  color: #8a8a8a;
  line-height: 1.6;
  margin: 0 0 40px;
}

@media (max-width: 768px) {
  .auth-complete__desc {
    font-size: 14px;
    margin-bottom: 32px;
  }
}

/* ── 폼 섹션 (step2) ── */
.auth-form-section {
  margin-bottom: 40px;
}

.auth-form-section__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #b8b8b8;
  margin-bottom: 24px;
}

.auth-form-section__head h4 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #202020;
}

.auth-postcode-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: stretch;
  width: 100%;
}

.auth-postcode-row .auth-input-box--zip {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
}

.auth-postcode-row .auth-btn-postcode {
  flex-shrink: 0;
  height: 60px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #2d3748;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.auth-postcode-row .auth-btn-postcode:hover {
  background: #2d3748;
}

/* 카카오 우편번호: window.open 팝업은 창 높이와 iframe이 어긋나 하단 여백이 생김 → embed + onresize */
.auth-postcode-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.auth-postcode-modal__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.auth-postcode-modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 500px;
  max-height: min(90dvh, 90vh);
  overflow: hidden;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.28);
}

.auth-postcode-modal__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 10px 14px;
  border-bottom: 1px solid #e8e8e8;
  background: #fff;
}

.auth-postcode-modal__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #202020;
}

.auth-postcode-modal__close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: #f3f4f6;
  cursor: pointer;
  transition: background 0.2s;
}

.auth-postcode-modal__close:hover,
.auth-postcode-modal__close:focus-visible {
  background: #e5e7eb;
  outline: none;
}

.auth-postcode-modal__close img {
  display: block;
  pointer-events: none;
}

.auth-postcode-modal--open {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-postcode-modal__embed {
  flex: 0 0 auto;
  width: 100%;
  height: clamp(380px, calc(90vh - 120px), 465px);
  overflow: hidden;
  box-sizing: border-box;
}

.auth-postcode-modal__embed iframe {
  display: block;
  border: 0;
  margin: 0;
  padding: 0;
  vertical-align: top;
  max-width: 100%;
}

.auth-postcode-modal__embed > div {
  margin: 0;
  padding: 0;
  line-height: 0;
  display: block;
}

@media (max-width: 400px) {
  .auth-postcode-row {
    flex-wrap: wrap;
  }

  .auth-postcode-row .auth-input-box--zip {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .auth-postcode-row .auth-btn-postcode {
    width: 100%;
  }
}

.auth-req-txt {
  font-size: 14px;
  color: #e62e2e;
}

.auth-label.require::after {
  content: " *";
  color: #e62e2e;
}

.auth-field-hint {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #8a8a8a;
}

/* 성명·입력 규칙 등 강조 안내 (회색 힌트와 구분) */
.auth-field-hint--warn {
  color: #e62e2e;
  font-weight: 500;
}

@media (max-width: 768px) {
  .auth-field-hint {
    font-size: 12px;
  }
}

.auth-input-box select {
  display: block;
  width: 100%;
  height: 60px;
  padding: 0 42px 0 24px;
  font-size: 16px;
  font-family: inherit;
  color: #202020;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fff url("/assets/icons/ico_dropdown.svg") no-repeat right 16px center / 18px;
  box-sizing: border-box;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.3s;
}

@media (max-width: 768px) {
  .auth-input-box select {
    height: 52px;
    font-size: 14px;
    padding: 0 36px 0 16px;
  }
}

.auth-input-box select:focus {
  border-color: #1B1735;
}

/* 인풋 + 버튼 행 */
.auth-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.auth-btn-sm {
  flex-shrink: 0;
  height: 60px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #f9f9f9;
  color: #5c5c5c;
  cursor: pointer;
  transition: background 0.2s;
  -webkit-appearance: none;
  appearance: none;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .auth-btn-sm {
    height: 52px;
    padding: 0 14px;
    font-size: 13px;
  }
}

.auth-btn-sm:hover {
  background: #efefef;
}

.auth-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
}

.auth-radio {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.auth-field-hint {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #8a8a8a;
}

.auth-field-hint--before-panel {
  margin-top: 4px;
  margin-bottom: 12px;
}

.auth-consent-text {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.65;
  color: #374151;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fafafa;
  resize: vertical;
  min-height: 160px;
  font-family: inherit;
}

/* 고유식별 동의: 안내 + 질문·선택을 한 박스로 */
.auth-consent-panel {
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.auth-consent-text--panel {
  border: none;
  border-radius: 0;
  border-bottom: 1px solid #e8e8e8;
  min-height: 150px;
  margin: 0;
}

.auth-consent-panel__action {
  padding: 18px 20px 20px;
}

.auth-consent-panel__question {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  line-height: 1.5;
}

.auth-req-inline {
  font-style: normal;
  color: #e11d48;
  font-weight: 700;
}

.auth-radio-row--consent {
  gap: 28px;
}

/* blind */
.blind {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}
