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

/* Normalize CSS for consistent rendering across browsers */
html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: #fff !important;

  /* font-size: 14px !important; */

  /* line-height: 1.66666667 !important; */
  color: #363636 !important;

  /* padding: 0 !important; */
  font-family: "Open Sans", Helvetica, Arial, sans-serif !important;
  margin: 0 !important;
}

main {
  display: block;
}

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
}

pre {
  font-family: monospace, monospace;
  font-size: 1em;
}

a {
  background-color: transparent;
  color: inherit;
  text-decoration: none;
}

abbr[title] {
  border-bottom: none;
  text-decoration: underline dotted;
}

b,
strong {
  font-weight: bolder;
}

code,
kbd,
samp {
  font-family: monospace, monospace;
  font-size: 1em;
}

small {
  font-size: 80%;
}

img {
  border-style: none;
  height: auto;
  max-width: 100%;
}

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

button,
input {
  overflow: visible;
}

button,
select {
  text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}

fieldset {
  padding: 0.35em 0.75em 0.625em;
}

legend {
  box-sizing: border-box;
  color: inherit;
  display: table;
  max-width: 100%;
  padding: 0;
  white-space: normal;
}

progress {
  vertical-align: baseline;
}

textarea {
  overflow: auto;
}

[type="checkbox"],
[type="radio"] {
  box-sizing: border-box;
  padding: 0;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

[type="search"] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

details {
  display: block;
}

summary {
  display: list-item;
}

template {
  display: none;
}

[hidden] {
  display: none;
}

:root {
  --color-primary: #141532;
  --color-accent: #90ffbc;
  --color-button-primary: #002f36;
  --color-input-border: #dadada;
  --color-input-bg: #f6f8fb;
  --color-link: #002f36;
  --color-social-border: #002f36;
  --color-social-hover: #90ffbc;
  --color-bg: #fff;

  font-family: Roboto, sans-serif;
}

body,
.login-pf body {
  background: #fff !important;
  font-family: Roboto, sans-serif !important;
  margin: 0 !important;
  width: 100% !important;
}

#kc-header,
.login-pf-page .login-pf-header,
.login-pf-page-header {
  display: none !important;
}

.login-main {
  align-items: center;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  width: 100%;
}

.login-left {
  align-items: center;
  box-sizing: border-box !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: auto;
  width: 100%;
}

.login-right-bg {
  background: url("../img/kvarn-phone.png") no-repeat center center !important;
  background-color: transparent !important;
  background-size: contain !important;
  display: flex !important;
  flex-direction: column;
  height: 600px !important;
  max-height: 80vh !important;
  width: 100% !important;
}

.login-pf-social {
  margin: 0;
  overflow: visible !important;
  -ms-overflow-style: none !important;

  /* Hide any scrollbars */
  scrollbar-width: none !important;
}

.login-pf-social::-webkit-scrollbar {
  display: none !important;
}

#kc-social-providers {
  display: block !important;
  flex: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
  -ms-overflow-style: none !important;

  /* Hide any scrollbars */
  scrollbar-width: none !important;
  width: 100% !important;
}

#kc-social-providers::-webkit-scrollbar {
  display: none !important;
}

.custom-login-pf-social-link a {
  align-items: center !important;
  background-color: #fff !important;
  border: 1.5px solid var(--color-input-border) !important;
  border-radius: 32px !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  color: var(--color-primary) !important;
  display: flex !important;
  font-family: Muli, sans-serif !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  gap: 12px !important;
  height: 50px !important;
  justify-content: flex-start !important;
  margin: 10px 0 !important;
  min-height: 50px !important;
  outline: none !important;
  padding: 0 20px !important;
  text-decoration: none !important;
  transition:
    background 0.2s,
    color 0.2s,
    border 0.2s !important;
  width: 100%;
}

.custom-login-pf-social-link a:hover {
  background: var(--color-social-hover);
  border-color: var(--color-social-hover);
  color: var(--color-button-primary);
}

.login-options-container {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  margin-top: 15px;
  width: 100%;
}

#showPasswordForm {
  background-color: #fff !important;
  border: 1.5px solid var(--color-input-border) !important;
  border-radius: 32px !important;
  box-sizing: border-box !important;
  color: var(--color-primary) !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  margin: 0;
  padding: 10px !important;
}

#privacyPolicy {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 18px;
  margin: 0;
  text-decoration: underline;
}

.login-branding {
  margin-bottom: 16px;
  margin-top: 0;
  text-align: left;
}

.login-title {
  color: var(--color-primary);
  font-size: 30px;
  font-weight: 400;
  margin-bottom: 8px;
  margin-top: 0;
  text-align: left;
}

.login-welcome {
  color: var(--color-primary);
  font-size: 18px;
  margin-bottom: 0;
  text-align: left;
}

/* Global alert error styling */
.alert-error {
  /* gap: 12px !important; */

  /* display: flex !important; */
  background-color: #f2dede;
  border: 1px solid #ebccd1;
  color: #a94442;

  /* flex: 1 !important; */

  /* flex-direction: row !important; */

  /* align-items: flex-start !important; */

  /* justify-content: center !important; */
  text-align: left !important;

  /* padding: 15px; */

  /* margin-bottom: 20px; */

  /* border-radius: 4px; */
  width: 100%;
}

.alert-success {
  align-items: center !important;
  background-color: #dff0d8;
  border: 1px solid #d6e9c6;
  border-radius: 4px;
  color: #3c763d;
  display: flex !important;
  flex: 1 !important;
  flex-direction: row !important;
  gap: 12px !important;
  justify-content: center !important;
  margin-bottom: 20px;
  padding: 15px;
  text-align: center !important;
}

.alert-success .pficon {
  color: #3c763d !important;
  font-size: 18px;
}

.alert-error .pficon {
  color: #721c24 !important;
  flex-shrink: 0 !important;
  font-size: 18px !important;
  position: static !important;
}

.alert-success {
  align-items: center !important;
  background-color: #d4edda !important;
  border: 1px solid #c3e6cb !important;
  border-left: 4px solid #28a745 !important;
  border-radius: 4px !important;
  box-sizing: border-box !important;
  color: #155724 !important;
  display: flex !important;
  gap: 10px !important;
  padding: 12px 18px !important;
  text-align: left !important;
  width: 100% !important;
}

.alert-success .pficon {
  color: #155724 !important;
  flex-shrink: 0 !important;
  font-size: 18px !important;
  position: static !important;
}

.alert-error .kc-feedback-text,
.alert-success .kc-feedback-text {
  flex: 1;
  word-wrap: break-word;
}

/* Patternfly danger variant */
.pf-m-danger {
  background-color: #f2dede !important;
  border-color: #ebccd1 !important;
  color: #a94442 !important;
}

/* Patternfly success variant */
.pf-m-success {
  background-color: #dff0d8 !important;
  border-color: #d6e9c6 !important;
  color: #3c763d !important;
}

.login-pf {
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Ensure white background everywhere */
html,
body,
.login-page-wrapper {
  background-color: #fff !important;
}

.card-pf {
  background: #fff !important;
  border-top: 0 !important;
  box-shadow: none !important;
  padding: 0 20px !important;
}

.header-logo-img {
  align-items: center;
  display: flex;
  justify-content: center;
  margin-bottom: 0;
  margin-top: 0;
  width: 250px;
}

.header-logo-img img {
  display: block;
  height: auto;
  width: 220px;
}

/* Password form toggle styling */
#passwordForm {
  margin-bottom: 10px;
  margin-top: 20px;
  min-height: 300px;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  width: 100%;
}

#passwordForm.show {
  display: block !important;
}

#passwordForm.hide {
  display: none !important;
}

/* Fade animation for password form inner */
.username-password-inner {
  overflow: visible;
  transition:
    opacity 0.3s ease-in-out,
    max-height 0.3s ease-in-out;
}

.username-password-inner.hidden {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.username-password-inner.show {
  max-height: 1000px;
  opacity: 1;
  pointer-events: auto;
}

/* ===== THREE ROW LAYOUT: HEADER | CONTENT | FOOTER ===== */

/* Allow scrolling but hide scrollbar */
html,
body {
  /* margin: 0; */

  /* padding: 0; */

  /* height: 100%; */

  /* width: 100%; */

  /* overflow-x: hidden; */

  /* overflow-y: auto; */

  /* Hide scrollbar for Chrome, Safari and Opera */

  /* scrollbar-width: none; */

  /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Global page wrapper */
.login-page-wrapper {
  margin: 0;
  -ms-overflow-style: none; /* IE and Edge */

  /* min-height: 100vh; */

  /* display: flex; */

  /* flex-direction: column; */

  /* align-items: center; */

  /* justify-content: center; */

  /* background-color: #fff; */
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;

  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
}

.login-page-wrapper::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Content row - Two columns (left form + right image) */
.login-content-row {
  align-items: center;
  display: flex;
  justify-content: center;
  margin: 0 auto;
  max-width: 1200px;
  padding: 0;
  width: 100%;
}

/* PatternFly-inspired responsive grid layout */
.login-pf-container {
  align-items: center;
  display: flex;
  gap: 40px;
  justify-content: center;
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
}

.login-pf-row {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 40px;
  justify-content: center;
  width: 100%;
}

/* Column system - PatternFly inspired */
.login-pf-col-left {
  display: flex;
  flex: 0 0 450px;
  flex-direction: column;
  justify-content: flex-start;
  max-width: 450px;
  min-height: auto;
  overflow: visible;
  width: 100%;
}

.login-pf-col-right {
  align-items: center;
  display: flex;
  flex: 0 0 500px;
  flex-shrink: 0;
  justify-content: center;
  max-width: 500px;
  overflow: hidden;
  width: 100%;
}

.username-password-form input,
.username-password-form label,
.username-password-form .form-group {
  box-sizing: border-box !important;
  font-size: 16px;
  font-weight: 400;
  text-align: left !important;
  width: 100% !important;
}

.username-password-form label {
  font-weight: bold !important;
}

.username-password-form input[type="text"],
.username-password-form input[type="password"] {
  background: var(--color-input-bg) !important;
  border: 1.5px solid var(--color-input-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(0, 47, 54, 0.04) !important;
  color: var(--color-primary) !important;
  font-family: Muli, sans-serif !important;
  font-size: 18px !important;
  height: 45px !important;
  margin-bottom: 16px !important;
  padding: 25px 18px !important;
  transition: border 0.2s;
}

.username-password-form input[type="text"]:focus,
.username-password-form input[type="password"]:focus {
  border-color: var(--color-accent);
  outline: 2px solid var(--color-accent);
}

.username-password-form input[type="submit"] {
  background: var(--color-accent);
  border: none;
  border-radius: 24px;
  box-shadow: 0 2px 8px rgba(0, 47, 54, 0.04);
  color: var(--color-button-primary);
  cursor: pointer;
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 8px;
  margin-top: 8px;
  padding: 14px 0;
  transition: background 0.2s;
  width: 100%;
}

.username-password-form input[type="submit"]:hover {
  background: #6beea0;
}

.username-password-form {
  position: relative;
  text-align: left !important;
  transition: min-height 0.3s;
  width: 100% !important;
}

.flag-icon {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.08);
  height: 30px;
  margin-right: 8px;
  object-fit: contain;
  vertical-align: middle;
  width: 30px;
}

.custom-status-link {
  bottom: 10px;
  color: var(--color-primary);
  font-size: 18px;
  font-weight: bold;
  padding: 10px 15px;
  position: fixed;
  right: 20px;
  z-index: 1000;
}

/* Hide Keycloak's global error alert at the top */

/* Hide old positioned alerts - we show them in left column now */
#kc-header-wrapper + .alert-error,
#kc-header + .alert-error,
#kc-content-wrapper > .alert-error:not(.login-left .alert-error),
#kc-header-wrapper + .alert-success,
#kc-header + .alert-success,
#kc-content-wrapper > .alert-success:not(.login-left .alert-success) {
  display: none !important;
}

/* Remove list-style from social login list */
.login-pf-social,
.login-pf-social li,
.login-pf-social-all,
.custom-login-pf-social-link {
  list-style: none !important;
  margin-left: 0 !important;
  overflow: visible !important;
  padding-left: 0 !important;
}

/* PatternFly-inspired responsive breakpoints */

/* Large screens (lg) - 1200px+ */
@media (min-width: 1200px) {
  .login-pf-col-left {
    flex: 0 0 450px;
    max-width: 450px;
  }

  .login-pf-col-right {
    flex: 0 0 500px;
    max-width: 500px;
  }
}

/* Medium screens (md) - 992px to 1199px */
@media (min-width: 992px) and (max-width: 1199px) {
  .login-pf-col-left {
    flex: 0 0 420px;
    max-width: 420px;
  }

  .login-pf-col-right {
    flex: 0 0 450px;
    max-width: 450px;
  }

  .login-pf-row {
    gap: 30px;
  }

  .login-right-bg {
    height: 500px !important;
  }
}

/* Small/Medium screens (sm) - 768px to 991px - Hide right image */
@media (min-width: 768px) and (max-width: 991px) {
  .login-pf-col-left {
    flex: 0 0 100%;
    margin: 0 auto;
    max-width: 500px;
  }

  .login-pf-col-right {
    display: none !important;
  }

  .login-right-bg {
    display: none !important;
  }

  .login-pf-row {
    justify-content: center;
  }

  .login-content-row {
    padding: 24px 20px;
  }
}

/* Mobile screens (xs) - below 768px - Stack vertically */
@media (max-width: 767px) {
  html,
  body {
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
  }

  .login-page-wrapper {
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
    width: 100%;
  }

  .login-content-row {
    box-sizing: border-box;
    overflow-x: hidden;
    padding: 8px 16px;
    width: 100%;
  }

  .login-pf-container {
    overflow-x: hidden;
    padding: 0;
    width: 100%;
  }

  .login-pf-col-left {
    box-sizing: border-box;
    flex: 0 0 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
  }

  .login-pf-col-right {
    display: none !important;
  }

  .login-right-bg {
    display: none !important;
  }

  .login-pf-row {
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
  }

  .header-logo-img img {
    max-width: 100%;
    width: 200px;
  }

  .login-title {
    font-size: 24px !important;
  }

  .login-welcome {
    font-size: 16px !important;
  }

  .login-branding {
    margin-bottom: 16px;
  }

  .login-left {
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    width: 100% !important;
  }

  .custom-login-pf-social-link a {
    box-sizing: border-box !important;
    font-size: 16px !important;
    max-width: 100% !important;
    padding: 13px 16px !important;
    width: 100% !important;
  }

  #kc-social-providers {
    box-sizing: border-box !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    width: 100% !important;
  }
}

/* Legacy support for existing breakpoints */
@media (max-width: 900px) {
  .kv-login-right-bg {
    display: none;
  }

  .login-left {
    display: block;
    width: 100% !important;
  }
}

/* Reset password form */

/* Reset Password Form - Aligned with all other forms */
#kc-reset-password-form {
  margin: 0 !important;
  max-width: 100% !important;
  padding: 0 !important;
  width: 100% !important;
}

#kc-reset-password-form .form-group {
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
}

#kc-reset-password-form label {
  box-sizing: border-box !important;
  color: #000 !important;
  display: block !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  margin-bottom: 8px !important;
  max-width: 100% !important;
  padding: 0 !important;
  text-align: left !important;
  width: 100% !important;
}

#kc-reset-password-form input[type="text"],
#kc-reset-password-form input[type="password"] {
  background: #fff !important;
  border: 1px solid #d3d4d5 !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
  color: #000 !important;
  font-size: 16px !important;
  height: 58px !important;
  margin: 0 !important;
  max-width: 100% !important;
  padding: 12px 16px !important;
  transition: border-color 0.2s !important;
  width: 100% !important;
}

#kc-reset-password-form input[type="text"]:focus,
#kc-reset-password-form input[type="password"]:focus {
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 0 3px rgba(144, 255, 188, 0.2) !important;
  outline: none !important;
}

#kc-reset-password-form input[type="submit"] {
  background: var(--color-accent) !important;
  border: none !important;
  border-radius: 24px !important;
  box-shadow: 0 2px 8px rgba(0, 47, 54, 0.04) !important;
  box-sizing: border-box !important;
  color: var(--color-button-primary) !important;
  cursor: pointer !important;
  display: block !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  margin-bottom: 8px !important;
  margin-top: 8px !important;
  max-width: 100% !important;
  padding: 14px 0 !important;
  text-align: center !important;
  transition: background 0.2s !important;
  width: 100% !important;
}

#kc-reset-password-form input[type="submit"]:hover {
  background: #6beea0 !important;
}

/* Error messages */
#kc-reset-password-form .input-error-message {
  color: #dc3545 !important;
  display: block !important;
  font-size: 14px !important;
  margin-top: 8px !important;
  text-align: left !important;
  width: 100% !important;
}

#kc-info {
  color: var(--color-primary);
  font-size: 18px;
  font-weight: 400;
  margin-top: 16px;
  text-align: center;
}

.reset-password-center #kc-info-wrapper {
  color: var(--color-primary);
  margin: 0 auto;
  padding: 0;
}

.reset-password-title {
  color: var(--color-primary);
  font-size: 2rem;
  font-weight: 700;

  /* text-align: center; */
  margin-bottom: 32px;

  /* margin-top: 32px; */
}

/* Responsive heading styles */
h1,
.h1 {
  color: var(--color-primary);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.2rem;
}

h2,
.h2 {
  color: var(--color-primary);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 1rem;
}

h3,
.h3 {
  color: var(--color-primary);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.8rem;
}

@media (max-width: 768px) {
  h1,
  .h1 {
    font-size: 2rem;
  }

  h2,
  .h2 {
    font-size: 1.5rem;
  }

  h3,
  .h3 {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  h1,
  .h1 {
    font-size: 1.5rem;
  }

  h2,
  .h2 {
    font-size: 1.2rem;
  }

  h3,
  .h3 {
    font-size: 1rem;
  }
}

/* ===== SELECT AUTHENTICATOR PAGE STYLING ===== */
#kc-select-authenticator {
  max-width: 100% !important;
  width: 100% !important;
}

#kc-select-authenticator-form {
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

.login-pf-social-all,
ul.login-pf-social-all {
  list-style: none !important;
  margin: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
  -ms-overflow-style: none !important;
  padding: 0 !important;

  /* Hide any scrollbars */
  scrollbar-width: none !important;
  width: 100% !important;
}

.login-pf-social-all::-webkit-scrollbar,
ul.login-pf-social-all::-webkit-scrollbar {
  display: none !important;
}

.login-pf-social-section {
  flex: 1 !important;
  max-width: 100% !important;
  overflow: visible !important;
  -ms-overflow-style: none !important;

  /* Hide any scrollbars */
  scrollbar-width: none !important;
  width: 100% !important;
}

.login-pf-social-section::-webkit-scrollbar {
  display: none !important;
}

/* Ensure select-authenticator has same spacing as login page */
#kc-select-authenticator .login-left {
  max-width: 100% !important;
  width: 100% !important;
}

/* Override PatternFly media query widths for selector buttons */
.custom-login-pf-social-link,
.custom-login-pf-social-link a,
li.custom-login-pf-social-link,
li.custom-login-pf-social-link a {
  box-sizing: border-box !important;
  flex: 1 !important;
  height: 50px !important;
  max-width: 100% !important;
  min-height: 50px !important;
  width: 100% !important;
}

#backToLogin,
#try-another-way {
  color: rgb(0, 0, 0) !important;
  display: inline-block;
  font-size: 14px !important;
  margin-top: 20px;
  text-decoration: none !important;
}

#backToLogin:hover,
#try-another-way:hover {
  text-decoration: underline !important;
}

/* WebAuthn error form styling */
#kc-error-credential-form,
#kc-select-try-another-way-form {
  width: 100% !important;
}

#kc-try-again {
  max-width: 100% !important;
  width: 100% !important;
}

/* Service Status Link Styling - Bottom of left column */
.service-status-container {
  bottom: 20px;
  padding: 0;
  position: fixed;
  right: 20px;
  text-align: right;
  z-index: 1000;
}

.service-status-link {
  align-items: center;
  color: #000 !important;
  display: inline-flex;
  font-size: 14px !important;
  font-weight: 500;
  gap: 8px;
  justify-content: flex-end;
  text-decoration: none !important;
  transition: opacity 0.2s ease;
}

.service-status-link:hover {
  opacity: 0.7;
  text-decoration: underline !important;
}

.service-status-link::before {
  color: #00a550;
  content: "●";
  font-size: 12px;
}

/* Hide duplicate service status in provider list */
.custom-status-link {
  display: none !important;
}

/* ===== ERROR PAGE STYLING ===== */
#kc-error-message,
.alert-error {
  align-items: flex-start !important;
  background-color: #f8f9fa !important;
  border-left: 4px solid #dc3545 !important;
  border-radius: 4px !important;
  display: flex !important;
  gap: 12px !important;
  margin: 24px 0 !important;
  padding: 20px !important;
}

.alert-error.pf-m-danger {
  background-color: #f8f9fa !important;
  border-left: 4px solid #dc3545 !important;
  border-radius: 4px !important;
  margin: 24px 0 !important;
  padding: 20px !important;
}

.pf-c-alert__icon {
  flex-shrink: 0 !important;
}

.pf-c-alert__icon .pficon {
  color: #dc3545 !important;
  font-size: 20px !important;
}

.error-message-text {
  color: #000;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
}

#kc-error-message p {
  color: #000;
  margin: 0;
}

/* Error page button styling */
.btn-block {
  box-sizing: border-box !important;
  display: block !important;
  max-width: 100% !important;
  width: 100% !important;
}

/* Error page "Try again" button - match login button style */
#kc-error-message + div a.btn-primary,
.login-left a.btn-primary {
  background: var(--color-accent) !important;
  border: none !important;
  border-radius: 24px !important;
  box-shadow: 0 2px 8px rgba(0, 47, 54, 0.04) !important;
  box-sizing: border-box !important;
  color: var(--color-button-primary) !important;
  cursor: pointer !important;
  display: block !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  margin-bottom: 8px !important;
  margin-top: 8px !important;
  max-width: 100% !important;
  padding: 14px 0 !important;
  text-align: center !important;
  text-decoration: none !important;
  transition: background 0.2s !important;
  width: 100% !important;
}

#kc-error-message + div a.btn-primary:hover,
.login-left a.btn-primary:hover {
  background: #6beea0 !important;
  text-decoration: none !important;
}

/* ===== INFO PAGE STYLING ===== */
#kc-info-message {
  background-color: #f8f9fa;
  border-left: 4px solid #28a745;
  border-radius: 4px;
  margin: 24px 0;
  padding: 20px;
}

.info-message-text {
  color: #000;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
}

/* Info page action buttons - match login button style */
#kc-info-message + div a.btn-primary {
  background: var(--color-accent) !important;
  border: none !important;
  border-radius: 24px !important;
  box-shadow: 0 2px 8px rgba(0, 47, 54, 0.04) !important;
  box-sizing: border-box !important;
  color: var(--color-button-primary) !important;
  cursor: pointer !important;
  display: block !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  margin-bottom: 8px !important;
  margin-top: 8px !important;
  max-width: 100% !important;
  padding: 14px 0 !important;
  text-align: center !important;
  text-decoration: none !important;
  transition: background 0.2s !important;
  width: 100% !important;
}

#kc-info-message + div a.btn-primary:hover {
  background: #6beea0 !important;
  text-decoration: none !important;
}

#kc-info-message p {
  color: #000;
  margin: 0;
}

/* ===== BUTTON STYLING ===== */

/* Keycloak button property classes (used in buttons.ftl) */

/* Green pill-shaped buttons - default style for all buttons */
.pf-c-button,
.pf-c-button.pf-m-primary,
.kcButtonClass,
button[type="submit"],
input[type="submit"] {
  background: linear-gradient(135deg, #90ffbc 0%, #7de8a8 100%) !important;
  border: none !important;
  border-radius: 50px !important;
  box-shadow: 0 2px 8px rgba(144, 255, 188, 0.25) !important;
  box-sizing: border-box !important;
  color: #000 !important;
  cursor: pointer !important;
  display: block !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  margin-bottom: 12px !important;
  padding: 16px 32px !important;
  text-align: center !important;
  text-decoration: none !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  width: 100% !important;
}

.pf-c-button:hover,
.pf-c-button.pf-m-primary:hover,
.kcButtonClass:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  background: linear-gradient(135deg, #7de8a8 0%, #90ffbc 100%) !important;
  box-shadow: 0 4px 12px rgba(144, 255, 188, 0.35) !important;
  text-decoration: none !important;
  transform: translateY(-1px) !important;
}

.pf-c-button:active,
.pf-c-button.pf-m-primary:active,
.kcButtonClass:active,
button[type="submit"]:active,
input[type="submit"]:active {
  transform: translateY(0) !important;
}

/* PatternFly flex utilities for button groups */
.pf-v5-u-flex-nowrap {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
}

.pf-v5-u-flex-wrap {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

/* Form group and action group styling */
.kcFormGroupClass,
.pf-c-form__group {
  margin-bottom: 16px !important;
  width: 100% !important;
}

.kcFormActionGroupClass,
.pf-c-form__actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 100% !important;
}

/* Primary button - green pill-shaped button */
.btn-primary,
a.btn-primary,
button.btn-primary,
input[type="button"].btn-primary,
input[type="submit"].btn-primary,
input[type="button"],
button[type="button"] {
  background: linear-gradient(135deg, #90ffbc 0%, #7de8a8 100%) !important;
  border: none !important;
  border-radius: 50px !important;
  box-shadow: 0 2px 8px rgba(144, 255, 188, 0.25) !important;
  box-sizing: border-box !important;
  color: #000 !important;
  cursor: pointer !important;
  display: block !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  margin-bottom: 12px !important;
  padding: 16px 32px !important;
  text-align: center !important;
  text-decoration: none !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  width: 100% !important;
}

.btn-primary:hover,
a.btn-primary:hover,
button.btn-primary:hover,
input[type="button"].btn-primary:hover,
input[type="submit"].btn-primary:hover,
input[type="button"]:hover,
button[type="button"]:hover {
  background: linear-gradient(135deg, #7de8a8 0%, #90ffbc 100%) !important;
  box-shadow: 0 4px 12px rgba(144, 255, 188, 0.35) !important;
  text-decoration: none !important;
  transform: translateY(-1px) !important;
}

.btn-primary:active,
a.btn-primary:active,
button.btn-primary:active,
input[type="button"].btn-primary:active,
input[type="submit"].btn-primary:active,
input[type="button"]:active,
button[type="button"]:active {
  transform: translateY(0) !important;
}

/* Secondary button */
.btn-secondary,
a.btn-secondary,
button.btn-secondary,
.pf-c-button.pf-m-secondary,
.pf-c-button.pf-m-link {
  background-color: #f8f9fa !important;
  border: 1px solid #d3d4d5 !important;
  border-radius: 50px !important;
  box-sizing: border-box !important;
  color: #212529 !important;
  cursor: pointer !important;
  display: block !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  max-width: 100% !important;
  padding: 12px 20px !important;
  text-align: center !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  width: 100% !important;
}

.btn-secondary:hover,
a.btn-secondary:hover,
button.btn-secondary:hover,
.pf-c-button.pf-m-secondary:hover,
.pf-c-button.pf-m-link:hover {
  background-color: #e2e3e5 !important;
  border-color: #c6c7c8 !important;
  text-decoration: none !important;
  transform: translateY(-1px) !important;
}

/* ===== OTP LOGIN PAGE STYLING ===== */
#kc-otp-login-form {
  max-width: 100% !important;
  width: 100% !important;
}

#kc-otp-login-form input[type="text"]#otp {
  border: 1px solid #d3d4d5 !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 18px !important;
  max-width: 100% !important;
  padding: 12px 16px !important;
  transition: border-color 0.2s !important;
  width: 100% !important;
}

#kc-otp-login-form input[type="text"]#otp:focus {
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 0 3px rgba(144, 255, 188, 0.2) !important;
  outline: none !important;
}

.otp-credential-card {
  align-items: center !important;
  background-color: #f8f9fa !important;
  border: 2px solid #e0e0e0 !important;
  border-radius: 12px !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  display: flex !important;
  gap: 12px !important;
  padding: 16px !important;
  transition: all 0.2s ease !important;
  width: 100% !important;
}

.otp-credential-card:hover {
  background-color: #e8fff3 !important;
  border-color: #90ffbc !important;
  box-shadow: 0 4px 12px rgba(0, 47, 54, 0.08) !important;
  transform: translateY(-2px) !important;
}

.otp-credential-card.active {
  background-color: #e8fff3 !important;
  border-color: var(--color-accent) !important;
}

.otp-credential-card span {
  color: #000 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
}

/* ===== PASSKEY SUGGESTION PAGE STYLING ===== */
#register-passkey-suggestion {
  margin: 0 auto !important;
  max-width: 450px !important;
  width: 100% !important;
}

#register-passkey-suggestion h2,
#register-passkey-suggestion h4 {
  color: #000 !important;
  text-align: center !important;
}

#register-passkey-suggestion h2 {
  font-size: 24px !important;
  margin-bottom: 16px !important;
}

#register-passkey-suggestion h4 {
  font-size: 16px !important;
  font-weight: 400 !important;
  margin-bottom: 24px !important;
}

#register-passkey-suggestion button {
  font-size: 16px !important;
  margin-bottom: 12px !important;
  padding: 12px 20px !important;
  width: 100% !important;
}

/* ===== WEBAUTHN REGISTER PAGE STYLING ===== */
#register {
  margin: 0 auto !important;
  max-width: 500px !important;
  width: 100% !important;
}

#registerWebAuthn,
#cancelWebAuthnAIA {
  border-radius: 4px !important;
  font-size: 16px !important;
  margin-bottom: 12px !important;
  padding: 14px 20px !important;
  width: 100% !important;
}

#kc-webauthn-settings-form {
  margin: 0 auto !important;
  max-width: 500px !important;
  width: 100% !important;
}

/* ===== RESPONSIVE OVERRIDES FOR ALL PAGES ===== */
@media (max-width: 768px) {
  /* Passkey suggestion - mobile */
  #register-passkey-suggestion {
    max-width: 100% !important;
  }

  #register-passkey-suggestion h2 {
    font-size: 22px !important;
  }

  #register-passkey-suggestion h4 {
    font-size: 14px !important;
  }

  #register-passkey-suggestion button {
    font-size: 15px !important;
    padding: 14px 18px !important;
  }

  /* WebAuthn register - mobile */
  #register {
    max-width: 100% !important;
  }

  #registerWebAuthn,
  #cancelWebAuthnAIA {
    font-size: 15px !important;
    padding: 12px 18px !important;
  }

  .login-pf-page .login-pf-header span {
    font-size: 22px !important;
  }
}

/* Tablet breakpoint */
@media (min-width: 769px) and (max-width: 1024px) {
  #register-passkey-suggestion {
    max-width: 400px !important;
  }

  #register {
    max-width: 450px !important;
  }
}

/* Desktop breakpoint */
@media (min-width: 1025px) {
  #register-passkey-suggestion {
    max-width: 450px !important;
  }

  #register {
    max-width: 500px !important;
  }
}

/* Hide "Try Another Way" link */
#try-another-way {
  display: none !important;
}

/* Ensure all text is black */
.login-title,
.login-welcome,
.custom-login-pf-social-link a,
.custom-login-pf-social-link a span,
.login-pf-page .login-pf-header span {
  color: #000 !important;
}

/* User Title Visibility */
#existingUserTitle {
  display: none;
}

/* Kvarn X Modern Layout */
.login-page-wrapper {
  align-items: center;
  background: #f8f9fa;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-content-row {
  max-width: 1200px;
  width: 100%;
}

.login-pf-container {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.login-pf-row {
  display: flex;
  min-height: 600px;
}

.login-pf-col-left {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 60px 50px;
}

.login-pf-col-right {
  align-items: center;
  display: flex;
  flex: 1;
  justify-content: center;
  position: relative;
}

.login-right-bg {
  background: url("../img/kvarn-phone.png") no-repeat center center !important;
  background-size: contain !important;
  height: 100%;
  width: 100%;
}

/* Kvarn X Typography */
.login-title {
  color: #1a1a1a;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 12px;
  text-align: center;
}

.login-welcome {
  color: #6c757d;
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
  text-align: center;
}

.login-branding {
  margin-bottom: 5px;
}

/* Kvarn X Button Styling */
.custom-login-pf-social-link {
  list-style: none;
  margin-bottom: 12px;
}

.custom-login-pf-social-link a {
  align-items: center;
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  color: #1a1a1a;
  display: flex;
  font-size: 16px;
  font-weight: 600;
  justify-content: center;
  overflow: hidden;
  padding: 16px 24px;
  position: relative;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-login-pf-social-link a:hover {
  background: #f8f9fa;
  border-color: #90ffbc;
  box-shadow: 0 8px 16px rgba(144, 255, 188, 0.2);
  transform: translateY(-2px);
}

.custom-login-pf-social-link a:active {
  transform: translateY(0);
}

/* Passkey Highlight Section */
.passkey-highlight-section {
  background: linear-gradient(135deg, #90ffbc15 0%, #7de8a825 100%);
  border: 2px solid #90ffbc;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(144, 255, 188, 0.2);
  margin: 32px 0;
  padding: 24px;
}

.passkey-promo {
  margin-bottom: 20px;
  text-align: center;
}

.passkey-badge {
  background: linear-gradient(135deg, #90ffbc 0%, #7de8a8 100%);
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(144, 255, 188, 0.3);
  color: #1a1a1a;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding: 6px 16px;
}

.passkey-heading {
  color: #1a1a1a;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin: 12px 0 8px;
}

.passkey-description {
  color: #6c757d;
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 16px;
}

/* Passkey Button */
#passkeyItem .custom-login-pf-social-link a {
  background: linear-gradient(135deg, #90ffbc 0%, #7de8a8 100%);
  border: 2px solid #90ffbc;
  box-shadow: 0 4px 16px rgba(144, 255, 188, 0.3);
  color: #1a1a1a;
  font-size: 18px;
  font-weight: 700;
  padding: 20px 24px;
}

#passkeyItem .custom-login-pf-social-link a:hover {
  background: linear-gradient(135deg, #7de8a8 0%, #90ffbc 100%);
  border-color: #7de8a8;
  box-shadow: 0 8px 24px rgba(144, 255, 188, 0.4);
  transform: translateY(-3px);
}

#passkeyItem .custom-login-pf-social-link a:active {
  transform: translateY(-1px);
}

/* Passkey Benefits Section (Suggestion Page) */
.passkey-benefits-section {
  background: linear-gradient(135deg, #90ffbc15 0%, #7de8a825 100%);
  border: 2px solid #90ffbc;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(144, 255, 188, 0.2);
  margin: 16px 0 24px;
  max-width: 100%;
  padding: 24px;
}

.passkey-benefits-heading {
  color: #1a1a1a;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  margin: 12px 0 16px;
  text-align: center;
}

.passkey-benefits-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.passkey-benefits-list li {
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  padding: 10px 0;
}

/* Passkey Register Button - Same as default green pill button */
.passkey-register-button,
button.passkey-register-button,
button.passkey-register-button[type="submit"],
input.passkey-register-button[type="submit"] {
  background: linear-gradient(135deg, #90ffbc 0%, #7de8a8 100%) !important;
  border: none !important;
  border-radius: 50px !important;
  box-shadow: 0 2px 8px rgba(144, 255, 188, 0.25) !important;
  box-sizing: border-box !important;
  color: #000 !important;
  cursor: pointer !important;
  display: block !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  margin-bottom: 12px !important;
  padding: 16px 32px !important;
  text-align: center !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  width: 100% !important;
}

.passkey-register-button:hover,
button.passkey-register-button:hover,
button.passkey-register-button[type="submit"]:hover,
input.passkey-register-button[type="submit"]:hover {
  background: linear-gradient(135deg, #7de8a8 0%, #90ffbc 100%) !important;
  box-shadow: 0 4px 12px rgba(144, 255, 188, 0.35) !important;
  transform: translateY(-1px) !important;
}

.passkey-register-button:active,
button.passkey-register-button:active,
button.passkey-register-button[type="submit"]:active,
input.passkey-register-button[type="submit"]:active {
  transform: translateY(0) !important;
}

/* Passkey Skip Button - Text Link Style */
button.passkey-skip-button[type="submit"] {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #6c757d !important;
  cursor: pointer;
  font-size: 14px !important;
  font-weight: 400 !important;
  padding: 8px 0 !important;
  text-align: center;
  text-decoration: underline;
  transition: all 0.3s ease;
  width: 100% !important;
}

button.passkey-skip-button[type="submit"]:hover {
  background: transparent !important;
  box-shadow: none !important;
  color: #495057 !important;
  text-decoration: none;
  transform: none !important;
}

button.passkey-skip-button[type="submit"]:active {
  background: transparent !important;
  color: #343a40 !important;
  transform: none !important;
}

.flag-icon {
  border-radius: 2px;
  height: 16px;
  margin-right: 12px;
  object-fit: cover;
  width: 24px;
}

/* Service Status Container */
.service-status-container {
  margin-top: 32px;
  padding: 20px;
  text-align: center;
}

.service-status-link {
  color: #6c757d;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.service-status-link:hover {
  color: #90ffbc;
}

.privacy-policy a {
  color: #6c757d;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.privacy-policy a:hover {
  color: #90ffbc;
}

/* Responsive: Mobile */
@media (max-width: 768px) {
  .login-page-wrapper {
    align-items: flex-start;
    padding: 10px;
  }

  .login-pf-row {
    flex-direction: column;
    min-height: auto;
  }

  .login-pf-col-left {
    padding: 40px 30px;
  }

  .login-pf-col-right {
    display: none;
  }

  .login-title {
    font-size: 28px;
  }

  .login-welcome {
    font-size: 15px;
  }

  .custom-login-pf-social-link a {
    font-size: 15px;
    padding: 14px 20px;
  }
}
