/**
 * ضبط أحجام النصوص والحقول والصور على الهواتف.
 * يُحمَّل بعد ملف CSS الخاص بكل صفحة.
 */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  padding-bottom: 60px !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.top-header, .login-header, .msg-top, .logo-wrap {
  background: transparent !important;
}

/* ───────────────────────────────────────────
   🎨  Global Form Enhancements — Premium
   ─────────────────────────────────────────── */

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea {
  border: 1.8px solid #c9d1da !important;
  border-radius: 14px !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease !important;
  box-shadow: 0 2px 6px rgba(0, 75, 152, 0.04) !important;
  background: #fafbfd !important;
  font-family: inherit !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #004b98 !important;
  box-shadow: 0 0 0 4px rgba(0, 75, 152, 0.12), 0 4px 12px rgba(0, 75, 152, 0.06) !important;
  outline: none !important;
  background: #fff !important;
}

label {
  color: #004b98 !important;
  font-weight: 700 !important;
}

/* ── Premium Buttons ── */
.btn, .login-btn, .otp-btn, .otp2-submit, .msg-submit {
  border-radius: 50px !important;
  border: none !important;
  letter-spacing: 0.3px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 6px 20px rgba(0, 75, 152, 0.25), 0 2px 6px rgba(0, 75, 152, 0.12) !important;
  background: linear-gradient(135deg, #004b98 0%, #003a78 50%, #00336a 100%) !important;
  position: relative !important;
  overflow: hidden !important;
}

.btn:active, .login-btn:active, .otp-btn:active, .otp2-submit:active, .msg-submit:active {
  transform: scale(0.97) !important;
  box-shadow: 0 3px 10px rgba(0, 75, 152, 0.25) !important;
}

/* ── Footer — Premium ── */
.footer {
  background: linear-gradient(135deg, #004b98 0%, #003a78 100%) !important;
  border-top: 4px solid #b4975a !important;
  text-align: center !important;
  padding: 22px 18px !important;
  margin-top: 30px !important;
  width: 100% !important;
}

.footer-text, .footer__text {
  color: #fff !important;
  font-size: clamp(13px, 3.3vw, 16px) !important;
  line-height: 1.55 !important;
  font-weight: 600 !important;
  opacity: 0.92;
}

/* ═══════════════════════════════════════════
   📱 Mobile ≤ 640 px
   ═══════════════════════════════════════════ */
@media (max-width: 640px) {
  body {
    padding-left: max(0px, env(safe-area-inset-left, 0));
    padding-right: max(0px, env(safe-area-inset-right, 0));
  }

  img,
  video {
    max-width: 100%;
    height: auto;
  }

  .top-logo,
  .login-logo,
  .msg-logo,
  .logo {
    width: min(120px, 32vw) !important;
    max-width: 120px;
    border-radius: 50% !important;
    object-fit: cover !important;
    aspect-ratio: 1/1 !important;
    background: transparent !important;
    box-shadow: 0 4px 16px rgba(0, 75, 152, 0.1) !important;
  }

  /* ── Titles ── */
  .login-title,
  .title,
  .otp-title,
  .msg-heading,
  .hero-banner__title,
  .hero-banner__line,
  .card__title,
  .wait-title,
  .otp2-heading {
    font-size: clamp(1.1rem, 5vw, 1.4rem) !important;
    line-height: 1.35;
  }

  /* ── Body text ── */
  .login-subtitle,
  .login-note,
  .hero-banner__subtitle,
  .card__desc,
  .wait-text,
  .otp-text,
  .otp2-lead,
  .note,
  .notice,
  .footer__text,
  .footer-text,
  .legal {
    font-size: clamp(0.88rem, 3.6vw, 1.02rem) !important;
    line-height: 1.55;
  }

  /* ── Labels ── */
  .field-label,
  .field label,
  .otp-label,
  .msg-label,
  .triple-labels {
    font-size: 0.95rem !important;
    margin-bottom: 6px !important;
  }

  /* ── Inputs ── */
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  select,
  textarea {
    font-size: 16px !important;
    padding: 14px 16px !important;
  }

  .field-input,
  .field input,
  .otp-input,
  .otp2-cell {
    min-height: 52px !important;
  }

  /* ── Buttons ── */
  .login-btn,
  .btn,
  .otp-btn,
  .otp2-submit,
  .msg-submit {
    font-size: 1.05rem !important;
    min-height: 52px !important;
    padding: 14px 18px !important;
    font-weight: 800 !important;
  }

  .timer {
    font-size: clamp(1.2rem, 7vw, 1.75rem) !important;
  }

  .login-banner,
  .banner {
    max-height: 160px !important;
    height: auto !important;
    object-fit: cover;
    border-radius: 16px !important;
  }

  .card__img,
  .card__img--watch,
  .card__img--card,
  .card__img--devices {
    width: auto !important;
    max-width: min(220px, 86vw) !important;
  }

  .card__img--watch {
    max-width: min(140px, 42vw) !important;
  }

  .msg-textarea {
    min-height: 130px;
    font-size: 16px;
  }

  .wait-image {
    width: 100%;
    max-width: 100%;
  }

  .wix-bar {
    font-size: 0.8rem !important;
    padding: 8px 10px !important;
  }

  .otp2-topbar {
    font-size: 0.88rem !important;
    padding: 12px 14px !important;
  }
}
