/* filepath: /home/dushyant/code/pingfed-files/conf/template/assets/ia/css/style.css */

/* ============================================================
   BMJ Impact Analytics – PingFederate Login Template Styles
   Mirrors the visual language of LoginPage.tsx
   ============================================================ */

/* ----- Fonts ----- */
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

@font-face {
  font-family: "InterFace";
  src: url("../fonts/if_std_rg-webfont.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ----- Reset / Base ----- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Roboto, sans-serif;
  background-color: #ffffff;
  color: #333333;
  min-height: 100vh;
}

/* ----- Page shell ----- */
.ia-page {
  min-height: 100vh;
}

.ia-container {
  background: #ffffff;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* ----- Header ----- */
.ia-header {
  padding: 1.25rem 0;
  border-bottom: 1px solid #e5e6e6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ia-logo {
  height: 42px;
  width: auto;
}

.ia-header__nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.ia-header__nav-link {
  color: #747678;
  font-size: 1rem;
  text-decoration: none;
}

.ia-header__nav-link:hover {
  color: #333333;
}

/* ----- Main grid ----- */
.ia-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 2rem 0;
}

@media (min-width: 768px) {
  .ia-main {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0 2.5rem;
    align-items: start;
  }
}

/* ----- Column shared ----- */
.ia-col {
  padding: 1rem 0;
}

/* ----- Headings ----- */
.ia-heading {
  font-size: 2rem;
  font-weight: 400;
  font-family: InterFace, sans-serif;
  color: #333333;
  margin-bottom: 2rem;
  line-height: 1.2;
}

.ia-heading--org {
  font-size: 1.5rem;
  line-height: 1.25;
}

/* ----- Form ----- */
.ia-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ----- Field ----- */
.ia-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ia-label {
  font-size: 1rem;
  color: #333333;
}

.ia-input {
  display: block;
  width: 100%;
  border: 1px solid #8d8e90;
  border-radius: 0.8rem;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  color: #333333;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ia-input:focus {
  border-color: #2a6ebb;
  box-shadow: 0 0 0 3px rgba(42, 110, 187, 0.18);
}

.ia-input--password {
  padding-right: 3.5rem; /* room for toggle button */
}

/* Autofill label lift (Chrome) */
.ia-field label:has(+ .ia-input:-webkit-autofill) {
  font-size: 0.625rem;
  margin-top: -0.5rem;
}

/* IE/Edge hide native reveal */
.ia-input[type="password"]::-ms-reveal,
.ia-input[type="password"]::-ms-clear {
  display: none;
}

/* ----- Password wrapper (input + toggle) ----- */
.ia-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.ia-input-wrapper .ia-input {
  flex: 1;
}

.ia-visibility-btn {
  background: none;
  border: none;
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  padding: 0.25rem;
}

@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  .ia-visibility-btn {
    display: none;
  }
}

.ia-visibility-icon {
  width: 24px;
  height: 24px;
}

/* ----- Field error ----- */
.ia-field-error {
  color: #cd202c;
  font-size: 0.875rem;
  font-weight: 700;
  display: block;
  min-height: 1.2em;
}

/* ----- Error block (server-side errors) ----- */
.ia-error-block {
  /* hidden when empty */
}

.ia-error-block:empty {
  display: none;
}

.ia-error-msg {
  border: 1px solid #cb2331;
  border-radius: 0.25rem;
  padding: 0.75rem 1rem;
  color: #cb2331;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
  background: #fff5f5;
  margin-bottom: 0.5rem;
}

/* ----- Row utilities ----- */
.ia-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ia-row--space-between {
  justify-content: space-between;
}

.ia-row--end {
  justify-content: flex-end;
}

/* ----- Checkbox ----- */
.ia-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  cursor: pointer;
  user-select: none;
}

.ia-checkbox {
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid #8d8e90;
  border-radius: 0.25rem;
  accent-color: #2a6ebb;
  cursor: pointer;
  flex-shrink: 0;
}

/* ----- Links ----- */
.ia-link {
  color: #2a6ebb;
  text-decoration: underline;
  font-size: 0.9375rem;
  background: none;
  border: none;
  cursor: pointer;
}

.ia-link:hover {
  color: #1a4e8a;
}

.ia-link--reset {
  white-space: nowrap;
}

/* ----- Buttons ----- */
.ia-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 3.2rem;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.8rem;
  cursor: pointer;
  border: 1px solid #2a6ebb;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
  line-height: 1.4;
}

.ia-btn--primary {
  background-color: #2a6ebb;
  color: #ffffff;
  width: 50%;
  margin-top: 0.5rem;
}

.ia-btn--primary:hover,
.ia-btn--primary:focus {
  background-color: #1f5189;
  border-color: #1f5189;
  color: #ffffff;
}

.ia-btn--primary:disabled {
  background-color: #8d8e90;
  border-color: #8d8e90;
  cursor: not-allowed;
}

.ia-btn--secondary {
  background-color: #ffffff;
  color: #2a6ebb;
  width: 60%;
}

.ia-btn--secondary:hover,
.ia-btn--secondary:focus {
  background-color: #1f5189;
  border-color: #1f5189;
  color: #ffffff;
}

@media only screen and (max-width: 767px) {
  .ia-btn--primary,
  .ia-btn--secondary {
    width: 100%;
  }
}

/* ----- Vertical divider (desktop only) ----- */
.ia-divider {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 5rem;
}

@media (min-width: 768px) {
  .ia-divider {
    display: flex;
  }
}

.ia-divider__line {
  display: block;
  width: 1px;
  height: 140px;
  background-color: #e5e6e6;
}

.ia-divider__label {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #8d8e90;
  background: #ffffff;
}

/* ----- Org section ----- */
.ia-org-desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #333333;
  margin-bottom: 1.5rem;
}

.ia-org-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ----- Footer ----- */
.ia-footer {
  border-top: 1px solid #e5e6e6;
  padding: 3rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .ia-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.ia-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 3.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ia-footer__link {
  color: #333333;
  font-size: 0.875rem;
  text-decoration: none;
}

.ia-footer__link:hover {
  text-decoration: underline;
}

.ia-footer__copy {
  font-size: 0.8125rem;
  color: #8d8e90;
  white-space: nowrap;
}

/* ----- Screen-reader only (accessible live region) ----- */
.ia-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}