/* public/css/login.css - استایل اختصاصی صفحات ورود و OTP (بدون مدال PWA) */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100dvh;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  touch-action: manipulation;
  direction: rtl;
  overscroll-behavior: none;
  background: #fff;
}

body {
  font-family: "Vazirmatn", sans-serif;
  font-weight: 400;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  color: #333;
  height: 100%;
  -webkit-touch-callout: none;
  -webkit-user-select: text;
  user-select: text;
  -webkit-appearance: none;
  appearance: none;
}

/* تایپوگرافی */
h1 { 
  color: #333; 
  text-align: right; 
  width: 100%; 
  max-width: 400px; 
  margin: 30px 0 10px;
  font-size: 32px;
  font-weight: 600;
}

p.right-align {
  color: #696d71;
  text-align: right;
  width: 100%; 
  max-width: 400px; 
  margin-top: 10px;
  font-size: 14px;
}

p.center-align {
  color: #696d71;
  text-align: center;
  width: 100%;
  max-width: 400px;
  margin-top: 10px;
  font-size: 14px;
}

/* فرم‌ها و ورودی‌ها */
form#login-form {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 15px; /* فاصله بین فیلدها */
  margin-top: 20px;
}

input {
  width: 100%;
  padding: 16px 14px;
  font-size: 16px;
  border: 1px solid #696d71;
  border-radius: 5px;
  box-sizing: border-box;
  outline: none;
  color: #333;
  background: #fff;
  font-family: inherit;
  transition: border-color 0.2s;
}

input:focus {
  border-color: #007bff;
  background: white;
}

/* دکمه مربعی */
button#submit-btn, button#verify-btn {
  background: #696d71;
  color: #fff;
  border: none;
  padding: 0;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
  width: 50px;
  height: 50px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end; /* تراز به چپ (در RTL) */
  transition: background-color 0.3s;
}

button.active {
  background: #307fe2 !important;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* استایل‌های صفحه OTP */
.otp-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  direction: ltr; /* برای چیدمان صحیح چپ به راست */
  width: 100%;
  max-width: 400px;
  gap: 8px;
}

.otp-container input {
  width: 50px;
  height: 50px;
  text-align: center;
  padding: 0;
  font-size: 22px;
  border-radius: 5px;
}

#phone-display {
  direction: ltr;
  display: inline-block;
  font-weight: bold;
}

.resend, .timer {
  text-align: center;
  width: 100%;
  max-width: 400px;
  margin-top: 15px;
  font-size: 14px;
}

.resend {
  color: #007bff;
  cursor: pointer;
  text-decoration: none;
}

.timer {
  color: #666;
}

a {
  color: #0051ff;
  text-decoration: none;
}

/* ریسپانسیو موبایل */
@media (max-width: 600px) {
  body { padding: 16px; }
  h1 { font-size: 24px; margin-top: 20px; }
  
  .otp-container input {
    width: 40px; height: 45px; font-size: 20px;
  }
}