/* OTP Dialog ? brand: #009cea / #016db6 */
.otp-overlay {
  --otp-primary: #009cea;
  --otp-primary-dark: #016db6;
  --otp-text: #222;
  --otp-sub: #777;
  --otp-border: #d9d9d9;
  --otp-error: #d93025;

  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .4);
  font-family: 'Pretendard', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}
.otp-overlay[hidden] { display: none; }

/* step: hidden attribute must not show the section (CSS fallback) */
.otp-step[hidden] { display: none !important; }

.otp-dialog {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 28px 24px 24px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
  color: var(--otp-text);
}

.otp-close {
  position: absolute;
  top: 10px; right: 12px;
  width: 28px; height: 28px;
  border: 0; background: none;
  font-size: 22px; line-height: 1;
  color: #999; cursor: pointer;
}
.otp-close:hover { color: var(--otp-text); }

.otp-title { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.otp-desc  { margin: 0 0 20px; font-size: 13px; line-height: 1.5; color: var(--otp-sub); }

/* form */
.otp-label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--otp-sub); }
.otp-input {
  width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid var(--otp-border); border-radius: 4px;
  font-size: 15px; color: var(--otp-text); background: #fff;
  box-sizing: border-box; outline: none;
}
.otp-input:focus { border-color: var(--otp-primary); }
.otp-input.is-error { border-color: var(--otp-error); }

.otp-input-wrap { position: relative; }
.otp-input-wrap .otp-input { padding-right: 60px; }
.otp-timer {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
  font-size: 13px; color: var(--otp-error);
  font-variant-numeric: tabular-nums;
}

.otp-msg { min-height: 18px; margin: 6px 0 0; font-size: 12px; color: var(--otp-error); }

/* warning box (phone step) */
.otp-warn {
  margin: 10px 0 0; padding: 10px 12px;
  background: #fff8e6;
  border: 1px solid #f0d08a;
  border-left: 3px solid #e8a100;
  border-radius: 4px;
}
.otp-warn strong {
  display: block; font-size: 13px; font-weight: 700; color: #8a5a00;
  line-height: 1.5; margin-bottom: 4px;
}
.otp-warn p {
  margin: 0; font-size: 12px; color: #8a5a00; line-height: 1.5;
}

/* MENU: ��ǥ�� ��ȣ */
.otp-phone {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 12px; border: 1px solid var(--otp-border); border-radius: 4px;
}
.otp-phone__label  { font-size: 13px; color: var(--otp-sub); }
.otp-phone__number { font-size: 15px; }
.otp-hint { margin: 14px 0 0; font-size: 14px; }

/* code step */
.otp-sent { margin: 0 0 14px; font-size: 13px; color: var(--otp-sub); }
.otp-sent b { color: var(--otp-text); font-weight: 600; }
.otp-session { margin: 4px 0 0; font-size: 12px; color: var(--otp-sub); }
.otp-session span { font-variant-numeric: tabular-nums; }

/* buttons */
.otp-actions { display: flex; gap: 8px; margin-top: 20px; }
.otp-btn {
  flex: 1; height: 44px; border-radius: 4px;
  font-size: 14px; cursor: pointer;
}
.otp-btn:disabled { opacity: .5; cursor: not-allowed; }
.otp-btn--primary { color: #fff; background: var(--otp-primary); border: 1px solid var(--otp-primary); }
.otp-btn--primary:hover:not(:disabled) { background: var(--otp-primary-dark); border-color: var(--otp-primary-dark); }
.otp-btn--ghost { color: var(--otp-text); background: #fff; border: 1px solid var(--otp-border); }
.otp-btn--ghost:hover:not(:disabled) { background: #f7f7f7; }

/* expired */
.otp-expired { margin: 0; font-size: 14px; line-height: 1.6; color: var(--otp-text); }

@media (max-width: 480px) {
  .otp-dialog { padding: 24px 18px 18px; }
}
