/* Standalone Login Page Styles */
:root {
  /* Primary Colors */
  --primary: #001d3d;
  --primary-subtle: #2a435d;
  --secondary: #c9edff;
  --secondary-subtle: #f1faff;
  --light: #faf4f2;
  --general: #fff;
  --dark: #2b2b3a;
  --disabled: #e5e5e7;

  /* Background Colors */
  --background-light: var(--light);
  --background-general: var(--general);
  --background-general-subtle: rgba(245, 245, 246, 1);
  --background-primary: var(--whitelabel-strong, var(--primary));
  --background-secondary-subtle: var(
    --whitlabel-subtle,
    var(--secondary-subtle)
  );
  --background-disabled: var(--disabled);
  --background-critical: #fcebee;

  /* Typography */
  --typography-family-heading: Tenon;
  --typography-family-body: Inter;
  --typography-family-icon: "Material Symbols Rounded";

  --typography-weight-general: 400;
  --typography-weight-emphasis: 500;
  --typography-weight-heading: 700;
  --line-height-xs: 16px;
  --line-height-sm: 18px;
  --line-height-lg: 24px;
  --line-height-xl: 28px;

  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;
  --font-size-3xl: 28px;
  --text-primary: var(--whitelabel-strong, var(--primary));
  --text-dark: #555561;
  --text-dark-strong: #000012;
  --text-dark-subtle: #808088;
  --text-dark-emphasis: #2b2b3a;
  --text-on-primary: #fff;
  --text-on-disabled: #aaa;
  --text-link: var(--whitelabel-standard, #0a6edd);
  --text-link-emphasis: var(--whitelabel-standard, #0662c8);
  --text-success-strong: #41d01e;
  --text-secondary-strong: #67bde8;
  --text-critical-strong: #f23051;
  --text-attention-strong: #f89500;

  --shape-success: #41d01e;
  --shape-attention: #f89500;
  --shape-critical: #f23051;
  --shape-secondary: #67bde8;

  /* Border */
  --border-primary: var(--primary);
  --border-general: #f5f5f6;
  --border-general-emphasis: #aaa;
  --border-general-subtle: #e5e5e7;
  --border-dark-subtle: #555561;
  --border-select: #0a6edd;
  --border-critical-emphasis: #ca2844;
  --border-weight-md: 1px;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-weight-md: 1px;

  /* Shadow Colors */
  --effects-on-light: #d0cbca;
  --dropshadow-on-light: #d0cbca;

  --spacing-2xs: 6px;
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 20px;
  --spacing-xl: 24px;
}

@font-face {
  font-family: "Tenon";
  src: url("../fonts/tenon-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tenon";
  src: url("../fonts/tenon-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.standalone-login * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.standalone-login body {
  background-color: var(--background-light);
  font-family:
    var(--typography-family-body),
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue",
    sans-serif;
  font-feature-settings:
    "liga" off,
    "clig" off;
  color: var(--text-dark);
  height: 100vh;
  margin: 0;
}

#logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 250px;
  height: 96px;
  margin-bottom: var(--spacing-md);
}

#logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.login-card {
  display: flex;
  flex-direction: column;
  background: var(--background-general);
  border-radius: var(--border-radius-md);
  box-shadow: 0 2px 2px 0 var(--effects-on-light);
  padding: var(--spacing-xl);
  gap: var(--spacing-xl);
  width: 100%;
  max-width: 420px;
}

.dropdown {
  display: flex;
  justify-content: end;
  align-items: start;
  padding: var(--spacing-xs);
  gap: var(--spacing-xs);
}

.dropdown span {
  border: none;
  cursor: pointer;
}

.kc-current-locale-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--spacing-2xs);
  font-size: var(--font-size-sm);
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}

.kc-current-locale-link::after {
  content: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20height%3D%2216px%22%20viewBox%3D%220%20-960%20960%20960%22%20width%3D%2216px%22%20fill%3D%22%23555561%22%3E%3Cpath%20d%3D%22M480-344%20240-584l56-56%20184%20184%20184-184%2056%2056-240%20240Z%22%2F%3E%3C%2Fsvg%3E");
  position: relative;
  top: 5px;
}

.dropdown .content {
  display: none;
  position: absolute;
  background-color: var(--background-general);
  min-width: 200px;
  padding: var(--spacing-xs);
  gap: var(--spacing-xs);
  border: var(--border-weight-md) solid var(--border-general-subtle);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 4px 12px 0 var(--dropshadow-on-light);
  text-overflow: ellipsis;
  font-size: var(--font-size-sm);
  font-weight: var(--typography-weight-general);
  line-height: var(--line-height-sm);
  color: var(--text-dark);
  z-index: 10;
}

.dropdown .content a {
  display: block;
  color: inherit;
  text-decoration: none;
  text-align: left;
  padding: 10px 15px;
  border-radius: var(--border-radius-sm);
  max-width: 200px;
}

.dropdown:hover .content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: fit-content;
}

.dropdown:hover span {
  background-color: var(--background-general-subtle);
}

.dropdown a:hover {
  background-color: var(--background-light);
}

.login-header {
  display: flex;
  gap: var(--spacing-xs);
  justify-content: space-between;
}

.login-title {
  align-self: flex-start;
  font-family: var(--typography-family-heading);
  font-size: var(--font-size-3xl);
  font-style: normal;
  font-weight: var(--typography-weight-heading);
  line-height: var(--line-height-xl);
  color: var(--text-dark-strong);
}

.checkbox-wrapper {
  display: flex;
  gap: var(--spacing-2xs);
}

.justify-between {
  display: flex;
  justify-content: space-between;
}

input[type="checkbox"] {
  accent-color: var(--background-primary);
  display: flex;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  justify-content: center;
  align-items: center;
  border-radius: var(--border-radius-sm, 4px);
  border: var(--border-weight-md, 1px) solid
    var(--border-general-emphasis, #aaa);
  background: var(--background-general, #fff);
  margin: 0px;
}

input[type="checkbox"]:hover {
  border: var(--border-weight-md, 1px) solid var(--border-dark-subtle);
}

input[type="checkbox"]:checked {
  background: var(--background-primary);
}

form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

.form-inputs {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-label {
  color: var(--text-dark);
  font-size: var(--font-size-sm);
  font-weight: var(--typography-weight-emphasis);
  line-height: var(--line-height-sm);
  display: block;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.form-group .actions .remember-me .form-label {
  color: var(--text-dark-subtle);
}

.link {
  color: var(--text-link);
  font-size: var(--font-size-sm);
  text-decoration: none;
  font-weight: var(--typography-weight-emphasis);
}

.back-arrow::before {
  content: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20height%3D%2216px%22%20viewBox%3D%220%20-960%20960%20960%22%20width%3D%2216px%22%20fill%3D%22%230A6EDD%22%3E%3Cpath%20d%3D%22M560-240%20320-480l240-240%2056%2056-184%20184%20184%20184-56%2056Z%22%2F%3E%3C%2Fsvg%3E");
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20height%3D%2216px%22%20viewBox%3D%220%20-960%20960%20960%22%20width%3D%2216px%22%20fill%3D%22%230A6EDD%22%3E%3Cpath%20d%3D%22M560-240%20320-480l240-240%2056%2056-184%20184%20184%20184-56%2056Z%22%2F%3E%3C%2Fsvg%3E");
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20height%3D%2216px%22%20viewBox%3D%220%20-960%20960%20960%22%20width%3D%2216px%22%20fill%3D%22%230A6EDD%22%3E%3Cpath%20d%3D%22M560-240%20320-480l240-240%2056%2056-184%20184%20184%20184-56%2056Z%22%2F%3E%3C%2Fsvg%3E");
  background-color: var(--text-link);
  position: relative;
  /* top: 4px; */
}

.form-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.link:hover {
  text-decoration: underline;
  color: var(--text-link-emphasis);
}

.form-input {
  width: 100%;
  background: inherit;
  padding: var(--spacing-xs);
  gap: var(--spacing-xs);
  border: 1px solid var(--border-general);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-md);
  color: var(--text-dark);
}

.form-input.error {
  border-radius: var(--border-radius-sm);
  border: var(--border-weight-md, 1px) solid var(--border-critical-emphasis);
  background: var(--background-critical);
}
.form-input.error:focus {
  border: var(--border-weight-md, 1px) solid var(--border-critical-emphasis);
}

.form-input:hover {
  border-color: var(--border-general-emphasis);
}

.form-input:focus {
  outline: none;
  border: var(--border-weight-md) solid var(--border-select);
}

.form-input::placeholder {
  color: var(--text-dark-subtle);
}

input:disabled,
input[disabled],
.checkbox:disabled,
button:disabled {
  background-color: var(--background-disabled);
  color: var(--text-on-disabled);
  cursor: not-allowed;
}

.btn {
  display: flex;
  min-width: 80px;
  max-width: 480px;
  padding: var(--spacing-2xs, 4px) var(--spacing-sm, 12px);
  justify-content: center;
  align-items: center;

  background-color: var(--background-general);
  width: 100%;
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-lg);
  font-weight: var(--typography-weight-emphasis);
  line-height: var(--line-height-xl);
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn:hover {
  opacity: 0.8;
}

.btn-primary {
  background-color: var(--background-primary);
  color: var(--text-on-primary);
}

.btn-secondary {
  border: var(--border-weight-md) solid var(--border-primary);
}

.btn-secondary:hover {
  border-color: var(--dubber-border-hover);
}

.signup-link {
  text-align: center;
  color: var(--text-dark);
  font-size: 14px;
}

.signup-link a {
  color: var(--text-primary);
  text-decoration: underline;
  font-weight: 500;
}

.signup-link a:hover {
  color: var(--dubber-primary-blue-hover);
}

.support {
  display: flex;
  justify-items: end;
  justify-content: end;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
}

.error {
  font-size: var(--font-size-lg);
  color: var(--text-dark-subtle);
}

.description {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  font-size: var(--font-size-sm);
}

.error-message {
  color: var(--text-critical-strong);
}

.password-requirements,
.totp-requirements {
  background-color: var(--background-light, #fafafa);
  border-left: 3px solid var(--border-general, #d1d5db);
  border-radius: var(--border-radius-sm, 4px);
  padding: var(--spacing-md);
}

.requirements-intro {
  font-size: var(--font-size-sm, 14px);
  font-weight: var(--typography-weight-general, 500);
  color: var(--text-dark, #111827);
  /* margin: 0 0 10px 0; */
}

.requirements-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.requirement-bullet {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: var(--border-radius-sm);
  background-color: var(--text-dark-emphasis);
  position: relative;
  align-self: center;
}

.requirement-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--font-size-sm, 13px);
  line-height: 1.5;
  color: var(--text-general, #4b5563);
  transition: color 0.2s ease;
}

.totp-requirements .requirements-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  counter-reset: totp-counter;
}

.totp-requirements .requirements-list .requirement-item {
  display: flex;
  /* flex-direction: column; */
  align-items: flex-start;
  gap: var(--spacing-xs);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  color: var(--text-dark);
  counter-increment: totp-counter;
}

.totp-requirements .requirements-list .requirement-item::before {
  content: counter(totp-counter) ".";
}

.alert {
  display: flex;
  max-width: 480px;
  padding: var(--spacing-sm, 12px) var(--spacing-md);
  align-items: center;
  gap: var(--spacing-sm);

  border-radius: var(--border-radius-sm);
  background: var(--background-primary);
  position: relative;
  overflow: clip;

  /* elevation/toast */
  box-shadow: 0 0 48px 0 rgba(0, 0, 0, 0.32);
}

.alert-bar {
  width: 8px;
  height: 100%;
  position: absolute;
  left: 0px;
}
.alert-bar.success {
  background: var(--shape-success);
}
.alert-bar.warning {
  background: var(--shape-attention);
}
.alert-bar.error {
  background: var(--shape-critical);
}
.alert-bar.info {
  background: var(--shape-secondary);
}

.alert-text {
  flex: 1 0 0;
  display: inline-flex;
  gap: var(--spacing-xs);
  align-items: center;
  color: var(--text-general, #fff);
  font-size: var(--font-size-sm, 14px);
  line-height: var(--line-height-sm, 18px); /* 128.571% */
}

.alert-text.success::before {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 -960 960 960' width='24px' fill='%2341D01E'%3E%3Cpath d='m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z'/%3E%3C/svg%3E");
  position: relative;
  top: 1px;
}
.alert-text.error::before {
  content: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 -960 960 960' width='24px' fill='%23F23051'%3E%3Cpath d='M440-280h80v-240h-80v240Zm68.5-331.5Q520-623 520-640t-11.5-28.5Q497-680 480-680t-28.5 11.5Q440-657 440-640t11.5 28.5Q463-600 480-600t28.5-11.5ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z'/%3E%3C/svg%3E");
  position: relative;
  top: 1px;
}
.alert-text.info::before {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 -960 960 960' width='24px' fill='%2367BDE8'%3E%3Cpath d='M440-280h80v-240h-80v240Zm68.5-331.5Q520-623 520-640t-11.5-28.5Q497-680 480-680t-28.5 11.5Q440-657 440-640t11.5 28.5Q463-600 480-600t28.5-11.5ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z'/%3E%3C/svg%3E");
  position: relative;
  top: 1px;
}
.alert-text.warning::before {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 -960 960 960' width='24px' fill='%23F89500'%3E%3Cpath d='m40-120 440-760 440 760H40Zm138-80h604L480-720 178-200Zm330.5-51.5Q520-263 520-280t-11.5-28.5Q497-320 480-320t-28.5 11.5Q440-297 440-280t11.5 28.5Q463-240 480-240t28.5-11.5ZM440-360h80v-200h-80v200Zm40-100Z'/%3E%3C/svg%3E");
  position: relative;
  top: 1px;
}

/* pf classes */
.flex-wrap {
  flex-wrap: wrap;
}

.flex-nowrap {
  flex-wrap: nowrap;
}

/* OTP Credential List */
.otp-credential-item {
  display: flex;
  padding: var(--spacing-sm) var(--spacing-md);
  border: var(--border-weight-md) solid var(--border-general-subtle);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
  margin-bottom: var(--spacing-xs);
}

.otp-credential-item:hover {
  border-color: var(--border-general-emphasis);
  background-color: var(--background-general-subtle);
}

.otp-credential-item.otp-credential-selected {
  border-color: var(--border-select);
  background-color: var(--background-secondary-subtle);
}

.otp-credential-title {
  font-size: var(--font-size-sm);
  font-weight: var(--typography-weight-emphasis);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.otp-credential-title::before {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 -960 960 960' width='24px' fill='%23555561'%3E%3Cpath d='M280-40q-33 0-56.5-23.5T200-120v-720q0-33 23.5-56.5T280-920h400q33 0 56.5 23.5T760-840v124q18 7 29 22t11 34v80q0 19-11 34t-29 22v404q0 33-23.5 56.5T680-40H280Zm0-80h400v-720H280v720Zm0 0v-720 720Zm228.5-611.5Q520-743 520-760t-11.5-28.5Q497-800 480-800t-28.5 11.5Q440-777 440-760t11.5 28.5Q463-720 480-720t28.5-11.5Z'/%3E%3C/svg%3E");
}

.qr-code {
  display: flex;
  flex-direction: column;
  padding-top: var(--spacing-sm);
}

.hidden {
  display: none;
}

/* Full page loading overlay */
.page-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background-light);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xl);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-general-subtle);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Main content container */
.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
  min-height: 500px;
}

/* Responsive design for standalone login */
@media (max-width: 480px) {
  .login-card {
    padding: var(--spacing-sm);
  }

  .login-title {
    font-size: var(--font-size-xl);
  }

  .logo {
    height: 84px;
    width: 200px;
  }
}
