/*
========================================
Layout styles
Version 4 (versioned to bust cache)
========================================
*/

/* Keycloak wrapper (avoid styling injected widgets/scripts) */
#kc-page-container {
  display: grid;
  grid-template-rows: 72px 1fr;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
}

#kc-header {
  padding: 24px 0;

  /* Logo */
  &::after {
    background-image: url('../../img/logo-v2.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    height: auto;
    content: '';
    display: block;
    width: 200px;
    height: 55px;
    margin: 0 auto;
  }

  @media (max-width: 480px) {
    padding: 16px 0;

    &::after {
      width: 160px;
      height: 44px;
    }
  }
}

/* Main Content container */
#kc-header + div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 1rem 4rem;

  @media (max-width: 768px) {
    padding: 0 0.5rem 4rem;
  }

  /* Page title */
  header {
    max-width: 480px;
    margin: 0 auto 1rem;
    text-align: center;
    width: 100%;
  }
}

#kc-header-wrapper {
  visibility: hidden;
  height: 0px;
  overflow: hidden;
}

#kc-content {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;

  @media (max-width: 768px) {
    padding: 0 0.5rem;
  }
}

/* Feedback body copy (verify-email, info, logout-confirm, …). Keycloak emits
   these as `.instruction` paragraphs with no typographic treatment, so long
   copy renders cramped. Give it a comfortable measure and consistent spacing
   between sections. */
.instruction {
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0 0 1rem;
}

.instruction:last-child {
  margin-bottom: 0;
}

/* Separate the resend / secondary section from the primary body copy. */
#kc-info {
  margin-top: 1.25rem;
}

/* Links in feedback body copy (e.g. verify-email "Click here" to resend, the
   error page's "back to application") should match the app's inline body-link
   convention — the same dark, always-underlined treatment as the "Sign up" /
   "Already have an account?" links — rather than the browser default blue.
   Dark text + a persistent underline keeps the link legible (WCAG AA) and
   distinguishable without relying on color alone. `#kc-info` covers the info
   and logout-confirm links (nested under `#kc-info-message`); `#kc-error-message`
   is in the form section, outside `#kc-info`, so it needs its own selector. */
.instruction a,
#kc-info a,
#kc-error-message a {
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: underline;
}

