/* ─── 원하타로 Auth 모듈 스타일 ─── */

/* ═══════════════════════════════════════════════════════════════
   모달 베이스 (자급자족)
   이 블록은 wt-auth 가 어떤 페이지에서든 독립적으로 작동하도록
   wt-settings.css 의 .wt-modal 규칙을 병합한 것.
   wt-auth.css + wt-auth.js 두 파일만 로드하면 로그인 모달이
   다른 의존성 없이 동작함.
   ═══════════════════════════════════════════════════════════════ */
.wt-modal{
  position:fixed;
  inset:0;
  z-index:900;
  background:rgba(7,9,15,.78);
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  opacity:0;
  pointer-events:none;
  transition:opacity .25s ease;
}
.wt-modal.open{
  opacity:1;
  pointer-events:auto;
}
.wt-modal-sheet{
  position:relative;
  width:100%;
  max-width:520px;
  max-height:calc(100vh - 32px);
  max-height:calc(100dvh - 32px);
  background:linear-gradient(180deg, var(--navy3,#111628), var(--navy,#07090f));
  border:1px solid rgba(201,165,92,.32);
  border-radius:var(--radius-lg,16px);
  box-shadow:0 32px 80px -24px rgba(0,0,0,.7);
  display:flex;
  flex-direction:column;
  transform:translateY(20px) scale(.98);
  transition:transform .3s cubic-bezier(.4,0,.2,1);
}
.wt-modal.open .wt-modal-sheet{
  transform:translateY(0) scale(1);
}
.wt-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:24px 24px 20px;
  border-bottom:1px solid rgba(201,165,92,.16);
}
.wt-modal-title{
  font-family:'Cormorant Garamond','Noto Serif KR',serif;
  font-size:22px;
  font-weight:600;
  color:var(--gold-lt,#dfc07e);
  letter-spacing:var(--ls-ko-title,-.045em);
  line-height:1.2;
}
.wt-modal-title-en{
  display:block;
  font-family:var(--font-en,'Outfit',sans-serif);
  font-size:10px;
  font-weight:500;
  letter-spacing:var(--ls-en-wider,.4em);
  text-transform:uppercase;
  color:var(--gold-dk,#917540);
  margin-bottom:4px;
}
.wt-modal-close{
  background:transparent;
  border:1px solid rgba(201,165,92,.28);
  color:var(--gold,#c9a55c);
  width:32px;
  height:32px;
  border-radius:50%;
  cursor:pointer;
  font-size:16px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:all .15s;
}
.wt-modal-close:hover{
  background:rgba(201,165,92,.12);
  color:var(--gold-lt,#dfc07e);
}
.wt-modal-body{
  flex:1;
  overflow-y:auto;
  padding:20px 24px 24px;
  -webkit-overflow-scrolling:touch;
}
.wt-modal-foot{
  display:flex;
  gap:10px;
  padding:16px 24px 24px;
  border-top:1px solid rgba(201,165,92,.16);
}

/* 모바일: 바텀시트 스타일 */
@media (max-width:480px){
  .wt-modal{
    height:100dvh;
    overflow:hidden;
    padding:0;
    /* 바텀시트 대신 풀스크린 */
    align-items:stretch;
    justify-content:stretch;
  }
  .wt-modal-sheet{
    max-width:none;
    max-height:none;
    width:100%;
    height:100%;
    border-radius:0;
    border:none;
    /* 등장 애니메이션: 아래에서 올라오는 대신 페이드인 */
    transform:none;
    opacity:0;
    transition:opacity .25s ease;
  }
  .wt-modal.open .wt-modal-sheet{
    transform:none;
    opacity:1;
  }
  .wt-modal-head{ padding:20px 20px 16px; }
  .wt-modal-body{ padding:16px 20px 20px; }
  .wt-modal-foot{ padding:14px 20px 20px; }
}

/* ═══════════════════════════════════════════════════════════════ */

/* 툴바 로그인 버튼 (로그인 상태 표시) */
.wt-toolbar-btn-auth.logged-in{
  border-color:rgba(201,165,92,.55);
  background:rgba(201,165,92,.12);
  color:var(--gold-lt);
}
.wt-toolbar-btn-auth.logged-in::before{
  content:'✦';
  display:inline-block;
  margin-right:5px;
  font-size:9px;
  color:var(--gold);
  vertical-align:baseline;
}

/* ─── 로그인 모달 전용 요소 ─── */
.wt-auth-lead{
  font-size:13px;
  color:var(--body);
  line-height:1.7;
  margin:0 0 22px;
}

.wt-auth-field{
  margin-bottom:16px;
}
.wt-auth-label{
  display:block;
  font-family:var(--font-en);
  font-size:10px;
  letter-spacing:var(--ls-en-wider);
  text-transform:uppercase;
  color:var(--gold-dk);
  margin-bottom:8px;
  font-weight:500;
}
.wt-auth-input{
  width:100%;
  box-sizing:border-box;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(201,165,92,.2);
  border-radius:10px;
  padding:13px 16px;
  color:var(--white);
  font-family:var(--font-ko);
  font-size:14px;
  letter-spacing:.01em;
  outline:none;
  transition:all .2s;
}
.wt-auth-input:focus{
  border-color:rgba(201,165,92,.55);
  background:rgba(255,255,255,.05);
}
.wt-auth-input::placeholder{
  color:var(--muted);
  opacity:.55;
}
.wt-auth-input:disabled{
  opacity:.55;
  cursor:not-allowed;
}

/* 제출 버튼 */
.wt-auth-submit{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  box-sizing:border-box;
  background:transparent;
  border:1px solid rgba(201,165,92,.22);
  border-radius:10px;
  padding:13px 20px;
  color:var(--gold);
  font-family:var(--font-ko);
  font-size:13px;
  font-weight:500;
  letter-spacing:var(--ls-ko-title);
  cursor:pointer;
  transition:all .2s;
}
.wt-auth-submit:hover:not(:disabled){
  border-color:rgba(201,165,92,.45);
  background:rgba(201,165,92,.04);
  color:var(--gold-lt);
}
.wt-auth-submit:disabled{
  opacity:.4;
  cursor:not-allowed;
}
.wt-auth-submit .spark{
  font-size:10px;
  color:var(--gold);
  opacity:.6;
}

.wt-auth-submit-ghost{
  background:transparent;
  border-color:rgba(201,122,106,.35);
  color:#d4938a;
}
.wt-auth-submit-ghost:hover:not(:disabled){
  background:rgba(201,122,106,.08);
  border-color:rgba(201,122,106,.55);
  color:#e5a79d;
}

/* 상태 메시지 */
.wt-auth-status{
  min-height:20px;
  font-size:12px;
  color:var(--muted);
  text-align:center;
  line-height:1.6;
  margin:14px 0 0;
  padding:0 4px;
}
.wt-auth-status-ok{
  color:var(--gold-lt);
  background:rgba(201,165,92,.06);
  border:1px solid rgba(201,165,92,.2);
  border-radius:10px;
  padding:12px 14px;
  font-size:12px;
  line-height:1.7;
  text-align:left;
}
.wt-auth-status-ok b{
  display:block;
  color:var(--white);
  margin-bottom:4px;
}
.wt-auth-status-err{
  color:#d4938a;
  font-weight:500;
}

/* 혜택 안내 */
.wt-auth-benefits{
  margin-top:22px;
  padding-top:18px;
  border-top:1px solid rgba(201,165,92,.1);
  display:flex;
  flex-direction:column;
  gap:8px;
}
.wt-auth-benefit{
  font-size:11.5px;
  color:var(--body);
  line-height:1.6;
  padding-left:16px;
  position:relative;
}
.wt-auth-benefit::before{
  content:'✦';
  position:absolute;
  left:0;
  top:1px;
  font-size:9px;
  color:var(--gold-dk);
  opacity:.7;
}

/* 약관 고지 */
.wt-auth-legal{
  font-size:10.5px;
  color:var(--muted);
  text-align:center;
  line-height:1.7;
  margin:18px 0 0;
  padding-top:14px;
  border-top:1px solid rgba(201,165,92,.06);
}
.wt-auth-legal a{
  color:var(--gold-dk);
  text-decoration:underline;
  text-underline-offset:2px;
}
.wt-auth-legal a:hover{
  color:var(--gold-lt);
}

/* ─── 계정 모달 전용 요소 ─── */
.wt-account-info{
  background:rgba(201,165,92,.04);
  border:1px solid rgba(201,165,92,.12);
  border-radius:10px;
  padding:16px 18px;
  margin-bottom:18px;
}
.wt-account-label{
  font-family:var(--font-en);
  font-size:10px;
  letter-spacing:var(--ls-en-wider);
  text-transform:uppercase;
  color:var(--gold-dk);
  margin:0 0 6px;
  font-weight:500;
}
.wt-account-email{
  font-family:var(--font-ko);
  font-size:15px;
  color:var(--white);
  margin:0;
  word-break:break-all;
  font-weight:600;
  letter-spacing:var(--ls-ko-title);
}

/* ─── OTP 로그인 2단계 UI ─── */
.wt-auth-step{
  animation:wtAuthFade .3s ease;
}
@keyframes wtAuthFade{
  from{opacity:0;transform:translateY(6px)}
  to{opacity:1;transform:translateY(0)}
}

.wt-auth-otp-input{
  text-align:center;
  font-family:'Cormorant Garamond','Noto Sans Mono',monospace;
  font-size:22px;
  letter-spacing:.5em;
  font-weight:600;
  padding-left:26px;
  padding-right:0;
}
.wt-auth-otp-input::placeholder{
  letter-spacing:.35em;
  opacity:.35;
}

.wt-auth-divider{
  display:flex;
  align-items:center;
  gap:12px;
  margin:22px 0 16px;
}

/* ─── 카카오 로그인 버튼 ─── */
.wt-kakao-btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:13px 16px;
  background:#fee500;
  color:#181600;
  border:none;
  border-radius:10px;
  font-family:'Pretendard',sans-serif;
  font-size:14px;
  font-weight:700;
  letter-spacing:-0.02em;
  cursor:pointer;
  transition:filter .15s, transform .1s;
  margin-bottom:0;
}
.wt-kakao-btn:hover:not(:disabled){
  filter:brightness(0.96);
}
.wt-kakao-btn:active:not(:disabled){
  transform:scale(0.98);
}
.wt-kakao-btn:disabled{
  opacity:0.6;
  cursor:wait;
}
.wt-kakao-btn svg{
  flex-shrink:0;
}

/* ─── 마케팅 동의 체크박스 (이메일 가입 화면) ─── */
.wt-auth-checkbox{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 2px;
  cursor:pointer;
  margin-bottom:8px;
  user-select:none;
}
.wt-auth-checkbox input[type="checkbox"]{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.wt-auth-checkbox-mark{
  flex-shrink:0;
  width:16px;
  height:16px;
  margin-top:2px;
  border:1px solid rgba(201,165,92,.35);
  border-radius:4px;
  background:transparent;
  position:relative;
  transition:all .2s;
}
.wt-auth-checkbox input[type="checkbox"]:checked + .wt-auth-checkbox-mark{
  background:var(--gold, #c9a55c);
  border-color:var(--gold, #c9a55c);
}
.wt-auth-checkbox input[type="checkbox"]:checked + .wt-auth-checkbox-mark::after{
  content:'';
  position:absolute;
  top:1px;
  left:4px;
  width:5px;
  height:9px;
  border:solid #181600;
  border-width:0 1.5px 1.5px 0;
  transform:rotate(45deg);
}
.wt-auth-checkbox-text{
  font-size:11.5px;
  color:var(--body, #c8c8d0);
  line-height:1.5;
  letter-spacing:-.01em;
}
.wt-auth-checkbox:hover .wt-auth-checkbox-mark{
  border-color:var(--gold, #c9a55c);
}

/* ─── 마이 페이지 모달 (계정 모달 확장) ─── */
.wt-mypage-sheet{
  max-width:480px;
}
.wt-mypage-section{
  margin-bottom:24px;
  padding-bottom:20px;
  border-bottom:1px solid rgba(201,165,92,.08);
}
.wt-mypage-section:last-of-type{
  border-bottom:none;
}
.wt-mypage-label{
  font-family:var(--font-en);
  font-size:10px;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--gold);
  font-weight:600;
  margin-bottom:10px;
}
.wt-account-email{
  font-size:14px;
  color:var(--white);
  font-weight:500;
  letter-spacing:-.01em;
  margin-bottom:4px;
  word-break:break-all;
}
.wt-mypage-meta{
  font-size:11.5px;
  color:var(--muted);
  letter-spacing:-.01em;
}

/* 통계 카드 3분할 */
.wt-mypage-stats{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:8px;
}
.wt-mypage-stat{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:14px 8px;
  border:1px solid rgba(201,165,92,.12);
  border-radius:10px;
  background:rgba(201,165,92,.03);
  text-align:center;
}
.wt-mypage-stat-num{
  font-family:'Cormorant Garamond',serif;
  font-size:22px;
  font-weight:600;
  color:var(--gold-lt);
  letter-spacing:-.02em;
  line-height:1.2;
  margin-bottom:4px;
}
.wt-mypage-stat-label{
  font-size:10.5px;
  color:var(--muted);
  letter-spacing:-.01em;
  font-weight:400;
}

/* 보유 혜택 */
.wt-mypage-credits{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.wt-mypage-credit-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 14px;
  border:1px solid rgba(201,165,92,.12);
  border-radius:8px;
  background:rgba(201,165,92,.02);
}
.wt-mypage-credit-name{
  font-size:12.5px;
  color:var(--body);
  letter-spacing:-.01em;
}
.wt-mypage-credit-value{
  font-size:11.5px;
  color:var(--gold);
  font-weight:500;
  letter-spacing:-.01em;
}

/* 빠른 이동 */
.wt-mypage-links{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.wt-mypage-link{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 14px;
  border:1px solid rgba(201,165,92,.1);
  border-radius:8px;
  background:transparent;
  color:var(--body);
  font-size:13px;
  text-decoration:none;
  letter-spacing:-.01em;
  transition:all .2s;
}
.wt-mypage-link:hover{
  border-color:rgba(201,165,92,.3);
  background:rgba(201,165,92,.04);
  color:var(--gold-lt);
}
.wt-mypage-link svg{
  color:var(--gold);
  opacity:.5;
  flex-shrink:0;
}
.wt-mypage-link:hover svg{
  opacity:.9;
}

/* 마케팅 토글 (마이페이지 안에서 사용) */
.wt-mypage-section .wt-account-toggle{
  margin-bottom:0;
}
.wt-mypage-section .wt-account-marketing-status{
  margin-left:48px;
  margin-top:8px;
}
.wt-account-section{
  margin-top:20px;
  padding-top:20px;
  border-top:1px solid rgba(201,165,92,.1);
}
.wt-account-section-title{
  font-family:var(--font-en);
  font-size:10px;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--gold);
  margin-bottom:12px;
  font-weight:600;
}
.wt-account-toggle{
  display:flex;
  align-items:flex-start;
  gap:12px;
  cursor:pointer;
  padding:8px 0;
  user-select:none;
}
.wt-account-toggle input[type="checkbox"]{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.wt-account-toggle-track{
  flex-shrink:0;
  width:36px;
  height:20px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(201,165,92,.2);
  border-radius:999px;
  position:relative;
  transition:background .2s, border-color .2s;
  margin-top:2px;
}
.wt-account-toggle-thumb{
  position:absolute;
  top:1px;
  left:1px;
  width:16px;
  height:16px;
  background:var(--muted, #888);
  border-radius:50%;
  transition:left .2s, background .2s;
}
.wt-account-toggle input[type="checkbox"]:checked + .wt-account-toggle-track{
  background:rgba(201,165,92,.25);
  border-color:var(--gold, #c9a55c);
}
.wt-account-toggle input[type="checkbox"]:checked + .wt-account-toggle-track .wt-account-toggle-thumb{
  left:17px;
  background:var(--gold, #c9a55c);
}
.wt-account-toggle input[type="checkbox"]:disabled + .wt-account-toggle-track{
  opacity:.5;
  cursor:wait;
}
.wt-account-toggle-text{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.wt-account-toggle-text b{
  font-size:13px;
  font-weight:600;
  color:var(--body, #c8c8d0);
  letter-spacing:-.01em;
}
.wt-account-toggle-desc{
  font-size:11px;
  color:var(--muted);
  line-height:1.5;
  letter-spacing:-.01em;
}
.wt-account-marketing-status{
  font-size:11px;
  margin-top:8px;
  margin-left:48px;
  min-height:14px;
}
.wt-account-marketing-status.ok{
  color:var(--gold);
}
.wt-account-marketing-status.err{
  color:#d4938a;
}
.wt-auth-divider::before,
.wt-auth-divider::after{
  content:'';
  flex:1;
  height:1px;
  background:rgba(201,165,92,.12);
}
.wt-auth-divider span{
  font-family:var(--font-en);
  font-size:10px;
  letter-spacing:var(--ls-en-wider);
  text-transform:uppercase;
  color:var(--muted);
  opacity:.7;
}

.wt-auth-alt-hint{
  font-size:11.5px;
  color:var(--body);
  line-height:1.7;
  text-align:center;
  margin:0 0 18px;
  padding:12px 14px;
  background:rgba(201,165,92,.03);
  border:1px solid rgba(201,165,92,.1);
  border-radius:10px;
}
.wt-auth-alt-hint b{
  color:var(--gold-lt);
}

.wt-auth-back{
  display:block;
  width:100%;
  background:transparent;
  border:none;
  color:var(--muted);
  font-family:var(--font-ko);
  font-size:12px;
  padding:10px;
  cursor:pointer;
  margin-top:4px;
  transition:color .2s;
}
.wt-auth-back:hover{
  color:var(--gold-lt);
}
