﻿:root {
  --primary-color: #007a85; /* Default color; white text on it is 5.1:1 */
  /* Text on --primary-color: tenant-branding.js sets it from BrandColors.TextOn (#1624). */
  --on-primary: #ffffff;
  /* What hover/press mix into --primary-color, away from the text so contrast holds
     (BrandColors.ShadeFor, set by tenant-branding.js). */
  --primary-shade: black;
  --border-radius: 16px;
  --spacing: 12px;
  --shadow: 4px 9px 30px 0 rgb(0 0 0 / 20%);
  --icon-size: 20px;
}

/* Base */
html {
  height: 100%;
}

/* A column: the card's container fills the window, the footer follows it in the flow. Taller
   content (many profiles, 200 % zoom) pushes the footer down instead of sliding under it
   (WCAG 1.4.10, 2.4.11). */
body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

h1 {
  font-size: 22px;
}

ul {
  padding-inline-start: 20px;
}

/* Background/image layers */
.abook-background {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  background-color: transparent;
  background-image: var(--login-bg-image, url(/images/bg-billede.jpg));
  background-position-x: center;
  background-position-y: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.abook-logo {
  position: absolute;
  left: 65px;
  top: 45px;
  z-index: -1;
}

.abook-logo img {
  height: var(--logo-height, 40px);
}

.abook-kk-logo {
  position: absolute;
  left: 65px;
  top: 45px;
  width: 120px;
  height: 120px;
  background-color: transparent;
  background-image: url(/images/KBH_Maerke_DK_White_RGB.png);
  background-position-x: center;
  background-position-y: center;
  background-repeat: no-repeat;
  background-size: contain;
}

/* Header/Footer */
.abook-header {
  height: 55px;
  margin: auto;
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  background-color: var(--primary-color);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.abook-footer {
  flex-shrink: 0;
  height: 80px;
  background-color: var(--primary-color);
  background-image: url(/images/Logo_A-book.png);
  background-position-x: 65px; /* left 65px */
  background-position-y: 25px; /* top 25px */
  background-repeat: no-repeat;
  background-size: 93px 25px;
}

/* Layout helpers */
/* Grows instead of a fixed height: a card taller than the window is not centred out of reach
   above the top. */
.page-container {
  flex: 1 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  /* Air between the card and the window top and the footer when the card fills the height. */
  padding: 32px var(--spacing);
}

/* Login form */
.login-form {
  width: 340px;
  max-width: 100%;
}

.login-form h1 {
  margin: 0;
}

.login-form .form-body {
  background-color: #ffffff;
  padding-top: 24px;
  padding-right: 16px;
  padding-bottom: 24px;
  padding-left: 16px;
  box-shadow: var(--shadow);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: var(--border-radius);
  border-bottom-left-radius: var(--border-radius);
}

.login-form .seperator {
  color: #dee2e6;
}

/* Accordion */
.accordion-button {
  padding: var(--spacing);
}

.accordion-button:not(.collapsed) {
  background-color: #ffffff;
}

/* Buttons */
/* Background and text as pairs of Bootstrap's own variables, so every state (hover, press,
   disabled) gets the tenant colour with --on-primary on it. */
.localLogin .btn-primary {
  --bs-btn-bg: var(--primary-color);
  --bs-btn-hover-bg: color-mix(in srgb, var(--primary-color) 90%, var(--primary-shade));
  --bs-btn-active-bg: color-mix(in srgb, var(--primary-color) 80%, var(--primary-shade));
  --bs-btn-disabled-bg: var(--primary-color);
  --bs-btn-color: var(--on-primary);
  --bs-btn-hover-color: var(--on-primary);
  --bs-btn-active-color: var(--on-primary);
  --bs-btn-disabled-color: var(--on-primary);
  border-style: none;
  padding: var(--spacing);
}

.external-auth .btn {
  padding: var(--spacing);
}

/* Icons */
.external-auth i,
.accordion-item i {
  font-size: var(--icon-size);
}

/* Verify email steps */
.verify-step-header {
  background-color: var(--primary-color);
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
  padding: 14px 16px 16px 16px;
  color: var(--on-primary);
}

/* Full opacity: at 0.85 the label fell to 4.2:1 on Kolding's #42767e (#1624). */
.verify-step-header .step-label {
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.verify-step-header h1 {
  font-size: 17px;
  margin: 0 0 4px;
  text-align: left;
}

.verify-step-header p {
  font-size: 12px;
  margin: 0 0 12px;
}

/* Decorative (aria-hidden; the step label says the same), in the header's text colour. */
.step-progress {
  display: flex;
  gap: 4px;
}

.step-bar {
  flex: 1;
  height: 4px;
  background-color: currentColor;
  opacity: 0.3;
}

.step-bar--filled {
  opacity: 0.9;
}

/* OTP digit inputs */
.otp-inputs {
  display: flex;
  gap: 8px;
}

/* Shrinks below 44px when six fields and their gaps do not fit (320 px, WCAG 1.4.10). */
.otp-input {
  flex: 0 1 44px;
  min-width: 0;
  height: 48px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  border: 1.5px solid #dee2e6;
  border-radius: 8px;
  transition: border-color 0.15s;
}

/* The focus ring itself is the shared one at the bottom of this file. */
.otp-input:focus {
  border-color: var(--primary-color);
}

.otp-input--filled {
  border-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 767px) {
  .abook-kk-logo {
    left: 15px;
    top: 15px;
    width: 75px;
    height: 75px;
    background-color: transparent;
    background-image: url(/images/KBH_Maerke_DK_White_RGB.png);
    background-position-x: center;
    background-position-y: center;
    background-repeat: no-repeat;
    background-size: contain;
  }

  .page-container {
    padding: 24px var(--spacing);
  }

  .abook-header {
    height: 60px;
  }

  .login-form h1 {
    font-size: 18px;
  }
}

/* Utility classes — replace inline style="" attributes so CSP style-src can drop 'unsafe-inline' */
.cursor-pointer {
  cursor: pointer;
}

.fs-11 {
  font-size: 11px;
}

.fs-inherit {
  font-size: inherit;
}

.gap-11 {
  gap: 11px;
}

/* One dark ring (15:1 on the card) instead of Bootstrap's pale glow (#1624). Must stay last:
   at equal specificity it beats .btn:focus-visible and .form-control:focus by order. */
.page-container :focus-visible {
  outline: 3px solid #212529;
  outline-offset: 2px;
  box-shadow: none;
}

/* SigningOut's heading sits on the background photo, not in a coloured header. */
#signing-out h1 {
  color: #ffffff;
}

/* Keeps line breaks in tenant-written text without style="" (CSP style-src has no 'unsafe-inline'). */
.pre-line {
  white-space: pre-line;
}
