/* ==========================================================================
   Login Page Stylesheet
   QS-Dental Login-Seite – Fullscreen Background mit zentrierter Login-Card
   ========================================================================== */

/* Font Faces (same as portal) */
@font-face {
  font-family: "OpenSans";
  src: url('../Fonts/OpenSans-Regular.woff2') format('woff2'),
       url('../Fonts/OpenSans-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "OpenSans";
  src: url('../Fonts/OpenSans-SemiBold.woff2') format('woff2'),
       url('../Fonts/OpenSans-SemiBold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: "OpenSans";
  src: url('../Fonts/OpenSans-Bold.woff2') format('woff2'),
       url('../Fonts/OpenSans-Bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
  width: 100%;
  font-family: "OpenSans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #212223;
  font-size: 16px;
  line-height: 22px;
}

/* ==========================================================================
   .login-page – Fullscreen Background
   Requirements: 5.1, 6.2
   ========================================================================== */
.login-page {
  position: fixed;
  inset: 0;
  background-color: #2c5f7c; /* Fallback when no image set */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ==========================================================================
   .login-card – Centered Card
   Requirements: 5.2, 5.3
   ========================================================================== */
.login-card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 40px 36px;
  width: 100%;
  min-width: 370px;
  min-height: 430px;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-height: 90vh;
  overflow-y: auto;
}

/* ==========================================================================
   .login-logo – Logo Positioning
   Requirements: 5.4
   ========================================================================== */
.login-logo {
  margin-bottom: 28px;
}

.login-logo img {
  max-width: 160px;
  width: 100%;
  height: auto;
  display: inline-block;
}

/* ==========================================================================
   .login-form – Form Styling
   ========================================================================== */
.login-form {
  text-align: left;
}

.login-form fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.login-headline {
  color: #2A2A2A;
  font-size: 20px;
  font-weight: bold;
  margin: 0 0 8px 0;
  text-align: center;
  font-family: "OpenSans", sans-serif;
}

.login-description {
  color: #212223;
  font-size: 16px;
  font-weight: normal;
  line-height: 1.5;
  margin: 0 0 20px 0;
  text-align: center;
}

.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid #DCDCDC;
  border-radius: 6px;
  font-size: 16px;
  font-family: "OpenSans", sans-serif;
  font-weight: normal;
  color: #2A2A2A;
  background-color: #F3F3F3;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.login-form input[type="text"]::placeholder,
.login-form input[type="email"]::placeholder,
.login-form input[type="password"]::placeholder {
  color: #A2A2A2;
}

.login-form input[type="text"]:focus,
.login-form input[type="email"]:focus,
.login-form input[type="password"]:focus {
  border-color: #2A2A2A;
  background-color: #FFFFFF;
  outline: none;
  box-shadow: none;
  color: #2A2A2A;
}

.login-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #212223;
  font-size: 14px;
}

.login-form input[type="submit"],
.login-form button[type="submit"] {
  width: auto;
  min-width: 200px;
  margin: 16px auto 0;
  display: block;
  padding: 14px 32px;
  background-color: #36ABD1;
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 500;
  font-family: "OpenSans", sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.login-form input[type="submit"]:hover,
.login-form button[type="submit"]:hover {
  background-color: #2c96b8;
}

.login-form input[type="submit"]:focus,
.login-form button[type="submit"]:focus {
  outline: 2px solid #36ABD1;
  outline-offset: 2px;
}

/* fe_login error messages */
.login-form .alert,
.login-form .error {
  color: #c0392b;
  background: #fdecea;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}

/* Forgot password link */
.login-form .tx-felogin-pi1 a,
.login-form a {
  color: #212223;
  text-decoration: none;
  font-size: 14px;
  font-weight: normal;
  display: block;
  text-align: center;
  margin-top: 16px;
}

.login-form .tx-felogin-pi1 a:hover,
.login-form a:hover {
  color: #36ABD1;
  text-decoration: none;
}

/* ==========================================================================
   Responsive Breakpoints
   Requirements: 5.5
   ========================================================================== */

/* Mobile: 320px – 768px */
@media screen and (max-width: 767px) {
  .login-card {
    margin: 16px;
    padding: 28px 20px;
    max-width: calc(100% - 32px);
    border-radius: 6px;
  }

  .login-logo img {
    max-width: 160px;
  }

  .login-logo {
    margin-bottom: 20px;
  }
}

/* Tablet: 768px – 1024px */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .login-card {
    max-width: 400px;
    padding: 36px 32px;
  }

  .login-logo img {
    max-width: 180px;
  }
}

/* Desktop: > 1024px */
@media screen and (min-width: 1025px) {
  .login-card {
    max-width: 420px;
    padding: 40px 36px;
  }

  .login-logo img {
    max-width: 200px;
  }
}

/* ==========================================================================
   AJAX Login Messages & States
   ========================================================================== */
.login-ajax-message {
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.4;
}

.login-ajax-message--error {
  color: #c0392b;
  background: #fdecea;
  border: 1px solid #f5c6cb;
}

.login-ajax-message--success {
  color: #1e7e34;
  background: #d4edda;
  border: 1px solid #c3e6cb;
}

.login-loading {
  text-align: center;
  color: #666;
  padding: 40px 0;
}

.back-to-login-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: #212223;
  text-decoration: none;
  font-size: 14px;
  font-weight: normal;
}

.back-to-login-link:hover {
  color: #36ABD1;
  text-decoration: none;
}

.login-form [type="submit"]:disabled {
  opacity: 0.6;
  cursor: wait;
}
