/*!
 * zh-login.css: ظاهر صفحه ورود پینوا هماهنگ با مودال ورود زی‌هوم (Header.jsx)
 * این فایل بعد از style.css پینوا لود می‌شود و فقط ظاهر را تغییر می‌دهد.
 */

@font-face {
  font-family: 'IranYekan';
  src: url('../fonts/iranyekan-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IranYekan';
  src: url('../fonts/iranyekan-bold.woff2') format('woff2');
  font-weight: 600 700;
  font-display: swap;
}

:root {
  --zh-primary: #DC2655;
  --zh-primary-hover: #B01E43;
  --zh-text: #292C2D;
  --zh-text-2: #3E4344;
  --zh-muted: #676F71;
  --zh-placeholder: #A4A9AA;
  --zh-border: #E1E2E3;
  --zh-bg: #F0F1F1;
  --zh-error: #D92D20;
}

html,
body.pinova-container {
  background: var(--zh-bg);
  font-family: 'IranYekan', Tahoma, sans-serif;
  color: var(--zh-text);
}

body.pinova-container {
  margin: 0;
  min-height: 100vh;
}

/* ---------- برند بالای فرم ---------- */
.zh-login-brand {
  text-align: center;
  padding: 32px 16px 0;
  color: var(--zh-text-2);
}
.zh-login-brand__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.zh-login-brand h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 400;
  color: var(--zh-text-2);
}
.zh-login-brand img {
  height: 32px;
  width: auto;
}
.zh-login-brand p {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--zh-text-2);
}
@media (min-width: 640px) {
  .zh-login-brand h2 { font-size: 28px; }
  .zh-login-brand img { height: 40px; }
  .zh-login-brand p { font-size: 14px; }
}
@media (min-width: 1024px) {
  .zh-login-brand h2 { font-size: 32px; }
  .zh-login-brand img { height: auto; }
}

/* ---------- بدنه و کادر ---------- */
body.pinova-container section {
  padding: 0 16px;
}
body.pinova-container section .container {
  max-width: 100%;
  padding: 0;
  margin: 0;
}
body.pinova-container .min-h-screen {
  min-height: auto !important;
  align-items: flex-start !important;
  padding-top: 24px !important;
  padding-bottom: 40px !important;
}

.zh-login-card {
  width: 100% !important;
  max-width: 448px !important;
  margin: 0 auto !important;
  background: #fff;
  border: 0 !important;
  border-radius: 16px !important;
  box-shadow: none;
  padding: 20px !important;
  overflow: visible !important;
}
@media (min-width: 640px) {
  .zh-login-card { padding: 24px !important; }
}
@media (min-width: 1024px) {
  .zh-login-card { padding: 32px !important; }
}

/* لوگوی پیش‌فرض پینوا حذف می‌شود؛ جای آن برند زی‌هوم نشان داده می‌شود */
.zh-login-card > .relative.mb-8 {
  margin-bottom: 0;
  min-height: 24px;
}
.zh-login-card > .relative > .text-center {
  display: none;
}

/* ---------- تیتر و متن‌ها ---------- */
.zh-login-card .font-semibold.text-base {
  font-size: 16px;
  font-weight: 600;
  color: var(--zh-text);
  margin-bottom: 20px !important;
}
.zh-login-card .font-normal {
  font-size: 13px;
  line-height: 1.9;
  color: var(--zh-muted);
}
@media (min-width: 640px) {
  .zh-login-card .font-normal { font-size: 14px; }
}
.zh-login-card .text-error-500 {
  color: var(--zh-error) !important;
  font-size: 12px;
}

/* ---------- ورودی‌ها ---------- */
.zh-login-card input[type="text"],
.zh-login-card input[type="password"] {
  width: 100%;
  font-size: 13px;
  color: var(--zh-text);
  background: #fff;
  border: 1px solid var(--zh-border) !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease;
}
@media (min-width: 640px) {
  .zh-login-card input[type="text"],
  .zh-login-card input[type="password"] { font-size: 14px; }
}
.zh-login-card input::placeholder {
  color: var(--zh-placeholder);
}
.zh-login-card input:focus {
  outline: none;
  border-color: var(--zh-primary) !important;
}
.zh-login-card input[name="username"],
.zh-login-card input[type="password"] {
  text-align: right;
  direction: rtl;
}

/* کد یک‌بارمصرف: ورودی با حروف جداشده، شبیه کادرهای OTP مودال */
.zh-login-card input[autocomplete="one-time-code"] {
  height: 56px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 14px;
  text-align: center;
  text-indent: 14px; /* جبران فاصله‌ی حروف در انتها */
  direction: ltr;
  color: var(--zh-text);
  border: 1px solid var(--zh-text) !important;
  border-radius: 8px !important;
}
.zh-login-card input[autocomplete="one-time-code"]:focus {
  border-color: var(--zh-primary) !important;
}

/* ---------- دکمه‌ها و لینک‌ها ---------- */
.zh-login-card .bg-primary-500 {
  background-color: var(--zh-primary) !important;
  color: #fff;
  border: 0;
  border-radius: 12px !important;
  padding: 12px !important;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}
.zh-login-card .bg-primary-500:hover,
.zh-login-card .hover\:bg-primary-600:hover {
  background-color: var(--zh-primary-hover) !important;
}
.zh-login-card button.border {
  border-color: var(--zh-border) !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-size: 13px;
  color: var(--zh-text-2) !important;
}
.zh-login-card button.border:hover {
  background: #F7F7F8 !important;
}
.zh-login-card .text-primary-500 {
  color: var(--zh-primary) !important;
}
.zh-login-card .hover\:text-primary-600:hover,
.zh-login-card .text-primary-600 {
  color: var(--zh-primary-hover) !important;
}
.zh-login-card .text-gray-700 {
  color: var(--zh-text-2) !important;
}

/* متن شرایط پایین فرم، مثل مودال زی‌هوم */
#signIn > div:last-child {
  font-size: 12px;
  line-height: 1.9;
  color: var(--zh-muted);
  text-align: center;
  margin-top: 16px;
}

/* ---------- مودال ورود (روی همه‌ی صفحات مهمان، از دکمه‌ی هدر باز می‌شود) ---------- */
.zh-login-modal {
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  font-family: 'IranYekan', Tahoma, sans-serif;
  color: var(--zh-text);
}
@media (min-width: 640px) {
  .zh-login-modal { gap: 24px; }
}
.zh-login-modal__overlay {
  background-color: rgba(225, 226, 227, 0.42) !important;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.zh-login-modal .zh-login-brand {
  padding: 0;
}
.zh-login-card > button.absolute {
  top: 16px !important;
  left: 16px !important;
  color: var(--zh-text-2);
}
@media (min-width: 640px) {
  .zh-login-card > button.absolute { top: 24px !important; left: 24px !important; }
}
.zh-login-terms {
  font-size: 12px;
  line-height: 1.9;
  color: var(--zh-muted);
  text-align: center;
  margin-top: 16px;
}
.zh-login-terms span {
  color: var(--zh-primary);
}

/* ---------- تکمیل خودکار مرورگر: زمینه‌ی صورتی کم‌رنگ تم به‌جای زرد پیش‌فرض ---------- */
.zh-login-card input:-webkit-autofill,
.zh-login-card input:-webkit-autofill:hover,
.zh-login-card input:-webkit-autofill:focus,
.zh-login-card input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #FDF2F6 inset !important;
  box-shadow: 0 0 0 1000px #FDF2F6 inset !important;
  -webkit-text-fill-color: var(--zh-text) !important;
  caret-color: var(--zh-text);
  transition: background-color 9999s ease-out 0s;
}