/* =============================================================================
   login_page.css  —  ESCB IAM Pages
   ============================================================================= */

html {
  font-size: 100%;
  height: -webkit-fill-available; /* iOS Safari (pre-15) 100vh fix */
}


/* ── Page layout ─────────────────────────────────────────────────────────── */
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background-color: #f4f6f9;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: -webkit-fill-available; /* iOS Safari fix */
}

.page {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 1.25rem;
}


/* ── Login / content card ────────────────────────────────────────────────── */
.login-card {
  background: #ffffff;
  width: 100%;
  max-width: 26.25rem;         
  padding: 2.5rem;
  border-radius: 0.875rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08); /* shadow kept in px */
}


/* ── Logo ────────────────────────────────────────────────────────────────── */
.logo-container {
  text-align: center;
  margin-bottom: 1.25rem;
}

.logo-container img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}


/* ── Subtitle ────────────────────────────────────────────────────────────── */
.subtitle {
  font-size: 0.875rem;          
  color: #5b6b86;
  margin-top: 0;
  margin-bottom: 1.5rem;
}


/* ── Gradient separator ──────────────────────────────────────────────────── */
.gradient-hr {
  border: 0;
  height: 1px;                  
  margin: 1.5rem 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0),
    rgba(31, 42, 68, 0.25),
    rgba(0, 0, 0, 0)
  );
}


/* ── Form fields ─────────────────────────────────────────────────────────── */
.field-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}

.group-label {
  font-weight: 600;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;          
  color: #1f2a44;
}

.textinput {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5625rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid #cfd8e3;    /
  font-size: 0.875rem;          
  height: 2.25rem;              
  transition: border 0.2s ease, box-shadow 0.2s ease;
  /* Prevents older iOS/Android native input styling overriding ours. */
  -webkit-appearance: none;
  appearance: none;
}

.textinput:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}


/* ── Checkbox row ────────────────────────────────────────────────────────── */
.checkbox {
  display: flex;
  align-items: center;
  /* gap unsupported pre-Chrome84/Safari14; using margin-right on input. */
  margin: 1rem 0 1.5rem;
  font-size: 0.875rem;          /* 14px */
  color: #1f2a44;
}

.checkbox input[type="checkbox"] {
  margin-right: 0.625rem;
  flex-shrink: 0;
}


/* ── Primary button ──────────────────────────────────────────────────────── */
.primary-button {
  width: 100%;
  padding: 0.75rem;
  background-color: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9375rem;         /* 15px */
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  /* Prevents older iOS/Android native button styling overriding ours. */
  -webkit-appearance: none;
  appearance: none;
}

.primary-button:hover {
  background-color: #1e40af;
}

.primary-button:focus {
  outline: 2px solid #2563eb;   
  outline-offset: 2px;
}


/* ── Form links ──────────────────────────────────────────────────────────── */
.form-links {
  text-align: center;
  margin-top: 1.125rem;
}

.form-links a {
  display: inline-block;
  margin: 0.375rem 0.5rem;
  font-size: 0.875rem;          
  font-weight: 500;
  color: #2563eb;
  text-decoration: none;
  transition: color 0.2s ease;
}

.form-links a:hover {
  text-decoration: underline;
  color: #1e40af;
}

/* ── Form links: mobile stacking ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .form-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .form-links a {
    margin: 0;
    font-size: 0.8125rem;       
  }

  .form-links br {
    display: none;
  }
}


/* ── Error / validation message ──────────────────────────────────────────── */
.error-text {
  color: #b91c1c;
  font-size: 0.875rem;          
  font-weight: 500;
  text-align: center;
  margin-bottom: 0.9375rem;
}


/* ── Error page ──────────────────────────────────────────────────────────── */
.error-message {
  text-align: center;
}

.error-code {
  font-size: 3.125rem;         
  font-weight: 700;
  color: #1f2a44;
  margin-top: 3.125rem;
  margin-bottom: 0.625rem;
}

.error-button {
  margin-top: 1.25rem;
  text-align: center;
}


/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 1.25rem;
  font-size: 0.8125rem;         
  color: #6b7280;
}

.footer a {
  color: #2563eb;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}


/* ── Consent page ────────────────────────────────────────────────────────── */
.consent-subtitle {
  margin-top: 3.125rem;
}


/* ── RTL support ─────────────────────────────────────────────────────────── */
[dir="rtl"] .form-links {
  direction: rtl;
}

[dir="rtl"] .checkbox input[type="checkbox"] {
  margin-right: 0;
  margin-left: 0.625rem;
}

[dir="rtl"] .gradient-hr {
  background: linear-gradient(
    to left,
    rgba(0, 0, 0, 0),
    rgba(31, 42, 68, 0.25),
    rgba(0, 0, 0, 0)
  );
}


/* ── Logout / info message ───────────────────────────────────────────────── */
.info-text {
  font-size: 0.9375rem;         
  font-weight: 500;
  text-align: center;
  margin-top: 3.125rem;
  margin-bottom: 0.9375rem;
  color: #1f2a44;
}


/* ── OTP resend code button ──────────────────────────────────────────────── */
.resend-button {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 0.875rem;         
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-decoration: none;
  display: inline;
  font-weight: 500;
}

.resend-button:hover {
  text-decoration: underline;
  color: #1e40af;
}

input:disabled,
select:disabled,
textarea:disabled {
  background-color: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 1;
}

#qrcode {
  text-align: center;
}

.otp-links {
#  margin-bottom: 0.375rem;
  font-size: 0.875rem;          
  color: #1f2a44;
}

#omafailureinstructions {
text-align: justify;
}

#omafailureinstructions li {
margin-top: 7px;
}

/* ── Resolution scaling ─────────────────────────────────────────────────── */

/* small laptops: scale down */
@media (max-width: 1366px) {
  html { font-size: 93.75%; }   /* ~15px (-6%) */
}

/* large displays: slight scale up */
@media (min-width: 2300px) {
  html { font-size: 104%; }
}

/* very large/high-res: stronger scale up */
@media (min-width: 2560px) {
  html { font-size: 108%; }
}
