/* Custom Login Flow Styles - DSGVO-konform mit lokalen Theme-Fonts */

/* Lokale Font-Definitionen */
@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/nunito-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Raleway";
  src: url("../fonts/raleway-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Font Awesome 6 Free";
  src: url("../fonts/fontawesome.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Font Awesome Icon-Klassen */
.fa,
.fas {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Häufig verwendete Icons */
.fa-user::before {
  content: " f007";
}
.fa-lock::before {
  content: " f023";
}
.fa-eye::before {
  content: " f06e";
}
.fa-eye-slash::before {
  content: " f070";
}
.fa-envelope::before {
  content: " f0e0";
}
.fa-key::before {
  content: " f084";
}
.fa-sign-in-alt::before {
  content: " f2f6";
}
.fa-exclamation-triangle::before {
  content: " f071";
}

html,
body.login,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #fff;
  /* Theme-konforme Fonts: Nunito Sans mit System-Font Fallback */
  font-family:
    "Nunito Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-weight: 400;
}

/* Überschriften verwenden Raleway */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family:
    "Raleway",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-weight: 700;
}

#custom-login-flow-container {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative; /* For absolute positioning of screens */
  overflow: hidden; /* Hide content outside the container */
}

.clf-screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 0.5s ease-in-out; /* Animation for sliding */
}

/* Auswahlseite */
#clf-selection-screen {
  flex-direction: row-reverse;
  z-index: 2;
}

.clf-half-screen {
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px;
  box-sizing: border-box;
}

.clf-left-side {
  background-image: url("https://campus.tomedo.de/wp-content/uploads/konfliktmanagement-nrw-peren-partner-431.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: #fff;
  position: relative; /* For pseudo-element positioning */
}

.clf-left-side::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Dark overlay */
  z-index: 1;
}

.clf-left-side .clf-content {
  z-index: 2; /* Ensure content is above the overlay */
  position: relative;
}

.clf-left-side h2 {
  color: #fff;
}

.clf-right-side {
  background-color: #fff;
}

.clf-content {
  max-width: 550px; /* Increased max-width */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.clf-logo {
  max-width: 180px;
  margin-bottom: 40px;
}

h2 {
  font-size: 42px; /* Increased font-size */
  font-weight: 300;
  margin-bottom: 30px;
  line-height: 1.2;
}

h2 strong {
  font-weight: 700;
}

/* Spezifische Ausrichtung für beide Login-Bereiche */
.clf-left-side .clf-content,
.clf-right-side .clf-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 550px;
  height: 100%;
}

/* Einheitliche Logo-Ausrichtung */
.clf-content .clf-logo {
  width: 200px;
  height: 80px;
  margin: 0 auto 30px auto;
  display: block;
  object-fit: contain;
}

/* Einheitliche Abstände für Überschriften */
.clf-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
  line-height: 1.2;
}
.clf-left-side .clf-content h2 {
  margin-top: 0;
  margin-bottom: 65px;
  line-height: 1.2;
}

.clf-content h4 {
  margin-top: 0;
  margin-bottom: 20px;
  line-height: 1.2;
}

.clf-login-form-wrapper h2 {
  font-size: 30px;
}

.clf-button {
  display: inline-block;
  background-color: #dd3333;
  color: #fff;
  padding: 12px 30px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 700;
  transition: background-color 0.3s;
}

.clf-button:hover {
  background-color: #c42d2d;
}

.clf-link {
  display: block;
  margin-top: 20px;
  color: #aaa;
  font-size: 14px;
}

.clf-left-side .clf-link {
  color: #fff;
}

.clf-underline-link {
  text-decoration: underline;
}

/* Login-Formular-Seite */
#clf-login-form-screen {
  position: absolute;
  top: 0;
  left: 100%; /* Start off-screen to the right */
  background: #fff;
  z-index: 1;
  transition: transform 0.5s ease-in-out; /* Animation for sliding */
}

/* Animation states */
#custom-login-flow-container.show-login-form #clf-selection-screen {
  transform: translateX(-100%);
}

#custom-login-flow-container.show-login-form #clf-login-form-screen {
  transform: translateX(-100%); /* Slide left to bring it into view */
}

.clf-back-button {
  position: absolute;
  top: 40px;
  left: 40px;
  text-decoration: none;
  color: #aaa;
  font-weight: 700;
}

.clf-login-form-wrapper {
  text-align: center;
  width: 100%;
  max-width: 360px;
}

#clf-login-form-container {
  background-color: #f7f7f7;
  padding: 30px;
  border-radius: 8px;
  margin-top: 30px;
}

#loginform {
  margin: 0;
  padding: 0;
}

#loginform p {
  margin-bottom: 15px;
  position: relative;
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

#loginform label {
  display: none; /* Hide labels */
}

#loginform input[type="text"],
#loginform input[type="password"] {
  width: 100%;
  font-size: 16px;
  padding: 10px 0 10px 30px; /* Space for icon */
  border: none;
  border-bottom: 1px solid #ddd; /* Only bottom border */
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  /* Verwende die gleiche Schrift wie der Rest */
  font-family:
    "Nunito Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-weight: 400;
}

#loginform input[type="text"]::placeholder,
#loginform input[type="password"]::placeholder {
  font-family:
    "Nunito Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-weight: 400;
  color: #aaa;
  opacity: 1;
}

#loginform input[type="text"]::-moz-placeholder,
#loginform input[type="password"]::-moz-placeholder {
  font-family:
    "Nunito Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-weight: 400;
  color: #aaa;
  opacity: 1;
}

#loginform .login-username i,
#loginform .login-password i {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
}

#loginform .forgetmenot {
  margin-top: 20px;
  text-align: left;
}

#loginform .submit {
  margin-top: 20px;
}

#loginform input[type="submit"] {
  width: 100%;
  background-color: #dd3333;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 300;
  transition: background-color 0.3s;
  font-family: "Nunito Sans";
  font-size: 16px;
}

#loginform input[type="submit"]:hover {
  background-color: #c42d2d;
}

.clf-outline-button {
  display: inline-block;
  border: 2px solid #dd3333;
  color: #dd3333;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 300;
  margin-top: 20px;
  transition:
    background-color 0.3s,
    color 0.3s;
  font-family: "Nunito Sans";
  font-size: 16px;
}

.clf-outline-button:hover {
  background-color: #dd3333;
  color: #fff;
}

.zollsoftbuttonlink {
  display: none;
}

/* Hide default back to blog link */
#backtoblog {
  display: none;
}

/* Focus-Styles für Tab-Navigation - verwende die gleiche rote Farbe wie die Buttons */
*:focus {
  outline: 2px solid #dd3333;
  outline-offset: 2px;
}

/* Spezifische Focus-Styles für Buttons */
.clf-button:focus,
.clf-outline-button:focus,
#loginform input[type="submit"]:focus {
  outline: 2px solid #dd3333;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(221, 51, 51, 0.2);
}

/* Focus-Styles für Input-Felder */
#loginform input[type="text"]:focus,
#loginform input[type="password"]:focus {
  outline: none;
  border-bottom-color: #dd3333;
  box-shadow: 0 1px 0 0 #dd3333;
}

/* Focus-Styles für Links */
a:focus {
  outline: 2px solid #dd3333;
  outline-offset: 2px;
}

/* Focus-Styles für den Back-Button */
.clf-back-button:focus {
  outline: 0px solid #dd3333;
  outline-offset: 2px;
  color: #dd3333;
}

/* ========================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ======================================== */

/* Tablet Portrait und kleinere Desktops (768px - 1024px) */
@media screen and (max-width: 1024px) {
  .clf-half-screen {
    padding: 30px;
  }

  .clf-content {
    max-width: 450px;
  }

  h2 {
    font-size: 36px;
  }

  .clf-logo {
    width: 160px;
    height: 70px;
  }
}

/* Tablet Portrait (768px und kleiner) */
@media screen and (max-width: 768px) {
  #clf-selection-screen {
    flex-direction: column;
  }

  .clf-half-screen {
    width: 100%;
    height: 50%;
    padding: 20px;
    min-height: 400px;
  }

  .clf-content {
    max-width: 100%;
    justify-content: center;
  }

  h2 {
    font-size: 28px;
    margin-bottom: 20px;
  }

  .clf-logo {
    width: 140px;
    height: 60px;
    margin-bottom: 20px;
  }

  /* Login-Form anpassen */
  .clf-login-form-wrapper {
    max-width: 100%;
    padding: 0 20px;
  }

  .clf-login-form-wrapper h2 {
    font-size: 24px;
  }

  #clf-login-form-container {
    padding: 20px;
    margin-top: 20px;
  }

  .clf-back-button {
    top: 20px;
    left: 20px;
  }
}

/* Mobile Landscape (576px - 767px) */
@media screen and (max-width: 767px) and (orientation: landscape) {
  .clf-half-screen {
    height: 100%;
    min-height: auto;
  }

  #clf-selection-screen {
    flex-direction: row;
  }

  .clf-half-screen {
    width: 50%;
    height: 100%;
    padding: 15px;
  }

  h2 {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .clf-logo {
    width: 120px;
    height: 50px;
    margin-bottom: 15px;
  }
}

/* Mobile Portrait (575px und kleiner) */
@media screen and (max-width: 575px) {
  .clf-half-screen {
    padding: 15px;
    min-height: 350px;
  }

  h2 {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 15px;
  }

  .clf-logo {
    width: 120px;
    height: 50px;
    margin-bottom: 15px;
  }

  .clf-button {
    padding: 10px 20px;
    font-size: 14px;
  }

  .clf-outline-button {
    padding: 8px 16px;
    font-size: 14px;
  }

  .clf-link {
    font-size: 12px;
    margin-top: 15px;
  }

  /* Login-Form für Mobile optimieren */
  .clf-login-form-wrapper {
    padding: 0 15px;
  }

  .clf-login-form-wrapper h2 {
    font-size: 20px;
  }

  #clf-login-form-container {
    padding: 15px;
    margin-top: 15px;
  }

  #loginform input[type="text"],
  #loginform input[type="password"] {
    font-size: 16px; /* Verhindert Zoom auf iOS */
    padding: 12px 0 12px 30px;
  }

  #loginform input[type="submit"] {
    padding: 14px;
    font-size: 16px;
  }

  .clf-back-button {
    top: 15px;
    left: 15px;
    font-size: 14px;
  }
}

/* Sehr kleine Mobile Geräte (480px und kleiner) */
@media screen and (max-width: 480px) {
  .clf-half-screen {
    padding: 10px;
    min-height: 300px;
  }

  h2 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .clf-logo {
    width: 100px;
    height: 40px;
    margin-bottom: 10px;
  }

  .clf-content {
    padding: 10px;
  }

  .clf-button {
    padding: 8px 16px;
    font-size: 13px;
  }

  .clf-outline-button {
    padding: 6px 12px;
    font-size: 13px;
    margin-top: 10px;
  }

  .clf-link {
    font-size: 11px;
    margin-top: 10px;
  }
}

/* Landscape-spezifische Anpassungen für sehr kleine Geräte */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .clf-half-screen {
    padding: 10px;
  }

  h2 {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .clf-logo {
    width: 80px;
    height: 32px;
    margin-bottom: 8px;
  }

  .clf-button,
  .clf-outline-button {
    padding: 6px 12px;
    font-size: 12px;
  }

  .clf-link {
    font-size: 10px;
    margin-top: 8px;
  }

  /* Login-Form für sehr kleine Landscape-Ansicht */
  .clf-login-form-wrapper h2 {
    font-size: 16px;
  }

  #clf-login-form-container {
    padding: 10px;
    margin-top: 10px;
  }

  #loginform input[type="text"],
  #loginform input[type="password"] {
    padding: 8px 0 8px 25px;
    font-size: 14px;
  }

  #loginform input[type="submit"] {
    padding: 10px;
    font-size: 14px;
  }
}
