/* ورود و ثبت‌نام پیامکی هومورو — هم‌شکل فرم «ساماندهی مشتریان» */
.hmc-wrap, .hmc-modal {
  --hmc-navy: #0b4a7a;
  --hmc-navy-hover: #083b63;
  --hmc-top: #005382;
  --hmc-bottom: #002947;
  --hmc-text: #13233a;
  --hmc-muted: #6b7280;
  --hmc-label: #4b5563;
  --hmc-border: #d6dbe3;
  --hmc-field: #ffffff;
  --hmc-field-focus: #eef4fc;
  --hmc-ring: rgba(11, 74, 122, .16);
  --hmc-err: #b42318;
  --hmc-err-bg: #fdecec;
  --hmc-ok: #17794a;
  --hmc-ok-bg: #e7f6ee;
  --hmc-info-bg: #eaf2fb;
}

html.hmc-locked, html.hmc-locked body { overflow: hidden !important; }

.hmc-wrap [hidden], .hmc-modal[hidden] { display: none !important; }
.hmc-wrap, .hmc-wrap *, .hmc-wrap *::before, .hmc-wrap *::after { box-sizing: border-box; }

/* ---------- پاپ‌آپ ---------- */
.hmc-modal {
  position: fixed; inset: 0; z-index: 100050;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 72px 16px 32px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  opacity: 0; transition: opacity .2s ease;
}
.hmc-modal.is-open { opacity: 1; }
.hmc-overlay {
  position: fixed; inset: 0;
  background: linear-gradient(180deg, var(--hmc-top) 0%, var(--hmc-bottom) 100%);
  opacity: .97;
}
.hmc-dialog {
  position: relative; width: 100%; max-width: 440px; margin: auto 0;
  transform: translateY(14px); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.hmc-modal.is-open .hmc-dialog { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .hmc-modal, .hmc-dialog { transition: none; }
}

/* ---------- کارت ---------- */
.hmc-wrap { direction: rtl; text-align: right; color: var(--hmc-text); font-family: inherit; }
.hmc-ctx-inline { max-width: 440px; margin: 72px auto 40px; }

.hmc-card {
  position: relative; background: #fff; border-radius: 18px;
  padding: 66px 26px 26px; box-shadow: 0 28px 70px rgba(0, 18, 36, .38);
}
.hmc-ctx-inline .hmc-card { box-shadow: 0 12px 40px rgba(0, 41, 71, .12); border: 1px solid #e6ebf1; }
.hmc-card.hmc-no-logo { padding-top: 32px; }

.hmc-logo {
  position: absolute; top: -48px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 96px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, var(--hmc-top), var(--hmc-bottom));
  box-shadow: 0 14px 30px rgba(0, 41, 71, .35);
}
.hmc-logo img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }

.hmc-wrap .hmc-title {
  margin: 0 0 6px; padding: 0; font-size: 22px; font-weight: 800; line-height: 1.5;
  text-align: center; color: var(--hmc-text); text-transform: none; letter-spacing: 0;
}
.hmc-wrap .hmc-subtitle { margin: 0 0 22px; text-align: center; color: var(--hmc-muted); font-size: 14px; line-height: 1.7; }

.hmc-card form { margin: 0; padding: 0; }
.hmc-wrap .hmc-label { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 500; color: var(--hmc-label); }

.hmc-card input.hmc-input {
  display: block; width: 100%; height: 50px; margin: 0 0 14px; padding: 0 14px;
  border: 1px solid var(--hmc-border); border-radius: 10px; background: var(--hmc-field);
  color: #111827; font-family: inherit; font-size: 16px; line-height: 50px;
  box-shadow: none; outline: none; transition: border-color .15s, box-shadow .15s, background-color .15s;
  -webkit-appearance: none; appearance: none;
}
.hmc-card input.hmc-input:focus {
  border-color: var(--hmc-navy); background: var(--hmc-field-focus);
  box-shadow: 0 0 0 3px var(--hmc-ring);
}
.hmc-card input.hmc-ltr { direction: ltr; text-align: left; }
.hmc-card input.hmc-code {
  direction: ltr; text-align: center; font-size: 24px; font-weight: 700;
  letter-spacing: 10px; padding-left: 24px;
}
.hmc-card input.hmc-code::placeholder { color: #c3cad5; letter-spacing: 8px; }
.hmc-card input.hmc-input::placeholder { color: #a0a8b4; opacity: 1; }

.hmc-row { display: flex; gap: 10px; }
.hmc-field { flex: 1 1 0; min-width: 0; }

/* ---------- دکمه‌ها ---------- */
.hmc-card button.hmc-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 50px; min-height: 50px; margin: 4px 0 0; padding: 0 16px;
  border: 0; border-radius: 10px; background: var(--hmc-navy); color: #fff;
  font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1;
  text-transform: none; letter-spacing: 0; box-shadow: none; cursor: pointer;
  transition: background-color .15s, opacity .15s;
}
.hmc-card button.hmc-btn:hover, .hmc-card button.hmc-btn:focus-visible { background: var(--hmc-navy-hover); filter: brightness(.92); color: #fff; }
.hmc-card button.hmc-btn:focus-visible { outline: 3px solid var(--hmc-ring); outline-offset: 2px; }
.hmc-card button.hmc-btn:disabled { opacity: .65; cursor: not-allowed; }

.hmc-spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: hmc-spin .7s linear infinite;
}
.hmc-btn.is-loading .hmc-spinner { display: inline-block; }
@keyframes hmc-spin { to { transform: rotate(360deg); } }

.hmc-card button.hmc-link {
  display: inline; width: auto; height: auto; min-height: 0; margin: 0; padding: 0;
  border: 0; background: none; box-shadow: none; color: var(--hmc-navy);
  font-family: inherit; font-size: 13px; font-weight: 700; line-height: inherit;
  text-decoration: underline; text-underline-offset: 3px; text-transform: none; letter-spacing: 0; cursor: pointer;
}
.hmc-card button.hmc-link:hover { color: var(--hmc-navy-hover); background: none; }
.hmc-card button.hmc-link:disabled { opacity: .6; cursor: wait; }

.hmc-card button.hmc-close {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; min-height: 0; margin: 0; padding: 0;
  border: 0; border-radius: 50%; background: #f1f4f8; color: #475569; cursor: pointer; box-shadow: none;
}
.hmc-card button.hmc-close:hover { background: #e3e8ef; color: var(--hmc-text); }

/* ---------- پیام‌ها ---------- */
.hmc-msg { margin: -4px 0 12px; padding: 9px 12px; border-radius: 8px; font-size: 13px; line-height: 1.8; }
.hmc-msg.is-error { background: var(--hmc-err-bg); color: var(--hmc-err); }
.hmc-msg.is-success { background: var(--hmc-ok-bg); color: var(--hmc-ok); }
.hmc-msg.is-info { background: var(--hmc-info-bg); color: var(--hmc-navy); }

.hmc-sent {
  margin: 0 0 16px; padding: 10px 12px; border-radius: 10px;
  background: #f3f6fa; color: #374151; font-size: 13.5px; line-height: 1.9;
}
.hmc-phone-show { font-weight: 700; color: var(--hmc-text); unicode-bidi: isolate; }

.hmc-resend-row { margin-top: 14px; min-height: 22px; text-align: center; font-size: 13px; color: var(--hmc-muted); line-height: 1.8; }
.hmc-timer.is-locked { color: var(--hmc-err); }

.hmc-terms { margin-top: 16px; font-size: 12px; line-height: 1.9; text-align: center; color: var(--hmc-muted); }
.hmc-terms a { color: var(--hmc-navy); }

.hmc-wrap .hmc-footer { margin: 18px 0 0; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .75); }
.hmc-ctx-inline .hmc-footer { color: var(--hmc-muted); }

.hmc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 480px) {
  .hmc-modal { padding: 64px 12px 24px; }
  .hmc-card { padding: 62px 18px 20px; }
  .hmc-row { flex-direction: column; gap: 0; }
}

/* ---------- تسویه‌حساب و دکمه‌ها ---------- */
.hmc-checkout-login { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
button.hmc-trigger-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 18px; border: 0; border-radius: 10px;
  background: var(--hmc-navy, #0b4a7a); color: #fff; font-family: inherit; font-size: 14px; font-weight: 700;
  text-transform: none; letter-spacing: 0; cursor: pointer;
}
button.hmc-trigger-btn:hover { filter: brightness(.92); color: #fff; }

/* ---------- پنهان کردن ورود وودمارت ---------- */
.hmc-wd-replace .login-form-side,
.hmc-wd-replace .wd-header-my-account .wd-dropdown-register,
.hmc-wd-replace .wd-dropdown-my-account.wd-dropdown-register { display: none !important; }
