/** Weißer Hintergrund */
.login-pf body {
    background: white;
    background-size: unset;
}

/* Logo und Realm-Name über Login-Box */
#kc-header {
    color: #ff7e21;
    background-image: url("../img/obi-logo.svg");
    background-repeat: no-repeat;
    background-position-x: center;
    background-size: 15em;
    padding: 1em;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

#kc-header-wrapper {
    color: #ff7e21;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 0.5em;
    display: block;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* Blauen Rand oben an der Login-Box */
.card-pf {
    border-top-color: #ff7e21;
}

/** Submit Button Hintergrund */
.pf-c-button.pf-m-primary {
    background-color: #ff8832;
}


/* ================== Account Type Selection ================ */

#account-type-select > button {
  margin-bottom: 8px;
  padding: 12px 8px;
  font-size: 18px;
  position: relative;
}

#account-type-select > button i {
  color: white;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%) scale(1.4);
}

/* Specific styling for customer login button icon */
#customer-login-button i {
  font-size: 22px;
}

/* Specific styling for lock icon - shift 5px right */
#customer-login-button i.fa-lock {
  left: 27.5px;
}

/* Google logo in original colors */
#social-google i.fa-google {
  background: conic-gradient(from -45deg, #ea4335 110deg, #4285f4 90deg 180deg, #34a853 180deg 270deg, #fbbc05 270deg) 73% 55%/150% 150% no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 2px white) drop-shadow(0 0 2px white) drop-shadow(0 0 3px white);
}

/* Alternative: If using Font Awesome brand icon */
#social-google i.fab.fa-google {
  background: conic-gradient(from -45deg, #ea4335 110deg, #4285f4 90deg 180deg, #34a853 180deg 270deg, #fbbc05 270deg) 73% 55%/150% 150% no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 2px white) drop-shadow(0 0 2px white) drop-shadow(0 0 3px white);
}

/* ================== Slide-in Panel ================ */

.cd-panel {
  visibility: hidden;
  transition: visibility 0s 0.6s;
  width: 100%;
}

.cd-panel.cd-panel--is-visible {
  visibility: visible;
  transition: visibility 0s 0s;
}

.cd-panel__header {
  width: 90%;
  height: 50px;
  transition: transform 0.3s 0s;
  transform: translateY(-50px);
}

.cd-panel--from-right .cd-panel__header {
  right: 0;
}

.cd-panel--from-left .cd-panel__header {
  left: 0;
}

.cd-panel--is-visible .cd-panel__header {
  transition: transform 0.3s 0.3s;
  transform: translateY(0px);
}

.cd-panel__container {
  background: white;
  width: 100%;
  height: 100%;
  top: 0;
  transition: transform 0.3s 0.3s;
}

.cd-panel--from-right .cd-panel__container {
  right: 0;
  transform: translate3d(100%, 0, 0);
}

.cd-panel--from-left .cd-panel__container {
  left: 0;
  transform: translate3d(-100%, 0, 0);
}

.cd-panel--is-visible .cd-panel__container {
  transform: translate3d(0, 0, 0);
  transition-delay: 0s;
}

.cd-panel__content {
  width: 100%;
  box-sizing: border-box;
}

/* ================== Form Login Animation ================ */

/* Only apply height:0 to forms inside the slide-in panel */
.cd-panel #kc-form-login {
  -moz-transition: height 0.5s;
  -ms-transition: height 0.5s;
  -o-transition: height 0.5s;
  -webkit-transition: height 0.5s;
  transition: height 0.5s;
  height: 0;
  overflow: hidden;
}

.card-pf {
  overflow-x: hidden;
}

/* ================== Responsive Adjustments ================ */

/* Desktop */
@media (min-width: 768px) {
  .login-pf-page .card-pf {
    padding: 44px;
    margin-top: 170px;
  }
}

/* Tablet */
@media (max-width: 767px) {
  #kc-header {
    background-size: 12em;
    padding: 0.75em;
  }

  #kc-header-wrapper {
    font-size: 1.3rem;
  }

  .login-pf-page .card-pf {
    margin: 100px 16px 20px 16px;
    padding: 24px;
    max-width: calc(100% - 32px);
    box-sizing: border-box;
  }

  #account-type-select > button {
    padding: 14px 14px 14px 52px;
  }

  #account-type-select > button i {
    left: 16px;
    transform: translateY(-50%) scale(1.2);
  }

  #customer-login-button i.fa-lock {
    left: 20px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  #kc-header {
    background-size: 9em;
    padding: 0.5em;
  }

  #kc-header-wrapper {
    display: block;
    font-size: 1.2rem;
    margin-top: 1em;
    padding-left: 15%;
  }

  .login-pf-page .card-pf {
    margin: 40px 12px 16px 12px;
    padding: 20px 16px;
    max-width: calc(100% - 24px);
    box-sizing: border-box;
  }

  .login-pf-page .card-pf h1,
  #kc-page-title {
    font-size: 1.2rem;
    margin-bottom: 16px;
  }

  #account-type-select {
    gap: 10px;
  }

  #account-type-select > button {
    padding: 14px 12px;
    min-height: 50px;
    text-align: center;
    justify-content: center;
  }

  #account-type-select > button i {
    left: 14px;
    font-size: 17px;
  }

  #account-type-select > button span {
    text-align: center;
  }

  /* Form inputs - larger touch targets */
  .pf-c-form-control,
  input.pf-c-form-control {
    padding: 12px;
    font-size: 16px; /* Prevents iOS zoom on focus */
    min-height: 48px;
    border-radius: 6px;
  }

  /* Password Input Group fix for mobile */
  .pf-c-input-group {
    display: flex !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
  }

  .pf-c-input-group input.pf-c-form-control,
  .pf-c-input-group input#password {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }

  .pf-c-input-group > .pf-c-button.pf-m-control,
  .pf-c-input-group > button[data-password-toggle] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: stretch !important;
    flex-shrink: 0 !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    margin: 0 !important;
    padding: 0 14px !important;
    min-width: 48px !important;
    box-sizing: border-box !important;
  }

  /* Labels */
  .pf-c-form__label-text,
  label {
    font-size: 14px;
    margin-bottom: 6px;
  }

  /* Form groups spacing */
  .pf-c-form__group {
    margin-bottom: 16px;
  }

  /* Buttons - larger touch targets */
  .pf-c-button,
  input[type="submit"].pf-c-button {
    padding: 14px 16px;
    min-height: 48px;
  }

  /* Remember me and forgot password row */
  .pf-c-form__group.pf-m-action {
    flex-direction: column;
    gap: 12px;
  }

  #kc-form-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  /* Remember me checkbox */
  .checkbox label {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }

  /* Forgot password link */
  .pf-c-form__actions a,
  #kc-form-options a {
    font-size: 14px;
  }

  /* Password visibility button */
  .pf-c-button.pf-m-control {
    min-width: 48px;
    padding: 12px;
  }

  /* Slide-in panel adjustments */
  .cd-panel__content {
    padding: 0;
  }

  /* Back button spacing */
  #kc-form-login button[type="button"] {
    margin-top: 12px;
  }

  /* Registration link */
  #kc-registration {
    font-size: 14px;
    padding: 16px 0;
    text-align: center;
  }

  /* Alert messages */
  .alert {
    padding: 12px;
    font-size: 14px;
    border-radius: 6px;
    margin-bottom: 16px;
  }
}

/* Very small screens (iPhone SE, older devices) */
@media (max-width: 360px) {
  #kc-header {
    background-size: 8em;
  }

  #kc-header-wrapper {
    font-size: 1rem;
  }

  .login-pf-page .card-pf {
    margin: 70px 8px 12px 8px;
    padding: 16px 12px;
    max-width: calc(100% - 16px);
  }

  .login-pf-page .card-pf h1,
  #kc-page-title {
    font-size: 1.1rem;
  }

  #account-type-select > button {
    padding: 12px 10px 12px 44px;
    min-height: 46px;
  }

  #account-type-select > button i {
    left: 12px;
    transform: translateY(-50%) scale(1.1);
  }

  #customer-login-button i.fa-lock {
    left: 15px;
  }
}

/* Landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  #kc-header {
    padding: 12px;
    background-size: 8em;
  }

  .login-pf-page .card-pf {
    padding: 16px 20px;
  }

  #account-type-select {
    gap: 8px;
  }

  #account-type-select > button {
    min-height: 44px;
    padding: 10px 12px 10px 44px;
  }

  .pf-c-form__group {
    margin-bottom: 12px;
  }
}

