/*
 * ITR SCA Portal — Frontend Styles
 * Matches the GP Pathway SCA Platform design shown in the mockups.
 * Shadows removed throughout. Font size tokens defined in :root.
 */

/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════════════════════════════════ */
:root {
  --itr-teal:        #7AB7D5;
  --itr-teal-light:  #e8f4f6;
  --itr-teal-dark:   #0C4A68;
  --itr-text:        #3e3e3e;
  --itr-muted:       #666;
  --itr-border:      #D9D9D9;
  --itr-bg:          #ffffff;
  --itr-surface:     #f9fafb;
  --itr-error:       #c0392b;
  --itr-success:     #1a8a4a;
  --itr-radius:      6px;
  --itr-radius-lg:   12px;
  --itr-shadow:      none;

  /* Font Families */
  --font-heading: "Montserrat", sans-serif;
  --font-body-1:  "Poppins", sans-serif;
  --font-body-2:  "Poppins", sans-serif;
  --font-body-3:  "Poppins", sans-serif;
  --itr-font:     "Poppins", sans-serif;

  /* H1 */
  --h1-size:   38px;
  --h1-line:   50px;
  --h1-weight: 700;

  /* H2 */
  --h2-size:   32px;
  --h2-line:   42px;
  --h2-weight: 700;

  /* H3 */
  --h3-size:   26px;
  --h3-line:   36px;
  --h3-weight: 700;

  /* H4 */
  --h4-size:   20px;
  --h4-line:   28px;
  --h4-weight: 700;

  /* Body 1 */
  --body1-size: 18px;
  --body1-line: 26px;

  /* Body 2 */
  --body2-size: 16px;
  --body2-line: 24px;

  /* Body 3 */
  --body3-size: 14px;
  --body3-line: 24px;
}

/* Laptop */
@media (max-width: 1366px) {
  :root {
    --h1-size:    38px;
    --h2-size:    32px;
    --h3-size:    26px;
    --h4-size:    20px;
    --body1-size: 18px;
    --body2-size: 16px;
    --body3-size: 14px;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --h1-size:    32px;
    --h1-line:    38px;
    --h2-size:    26px;
    --h2-line:    36px;
    --h3-size:    22px;
    --h3-line:    28px;
    --h4-size:    18px;
    --h4-line:    24px;
    --body1-size: 16px;
    --body2-size: 14px;
    --body3-size: 12px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  :root {
    --h1-size:    26px;
    --h1-line:    32px;
    --h2-size:    22px;
    --h2-line:    32px;
    --h3-size:    18px;
    --h3-line:    24px;
    --h4-size:    18px;
    --h4-line:    24px;
    --body1-size: 16px;
    --body2-size: 14px;
    --body3-size: 12px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT — split panel
═══════════════════════════════════════════════════════════════════════════ */
.itr-sca-wrap {
  display: flex;
  min-height: 520px;
  width: 100%;
  font-family: var(--itr-font);
  color: var(--itr-text);
  box-sizing: border-box;
  position: relative;
}

/* Left panel */
.itr-panel-left {
  flex: 0 0 42%;
  position: relative;
  overflow: hidden;
  border-radius: var(--itr-radius-lg) 0 0 var(--itr-radius-lg);
}

.itr-panel-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
}

/* Right panel */
.itr-panel-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
    justify-content: center;
  padding: 10px;
  box-sizing: border-box;
  overflow-y: auto;
  max-height: 90vh;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCREENS
═══════════════════════════════════════════════════════════════════════════ */
.itr-screen {
  display: none;
  animation: itrFadeIn 0.25s ease;
}

.itr-screen.active {
  display: block;
}

@keyframes itrFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* Card variant (used for modal-style screens: forgot, verify, etc.) */
.itr-card {
  background: var(--itr-bg);
  border: 1px solid var(--itr-border);
  border-radius: var(--itr-radius-lg);
  padding: 40px;
  max-width: 420px;
  margin: auto;
  text-align: left;
}

#itr-screen-auth{
  width: 549px;
}
#itr-screen-verify{
  max-width: 568px;
}
#itr-screen-forgot,
#itr-screen-check-email{
  width: 600px;
}
.itr-card h2 {
  margin: 16px 0 8px;
  font-size: var(--h3-size);
  line-height: var(--h3-line);
  font-weight: var(--h3-weight);
  color: #1D1D1D;
}

.itr-subtitle {
  color: #4A5565;
  font-size: var(--body2-size);
  line-height: 1.5;
  margin: 0 0 20px;
}

/* Card icon circle */
.itr-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--itr-teal-light);
  color: var(--itr-teal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.itr-card-icon--success {
  background: var(--itr-teal-light);
  color: var(--itr-success);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGO
═══════════════════════════════════════════════════════════════════════════ */
.itr-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.itr-logo img {
  max-height: 48px;
  width: auto;
}

.itr-logo-text {
  font-size: var(--body1-size);
  letter-spacing: 2px;
  color: var(--itr-teal);
  text-transform: uppercase;
  font-family: var(--font-heading);
}

.itr-logo-text strong {
  font-weight: 800;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOGGLE TABS
═══════════════════════════════════════════════════════════════════════════ */
.itr-toggle {
  display: inline-flex;
      background: #EFEFF3;
    border: none;
  border-radius: 40px;
  padding: 3px;
  margin-bottom: 28px;
  gap: 0;
}

.itr-toggle-btn {
  border: none;
  background: transparent;
  padding: 9px 20px;
  border-radius: 40px;
  font-size: var(--body2-size);
  font-weight: 500;
  cursor: pointer;
  color: black;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  font-family: var(--itr-font);
}
#itr-register-form .itr-btn{
  width: 266px;
}

.itr-toggle-btn.active {
  background: var(--itr-teal);
  color: #fff;
}

.itr-toggle-btn:hover {
  border: none;
  background: var(--itr-teal);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FIELDS
═══════════════════════════════════════════════════════════════════════════ */
.itr-form-panel {
  width: 100%;
}

.itr-half{
  width: 48.5%;
}
.itr-form-panel form {
  width: 100%;
}

.dob-format{
  font-size: 10px;
}
.itr-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.itr-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.itr-field label {
  font-size: var(--body3-size);
  font-weight: 400;
  color: black;
  margin-bottom: 6px;
}

.itr-field input[type="text"],
.itr-field input[type="email"],
.itr-field input[type="password"],
.itr-field input[type="tel"],
.itr-field input[type="date"],
.itr-card .itr-field input {
  height: 40px;
  border: 1px solid var(--itr-border);
  border-radius: var(--itr-radius);
  padding: 0 12px;
  font-size: var(--body2-size);
  font-family: var(--itr-font);
  color: var(--itr-text);
  background: var(--itr-bg);
  transition: border-color 0.15s;
  box-sizing: border-box;
  width: 100%;
}

.itr-field input:focus,
.itr-card .itr-field input:focus {
  outline: none;
  border-color: var(--itr-teal);
}

.itr-field input.is-error {
  border-color: var(--itr-error);
}

.itr-field-error {
  display: block;
  font-size: 12px;
  color: var(--itr-error);
  margin-top: 4px;
}

/* Password toggle wrapper */
.itr-input-wrap {
  position: relative;
}

.itr-input-wrap input {
  padding-right: 40px;
}

.itr-toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--itr-muted);
  padding: 0;
  display: flex;
  align-items: center;
}

.itr-toggle-pw:focus-visible {
  outline: 2px solid var(--itr-teal);
  border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHECKBOXES
═══════════════════════════════════════════════════════════════════════════ */
.itr-checkboxes {
  margin-bottom: 20px;
}

.itr-check-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: var(--body3-size);
  color: var(--itr-muted);
  margin-bottom: 10px;
  line-height: 1.4;
  cursor: pointer;
}

.itr-check-label input[type="checkbox"] {
  margin-top: 2px;
  accent-color: #1C4A68;
  flex-shrink: 0;
}

.itr-check-label a {
  color: var(--itr-teal);
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTON
═══════════════════════════════════════════════════════════════════════════ */
.itr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--itr-teal);
  color: #fff;
  border: none;
  border-radius: 40px;
  padding: 11px 28px;
  font-size: var(--body2-size);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--itr-font);
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
  margin-bottom: 12px;
}

.itr-btn:hover {
  background: var(--itr-teal-dark);
}

.itr-btn:active {
  transform: scale(0.98);
}

.itr-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.itr-btn:focus-visible {
  outline: 2px solid var(--itr-teal);
  outline-offset: 3px;
}

/* Spinner inside button */
.itr-btn .itr-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: itrSpin 0.7s linear infinite;
  display: none;
    margin-right: 6px;
  vertical-align: middle;
}

.itr-btn.is-loading .itr-spinner {
  display: inline-block;
}

@keyframes itrSpin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LINKS & HELPERS
═══════════════════════════════════════════════════════════════════════════ */
.itr-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--itr-teal);
  font-size: var(--body3-size);
  font-family: var(--itr-font);
  text-decoration: none;
  transition: opacity 0.15s;
}

#itr-forgot-link{
  padding: 10px 0;
}
.itr-link:hover {
  opacity: 0.75;
  text-decoration: underline;
}

.itr-link--strong {
  font-weight: 600;
}

.itr-forgot-wrap {
  text-align: right;
  margin-top: 4px;
}

.itr-back-wrap {
  text-align: right;
  margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   OTP DIGIT INPUTS
═══════════════════════════════════════════════════════════════════════════ */
.itr-otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  margin: 20px 0;
}

.itr-otp-digit {
  width: 48px;
  height: 52px;
  text-align: center;
  font-size: var(--h4-size);
  font-weight: 700;
  border: 1.5px solid var(--itr-border);
  border-radius: var(--itr-radius);
  color: var(--itr-text);
  font-family: var(--itr-font);
  transition: border-color 0.15s;
  box-sizing: border-box;
  caret-color: transparent;
}

.itr-otp-digit:focus {
  outline: none;
  border-color: var(--itr-teal);
}

.itr-resend-wrap {
  font-size: var(--body3-size);
  color: var(--itr-muted);
  margin-bottom: 16px;
}

.itr-resend-wrap #itr-resend-timer {
  font-size: var(--body3-size);
  color: var(--itr-muted);
  margin-left: 4px;
}

.itr-small-note {
  font-size: var(--body3-size);
  color: var(--itr-muted);
  line-height: 1.5;
  margin: 16px 0 8px;
}

.itr-change-email-div{
  display: flex;
    align-items: center;
    gap: 10px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ERROR / SUCCESS MESSAGES
═══════════════════════════════════════════════════════════════════════════ */
.itr-error {
  background: #fdf0ef;
  border: 1px solid #e8b4b0;
  border-radius: var(--itr-radius);
  padding: 10px 14px;
  font-size: var(--body3-size);
  color: var(--itr-error);
  margin-bottom: 14px;
}

.itr-success-msg {
  background: #edf7f0;
  border: 1px solid #a8d9b6;
  border-radius: var(--itr-radius);
  padding: 10px 14px;
  font-size: var(--body3-size);
  color: var(--itr-success);
  margin-bottom: 14px;
}

.itr-sca-notice {
  padding: 20px;
  background: var(--itr-teal-light);
  border-left: 4px solid var(--itr-teal);
  border-radius: var(--itr-radius);
  font-family: var(--itr-font);
  color: var(--itr-text);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .itr-sca-wrap {
    flex-direction: column;
    min-height: unset;
  }

  .itr-panel-left {
    display: none
    /* flex: none;
    height: 200px;
    border-radius: var(--itr-radius-lg) var(--itr-radius-lg) 0 0; */
  }

  .itr-panel-right {
    padding: 32px 24px;
    max-height: unset;
  }

  .itr-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .itr-half{
    width: 100%;
  }
  .itr-otp-inputs {
    gap: 8px;
  }

  .itr-otp-digit {
    width: 42px;
    height: 46px;
    font-size: var(--body1-size);
  }
  #itr-screen-auth,#itr-screen-verify,
#itr-screen-forgot,
#itr-screen-check-email{
    width: auto;
  }
}

@media (max-width: 480px) {
  .itr-panel-left {
    height: 160px;
  }

  .itr-panel-right {
    padding: 24px 16px;
  }

  .itr-toggle {
    width: 100%;
  }

  .itr-toggle-btn {
    flex: 1;
    text-align: center;
    padding: 9px 12px;
    font-size: var(--body3-size);
  }

  .itr-card {
    padding: 24px 20px;
    border: none;
  }
}
