/* ==========================================================================
   Medical Forms — استایل پایه
   
   همه رنگ‌ها و اندازه‌ها از پنل المنتور قابل تغییرند؛ این فایل فقط
   ساختار و یک ظاهر پیش‌فرض معقول می‌دهد.
   ========================================================================== */

.mf-wrap { direction: rtl; text-align: right; }

.mf-form { margin: 0; }

/* شبکه فیلدها — ۶ ستونی تا عرض‌های ۱/۲ و ۱/۳ هر دو ممکن باشد */
.mf-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  column-gap: 14px;
  row-gap: 14px;
}
.mf-w100 { grid-column: span 6; }
.mf-w66  { grid-column: span 4; }
.mf-w50  { grid-column: span 3; }
.mf-w33  { grid-column: span 2; }

.mf-field { min-width: 0; }

.mf-field > label {
  display: block;
  margin-bottom: 7px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.8;
}
.mf-req { color: #C0392B; }

.mf-field input[type="text"],
.mf-field input[type="tel"],
.mf-field input[type="email"],
.mf-field input[type="number"],
.mf-field input[type="date"],
.mf-field select,
.mf-field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.8;
  direction: rtl;
  text-align: right;
  transition: border-color .18s ease, background-color .18s ease;
}

.mf-field ::placeholder { text-align: right; opacity: .75; }

/*
 * تلفن و ایمیل: تا وقتی خالی‌اند راهنما راست‌چین فارسی است،
 * به‌محض تایپ به چپ‌چین لاتین تغییر می‌کنند.
 */
.mf-field input[type="tel"]:not(:placeholder-shown),
.mf-field input[type="email"]:not(:placeholder-shown) {
  direction: ltr;
  text-align: left;
}

.mf-field textarea { resize: vertical; min-height: 96px; }

.mf-field input:focus,
.mf-field select:focus,
.mf-field textarea:focus {
  outline: 1px solid currentColor;
  outline-offset: -1px;
}

/* تیک تأیید */
.mf-check {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  font-weight: 400 !important;
}
.mf-check input { width: auto !important; margin-top: 4px; flex: 0 0 auto; }
.mf-check span { font-size: 13.5px; line-height: 1.9; }

/* تله اسپم — از دید کاربر و صفحه‌خوان پنهان */
.mf-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* دکمه */
.mf-actions { display: flex; margin-top: 16px; }
.mf-actions-full { display: block; }

.mf-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 34px;
  border: 0;
  border-radius: 8px;
  background: #0F7BAF;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.mf-actions-full .mf-submit { width: 100%; }
.mf-submit:hover { background: #0A6390; }
.mf-submit svg { width: 1em; height: 1em; fill: currentColor; }

/* پیام‌ها */
.mf-msg {
  margin: 0 0 16px;
  padding: 13px 16px;
  border: 1px solid;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.95;
}
.mf-msg-ok  { background: rgba(46, 158, 91, .1);  border-color: rgba(46, 158, 91, .45);  color: #1E7B45; }
.mf-msg-err { background: rgba(192, 57, 43, .08); border-color: rgba(192, 57, 43, .38); color: #A5322A; }

.mf-note { margin: 12px 0 0; font-size: 12px; line-height: 1.9; opacity: .85; }

/* واکنش‌گرایی */
@media (max-width: 1024px) {
  .mf-w33 { grid-column: span 3; }
}

@media (max-width: 767px) {
  .mf-grid { grid-template-columns: 1fr; }
  .mf-w100, .mf-w66, .mf-w50, .mf-w33 { grid-column: span 1; }
  .mf-actions { display: block; }
  .mf-submit { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .mf-field input, .mf-field select, .mf-field textarea, .mf-submit { transition: none; }
}
