@import url("./base.css");
@import url("./app.css");

/* Patternfly CSS places a "bg-login.jpg" as the background on this ".login-pf" class.
   This clashes with the "keycloak-bg.png' background defined on the body below.
   Therefore the Patternfly background must be set to none. */
.login-pf {
  background: none;
}

:root {
  --pf-global--primary-color--100: #1677ff;
}

 {
   {
    /* :root {
  --pf-global--primary-color--100: #06da61;
  --pf-global--BoxShadow--lg: 0 0 10px 0 rgba(0, 0, 0, 0.1);
} */
  }
}

 {
   {
    /* background: url("../img/keycloak-bg.png") no-repeat center center fixed; */
  }
}

.pf-c-button {
  background-color: transparent;
}

#password-visibility-toggle {
  border-radius: 0px 6px 6px 0px;
  font-size: 12px;
  background-color: #141414;
  border: 1px solid #4f4f4f;
  width: 50px;
  color: white;
}

#login-btn {
}

.login-pf body {
  background: black;
  background-image: url(/api/netsocs/module.configuration-v2/files/bg.png);
  background-size: cover;
  background-repeat: no-repeat;
  height: 100%;
  user-select: none;
  outline: none;
}

#client-logo {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 300px;
  height: 63px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

textarea.pf-c-form-control {
  height: auto;
}

select.change-language {
  background-color: #141414;
  color: white !important;
  position: absolute;
  top: 20px;
  right: 20px;
  width: 80px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid #4f4f4f;
  height: 30px;
  user-select: none;
  outline: none;
}

input.pf-c-form-control {
  background-color: #141414;
  color: white;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid #4f4f4f;
  outline: none;
}

#password {
  border-radius: 6px 0px 0px 6px;
}

.pf-c-alert__title {
  font-size: var(--pf-global--FontSize--xs);
}

p.instruction {
  margin: 5px 0;
}

.pf-c-button.pf-m-control {
  border-color: rgba(230, 230, 230, 0.5);
}

h1#kc-page-title {
  margin-top: 10px;
}

#kc-locale ul {
  background-color: var(--pf-global--BackgroundColor--100);
  display: none;
  top: 20px;
  min-width: 100px;
  padding: 0;
}

#kc-locale-dropdown {
  display: inline-block;
}

#kc-locale-dropdown:hover ul {
  display: block;
}

#kc-locale-dropdown a {
  color: var(--pf-global--Color--200);
  text-align: right;
  font-size: var(--pf-global--FontSize--sm);
}

#kc-locale-dropdown button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--pf-global--Color--200);
  text-align: right;
  font-size: var(--pf-global--FontSize--sm);
}

button#kc-current-locale-link::after {
  content: "\2c5";
  margin-left: var(--pf-global--spacer--xs);
}

.login-pf .container {
  padding-top: 40px;
}

.login-pf a:hover {
  color: #0099d3;
}

#kc-logo {
  width: 100%;
}

.logo-container {
  position: absolute;
  right: 20px;
  top: 20px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url(../img/logo_light.png);
  background-size: contain;
  background-repeat: no-repeat;
  width: 100px;
  height: 100px;
}

div.kc-logo-text {
  background-image: url(../img/logo_light.png);
  background-repeat: no-repeat;
  height: 63px;
  width: 300px;
  margin: 0 auto;
}

div.kc-logo-text span {
  display: none;
}

#kc-header {
  color: #ededed;
  overflow: visible;
  white-space: nowrap;
  width: 100%;
  display: flex;
  /* justify-items: center; */
  align-items: baseline;
  /* text-align: center; */
  justify-content: center;
}

#kc-header-wrapper {
  font-size: 29px;
  text-transform: uppercase;
  letter-spacing: 3px;
  line-height: 1.2em;
  padding: 62px 10px 20px;
  white-space: normal;
}

.login-pf-header {
  font-size: 20px;
  line-height: 1.2em;
  text-align: center;
  white-space: normal;
}

.login-pf-header__title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.login-pf-header .logo-container--header {
  position: static;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

#kc-header-wrapper {
  background: url("/api/netsocs/module.configuration-v2/files/logo.png") no-repeat center center;
  background-size: contain;
  color: transparent;
}

#kc-content {
  width: 100%;
}

#kc-attempted-username {
  font-size: 20px;
  font-family: inherit;
  font-weight: normal;
  padding-right: 10px;
}

#kc-username {
  text-align: center;
  margin-bottom: -10px;
}

#kc-webauthn-settings-form {
  padding-top: 8px;
}

#kc-form-webauthn .select-auth-box-parent {
  pointer-events: none;
}

#kc-form-webauthn .select-auth-box-desc {
  color: var(--pf-global--palette--black-600);
}

#kc-form-webauthn .select-auth-box-headline {
  color: var(--pf-global--Color--300);
}

#kc-form-webauthn .select-auth-box-icon {
  flex: 0 0 3em;
}

#kc-form-webauthn .select-auth-box-icon-properties {
  margin-top: 10px;
  font-size: 1.8em;
}

#kc-form-webauthn .select-auth-box-icon-properties.unknown-transport-class {
  margin-top: 3px;
}

#kc-form-webauthn .pf-l-stack__item {
  margin: -1px 0;
}

#kc-content-wrapper {
  margin-top: 20px;
}

#kc-form-wrapper {
  margin-top: 10px;
}

#kc-info {
  margin: 20px -40px -30px;
}

#kc-info-wrapper {
  font-size: 13px;
  padding: 15px 35px;
  background-color: #f0f0f0;
}

#kc-form-options span {
  display: block;
}

#kc-form-options .checkbox {
  margin-top: 0;
  color: #72767b;
}

#kc-terms-text {
  margin-bottom: 20px;
}

#kc-registration-terms-text {
  max-height: 100px;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 5px;
}

#kc-registration {
  margin-bottom: 0;
}

/* TOTP */

.subtitle {
  text-align: right;
  margin-top: 30px;
  color: #909090;
}

.required {
  color: var(--pf-global--danger-color--200);
}

ol#kc-totp-settings {
  margin: 0;
  padding-left: 20px;
}

ul#kc-totp-supported-apps {
  margin-bottom: 10px;
}

#kc-totp-secret-qr-code {
  max-width: 150px;
  max-height: 150px;
}

#kc-totp-secret-key {
  background-color: #fff;
  color: #333333;
  font-size: 16px;
  padding: 10px 0;
}

/* OAuth */

#kc-oauth h3 {
  margin-top: 0;
}

#kc-oauth ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#kc-oauth ul li {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  padding: 10px 0;
}

#kc-oauth ul li:first-of-type {
  border-top: 0;
}

#kc-oauth .kc-role {
  display: inline-block;
  width: 50%;
}

/* Code */
#kc-code textarea {
  width: 100%;
  height: 8em;
}

/* Social */
.kc-social-links {
  margin-top: 20px;
}

.kc-social-links li {
  width: 100%;
}

.kc-social-provider-logo {
  font-size: 23px;
  width: 30px;
  height: 25px;
  float: left;
}

.kc-social-gray {
  color: var(--pf-global--Color--200);
}

.kc-social-gray h2 {
  font-size: 1em;
}

.kc-social-item {
  margin-bottom: var(--pf-global--spacer--sm);
  font-size: 15px;
  text-align: center;
}

.kc-social-provider-name {
  position: relative;
}

.kc-social-icon-text {
  left: -15px;
}

.kc-social-grid {
  display: grid;
  grid-column-gap: 10px;
  grid-row-gap: 5px;
  grid-column-end: span 6;
  --pf-l-grid__item--GridColumnEnd: span 6;
}

.kc-social-grid .kc-social-icon-text {
  left: -10px;
}

.kc-login-tooltip {
  position: relative;
  display: inline-block;
}

.kc-social-section {
  text-align: center;
}

.kc-social-section hr {
  margin-bottom: 10px;
}

.kc-login-tooltip .kc-tooltip-text {
  top: -3px;
  left: 160%;
  background-color: black;
  visibility: hidden;
  color: #fff;

  min-width: 130px;
  text-align: center;
  border-radius: 2px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
  padding: 5px;

  position: absolute;
  opacity: 0;
  transition: opacity 0.5s;
}

/* Show tooltip */
.kc-login-tooltip:hover .kc-tooltip-text {
  visibility: visible;
  opacity: 0.7;
}

/* Arrow for tooltip */
.kc-login-tooltip .kc-tooltip-text::after {
  content: " ";
  position: absolute;
  top: 15px;
  right: 100%;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent black transparent transparent;
}

@media (min-width: 768px) {
  #kc-container-wrapper {
    position: absolute;
    width: 100%;
  }

  .login-pf .container {
    padding-right: 80px;
  }

  #kc-locale {
    position: relative;
    text-align: right;
    z-index: 9999;
  }
}

@media (max-width: 767px) {

  #kc-header {
    padding-left: 15px;
    padding-right: 15px;
    float: none;
    text-align: left;
  }

  div.kc-logo-text {
    margin: 0;
    width: 150px;
    height: 32px;
    background-size: 100%;
  }

  #kc-form {
    float: none;
  }

  #kc-info-wrapper {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: transparent;
  }

  .login-pf .container {
    padding-top: 15px;
    padding-bottom: 15px;
  }

  #kc-locale {
    position: absolute;
    width: 200px;
    top: 20px;
    right: 20px;
    text-align: right;
    z-index: 9999;
  }
}

@media (min-height: 646px) {
  #kc-container-wrapper {
    bottom: 12%;
  }
}

@media (max-height: 645px) {
  #kc-container-wrapper {
    padding-top: 50px;
    top: 20%;
  }
}

.card-pf form.form-actions .btn {
  float: right;
  margin-left: 10px;
}

#kc-form-buttons {
  margin-top: 20px;
}

#kc-request-access-wrapper {
  width: 220px;
  margin: 0 auto !important;
}

.login-pf-page .login-pf-brand {
  margin-top: 20px;
  max-width: 360px;
  width: 40%;
}

.select-auth-box-arrow {
  display: flex;
  align-items: center;
  margin-right: 2rem;
}

.select-auth-box-icon {
  display: flex;
  flex: 0 0 2em;
  justify-content: center;
  margin-right: 1rem;
  margin-left: 3rem;
}

.select-auth-box-parent {
  border-top: 1px solid var(--pf-global--palette--black-200);
  padding-top: 1rem;
  padding-bottom: 1rem;
  cursor: pointer;
  text-align: left;
  align-items: unset;
  background-color: unset;
  border-right: unset;
  border-bottom: unset;
  border-left: unset;
}

.select-auth-box-parent:hover {
  background-color: #f7f8f8;
}

.select-auth-container {
  padding-bottom: 0px !important;
}

.select-auth-box-headline {
  font-size: var(--pf-global--FontSize--md);
  color: var(--pf-global--primary-color--100);
  font-weight: bold;
}

.select-auth-box-desc {
  font-size: var(--pf-global--FontSize--sm);
}

.select-auth-box-paragraph {
  text-align: center;
  font-size: var(--pf-global--FontSize--md);
  margin-bottom: 5px;
}

.card-pf {
  margin: 0 auto;
  box-shadow: var(--pf-global--BoxShadow--lg);
  padding: 20px 20px;
  max-width: 500px;
  border-top: 4px solid;
  border-color: var(--pf-global--primary-color--100);
  color: white;
  background-color: #1f1f1f;
  position: relative;
  border-radius: 10px;
}

/*phone*/
@media (max-width: 767px) {
  .kc-header-wrapper {
    display: none;
  }
  .login-pf-page .card-pf {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-top: 0;
    border-top: 0;
    box-shadow: 0 0;
  }

  .kc-social-grid {
    grid-column-end: 12;
    --pf-l-grid__item--GridColumnEnd: span 12;
  }

  .kc-social-grid .kc-social-icon-text {
    left: -15px;
  }
}

.login-pf-page .login-pf-signup {
  font-size: 15px;
  color: #72767b;
}
#kc-content-wrapper .row {
  margin-left: 0;
  margin-right: 0;
}

.login-pf-page.login-pf-page-accounts {
  margin-left: auto;
  margin-right: auto;
}

.login-pf-page .btn-primary {
  margin-top: 0;
}

.login-pf-page .list-view-pf .list-group-item {
  border-bottom: 1px solid #ededed;
}

.login-pf-page .list-view-pf-description {
  width: 100%;
}

#kc-form-login div.form-group:last-of-type,
#kc-register-form div.form-group:last-of-type,
#kc-update-profile-form div.form-group:last-of-type,
#kc-update-email-form div.form-group:last-of-type {
  margin-bottom: 0px;
}

.form-group {
  margin: 20px 0px;
  margin-left: 0px !important;
  margin-right: 0px !important;
}

.form-group label {
  font-size: 0.875rem;
}

.no-bottom-margin {
  margin-bottom: 0;
}

#kc-back {
  margin-top: 5px;
}

/* Recovery codes */
.kc-recovery-codes-warning {
  margin-bottom: 32px;
}
.kc-recovery-codes-warning .pf-c-alert__description p {
  font-size: 0.875rem;
}
.kc-recovery-codes-list {
  list-style: none;
  columns: 2;
  margin: 16px 0;
  padding: 16px 16px 8px 16px;
  border: 1px solid #d2d2d2;
}
.kc-recovery-codes-list li {
  margin-bottom: 8px;
  font-size: 11px;
}
.kc-recovery-codes-list li span {
  color: #6a6e73;
  width: 16px;
  text-align: right;
  display: inline-block;
  margin-right: 1px;
}

.kc-recovery-codes-actions {
  margin-bottom: 24px;
}
.kc-recovery-codes-actions button {
  padding-left: 0;
}
.kc-recovery-codes-actions button i {
  margin-right: 8px;
}

.kc-recovery-codes-confirmation {
  align-items: baseline;
  margin-bottom: 16px;
}

#certificate_subjectDN {
  overflow-wrap: break-word;
}
/* End Recovery codes */

/* ==========================================
   NETSOCS - Dark Glassmorphism Design
   ========================================== */

/* ---- Body & Background ---- */
#keycloak-bg {
  background-color: #0a0c10 !important;
  overflow: hidden;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
}

.login-pf body,
body {
  font-family: 'Inter', sans-serif !important;
  background-color: #0a0c10 !important;
  background-image: none !important;
  overflow: hidden;
}

#bg-overlay {
  position: fixed;
  inset: 0;
  background-image: url('../img/bg-w-face.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.glow-effect {
  position: fixed;
  width: 1px;
  height: 1px;
  pointer-events: none;
  z-index: 1;
}

.glow-cyan {
  top: 25%;
  right: 25%;
  box-shadow: 0 0 500px 200px rgba(34, 211, 238, 0.05);
}

.glow-red {
  bottom: 25%;
  right: 33%;
  box-shadow: 0 0 400px 150px rgba(153, 27, 27, 0.06);
}

/* ---- Main Layout ---- */
#main-layout {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 3rem 6rem;
  position: relative;
  z-index: 10;
  min-height: 100vh;
  box-sizing: border-box;
}

/* ---- Login Card (Glassmorphism) ---- */
.card-pf {
  background: rgba(26, 31, 38, 0.75) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-top: none !important;
  border-radius: 1rem !important;
  padding: 2.5rem !important;
  max-width: 28rem !important;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !important;
  color: #e2e8f0 !important;
  margin: 0 !important;
  transition: border-color 0.5s;
}

/* Reset PF v5 login wrappers inside card */
.pf-v5-c-login__container,
.pf-v5-c-login__main {
  display: block;
  width: 100%;
  max-width: none;
  background: transparent;
  box-shadow: none;
}

.pf-v5-c-login__main-body {
  padding: 0;
}

/* ---- Brand Header ---- */
.netsocs-brand-header {
  margin-bottom: 2rem;
}

.netsocs-brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.netsocs-brand-name {
  font-size: 1.875rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.025em;
}

.netsocs-welcome {
  font-size: 2.25rem;
  font-weight: 300;
  color: #f1f5f9;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}

/* ---- Logo inside card header ---- */
.logo-container--header {
  position: static !important;
  flex-shrink: 0;
  width: 40px !important;
  height: 40px !important;
}

/* ---- Language Selector ---- */
select.change-language {
  background-color: transparent !important;
  color: #94a3b8 !important;
  position: static !important;
  width: auto !important;
  border: none !important;
  border-radius: 0 !important;
  font-size: 0.875rem !important;
  height: auto !important;
  padding: 0 !important;
  cursor: pointer;
  outline: none;
  margin-top: 0.25rem;
}

/* ---- Form Labels ---- */
.pf-c-form__label,
.pf-c-form__label-text {
  color: #94a3b8 !important;
  font-size: 0.8125rem;
  font-weight: 500;
}

/* ---- Input Icon Wrappers ---- */
.input-with-icon {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #64748b;
  display: flex;
  align-items: center;
  z-index: 2;
}

/* ---- Inputs ---- */
.input-with-icon input.pf-c-form-control {
  padding-left: 2.5rem !important;
  background-color: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(51, 65, 85, 0.6) !important;
  border-radius: 0.5rem !important;
  color: #cbd5e1 !important;
  font-size: 0.875rem;
  height: 2.75rem;
  width: 100%;
  box-sizing: border-box;
}

.input-with-icon input.pf-c-form-control::placeholder {
  color: #64748b;
}

.input-with-icon input.pf-c-form-control:focus {
  border-color: rgba(6, 182, 212, 0.5) !important;
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.15) !important;
  outline: none;
}

/* ---- Password Input Group ---- */
.input-with-icon .pf-c-input-group {
  position: relative;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.input-with-icon .pf-c-input-group input.pf-c-form-control {
  padding-right: 3rem !important;
  border-radius: 0.5rem !important;
}

#password {
  border-radius: 0.5rem !important;
}

/* ---- Password Visibility Toggle ---- */
#password-visibility-toggle {
  position: absolute !important;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent !important;
  border: none !important;
  width: auto !important;
  padding: 0.25rem;
  color: #64748b;
  cursor: pointer;
  z-index: 3;
  border-radius: 0 !important;
  font-size: 14px;
  height: auto;
}

#password-visibility-toggle:hover {
  color: #94a3b8;
}

/* ---- Forgot Password ---- */
#kc-form-options ~ .pf-v5-c-login__main-footer-band a,
.login-pf-settings a {
  font-size: 0.875rem !important;
  color: #94a3b8 !important;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: #475569;
}

.login-pf-settings a:hover {
  color: #22d3ee !important;
}

/* ---- Login Button ---- */
#kc-login {
  display: block !important;
  width: 60% !important;
  margin: 0 auto !important;
  padding: 0.75rem 1.5rem !important;
  background-color: #06DA61  !important;
  color: white !important;
  font-weight: 500 !important;
  border-radius: 0.375rem !important;
  border: none !important;
  box-shadow: 0 4px 6px -1px rgba(127, 29, 29, 0.3) !important;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  font-family: 'Inter', sans-serif;
  font-size: 1rem !important;
  height: auto !important;
}

#kc-login:hover {
  background-color: #06DA61 !important;
}

#kc-login:active {
  transform: scale(0.98);
}

/* ---- Privacy Notice ---- */
.privacy-notice {
  font-size: 0.6rem;
  color: #64748b;
  text-align: center;
  margin-top: 1.5rem;
  line-height: 1.6;
}

/* ---- Site Footer ---- */
#site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 2rem;
  z-index: 10;
}

#site-footer p {
  color: #64748b;
  font-size: 0.75rem;
  margin: 0;
  text-align: center;
}

#site-footer a {
  color: #72e272;
  text-decoration: none;
}

#site-footer a:hover {
  text-decoration: underline;
}

/* ---- Alert styling ---- */
.pf-c-alert.pf-m-inline {
  background: rgba(220, 38, 38, 0.15) !important;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
  color: #fca5a5 !important;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.pf-c-alert.pf-m-inline.pf-m-success {
  background: rgba(34, 197, 94, 0.15) !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
  color: #86efac !important;
}

.pf-c-alert.pf-m-inline.pf-m-warning {
  background: rgba(234, 179, 8, 0.15) !important;
  border: 1px solid rgba(234, 179, 8, 0.3) !important;
  color: #fde047 !important;
}

/* ---- Form group spacing ---- */
.form-group {
  margin: 1rem 0 !important;
}

#kc-form-buttons {
  margin-top: 1.5rem;
}

/* ---- Checkbox / Remember me ---- */
#kc-form-options .checkbox label {
  color: #94a3b8;
  font-size: 0.875rem;
}

#kc-form-options input[type="checkbox"] {
  accent-color: #06da61;
}

/* ---- Registration link ---- */
#kc-registration-container {
  margin-top: 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.875rem;
}

#kc-registration-container a {
  color: #22d3ee;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  #main-layout {
    padding: 2rem 1.5rem;
    align-items: flex-start;
    padding-top: 3rem;
  }

  .card-pf {
    max-width: 100% !important;
  }

  #kc-login {
    width: 80% !important;
  }
}
