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

@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(112px, 30vw) !important;
    max-width: 112px;
  }

  .login-title,
  .title,
  .otp-title,
  .msg-heading,
  .hero-banner__title,
  .hero-banner__line,
  .card__title,
  .wait-title,
  .otp2-heading {
    font-size: clamp(1.05rem, 4.8vw, 1.35rem) !important;
    line-height: 1.3;
  }

  .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, 1rem) !important;
    line-height: 1.45;
  }

  .field-label,
  .field label,
  .otp-label,
  .msg-label,
  .triple-labels {
    font-size: 0.92rem !important;
  }

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

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

  .login-btn,
  .btn,
  .otp-btn,
  .otp2-submit,
  .msg-submit {
    font-size: 1rem !important;
    min-height: 48px !important;
    padding: 12px 14px !important;
  }

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

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

  .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: 120px;
    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.85rem !important;
    padding: 10px 12px !important;
  }
}
