/**
 * Login Page Frontend Styles
 * Split-Screen Modern Login Design
 *
 * @package Polanger_Dashboard_Tools_Pro
 * @since 4.3.0
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
  --pdt-login-primary: #8b5cf6;
  --pdt-login-primary-hover: #7c3aed;
  --pdt-login-secondary: #a78bfa;
  --pdt-login-bg: #ddd6fe;
  --pdt-login-card-bg: #ffffff;
  --pdt-login-text: #1e293b;
  --pdt-login-text-light: #ffffff;
  --pdt-login-text-muted: #64748b;
  --pdt-login-border: #e2e8f0;
  --pdt-login-input-bg: #ffffff;
  --pdt-login-input-focus: #8b5cf6;
  --pdt-login-error: #ef4444;
  --pdt-login-success: #10b981;
  --pdt-login-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  --pdt-login-radius: 24px;
  --pdt-login-radius-sm: 30px;
}

/* ============================================
   Base - Split Screen Layout
   ============================================ */
body.login {
  background: var(--pdt-login-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  margin: 0;
}

body.login::before,
body.login::after {
  display: none;
}

/* ============================================
   Main Login Wrapper
   ============================================ */
#login {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1000px;
  padding: 0;
  margin: 0;
}

html.pdt-login-runtime-pending #login {
  min-height: 550px;
}

html.pdt-login-runtime-pending #login > * {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

html.pdt-login-runtime-pending #login::before {
  content: '';
  display: block;
  width: 100%;
  min-height: 550px;
  border-radius: var(--pdt-login-radius);
  background:
    linear-gradient(90deg, rgba(99, 102, 241, 0.94) 0%, rgba(99, 102, 241, 0.9) 42%, rgba(255, 255, 255, 0.98) 42%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow: var(--pdt-login-shadow);
}

html.pdt-login-runtime-ready #login > * {
  transition: opacity 0.18s ease;
}

.pdt-login-wrapper {
  display: flex;
  min-height: 550px;
  background: var(--pdt-login-card-bg);
  border-radius: var(--pdt-login-radius);
  box-shadow: var(--pdt-login-shadow);
  overflow: hidden;
}

/* ============================================
   Left Panel - Welcome Section
   ============================================ */
.pdt-login-left-panel {
  flex: 1;
  background: linear-gradient(135deg, var(--pdt-login-primary) 0%, var(--pdt-login-secondary) 100%);
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  /* `safe center` falls back to flex-start if content is taller than the panel,
     so a tall custom logo never gets clipped from the top. */
  justify-content: safe center;
  position: relative;
  overflow: hidden;
}

/* Decorative Elements */
.pdt-login-left-panel::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.pdt-login-left-panel::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

/* Decorative shapes */
.pdt-login-decor {
  position: absolute;
  pointer-events: none;
}

.pdt-login-decor-1 {
  top: 30px;
  left: 40px;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.pdt-login-decor-1::before,
.pdt-login-decor-1::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.4);
}

.pdt-login-decor-1::before {
  width: 2px;
  height: 20px;
  left: 50%;
  top: -10px;
  transform: translateX(-50%);
}

.pdt-login-decor-1::after {
  width: 20px;
  height: 2px;
  top: 50%;
  left: -10px;
  transform: translateY(-50%);
}

.pdt-login-decor-2 {
  top: 60px;
  right: 80px;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
}

.pdt-login-decor-3 {
  top: 40px;
  right: 30px;
  display: grid;
  grid-template-columns: repeat(3, 8px);
  grid-template-rows: repeat(3, 8px);
  gap: 6px;
}

.pdt-login-decor-3 span {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
}

.pdt-login-decor-4 {
  bottom: 120px;
  left: 30px;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
}

/* Wave decoration */
.pdt-login-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  opacity: 0.15;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' d='M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
  background-size: cover;
}

/* Welcome Text */
.pdt-login-welcome {
  position: relative;
  z-index: 1;
}

/* Custom Logo — prevent clipping on small screens / notch devices */
.pdt-login-logo {
  display: block;
  margin-top: 4px;
  margin-bottom: 24px;
}

.pdt-login-logo img {
  display: block;
  max-width: min(180px, 100%);
  max-height: 96px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: top center;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.pdt-login-logo:hover img {
  transform: scale(1.05);
  opacity: 0.9;
}

.pdt-login-welcome h2 {
  color: var(--pdt-login-text-light);
  font-size: 42px;
  font-weight: 700;
  margin: 0 0 16px 0;
  line-height: 1.2;
}

.pdt-login-welcome p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  max-width: 320px;
}

/* ============================================
   Right Panel - Form Section
   ============================================ */
.pdt-login-right-panel {
  flex: 1;
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Hide default logo */
body.pdt-split-login #login h1 {
  display: none !important;
}

body.pdt-split-login #login h1 a {
  display: block;
  width: 100%;
  height: 80px;
  margin: 0 auto 30px;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  text-indent: -9999px;
  outline: none;
  transition: transform 0.3s ease, filter 0.3s ease;
}

body.pdt-split-login #login h1 a:hover {
  transform: scale(1.05);
}

body.pdt-split-login #login h1 a:focus {
  box-shadow: none;
}

/* ============================================
   Login Form Card
   ============================================ */
body.pdt-split-login #login form {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

/* Form Title */
.pdt-login-form-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--pdt-login-text);
  margin: 0 0 30px 0;
  text-align: center;
}

/* ============================================
   Form Labels
   ============================================ */
body.pdt-split-login #login form .forgetmenot,
body.pdt-split-login #login form label {
  color: var(--pdt-login-text);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
}

body.pdt-split-login #login form label[for="user_login"]::before,
body.pdt-split-login #login form label[for="user_pass"]::before {
  content: none;
}

/* ============================================
   Input Fields - Pill Style
   ============================================ */
body.pdt-split-login #login form input[type="text"],
body.pdt-split-login #login form input[type="password"],
body.pdt-split-login #login form input[type="email"] {
  width: 100%;
  padding: 16px 24px;
  font-size: 12px;
  border: 1px solid var(--pdt-login-border);
  border-radius: 50px;
  background: var(--pdt-login-input-bg);
  color: var(--pdt-login-text);
  transition: all 0.3s ease;
  margin-top: 0;
  margin-bottom: 20px;
  box-shadow: none;
}

body.pdt-split-login #login form input[type="text"]:focus,
body.pdt-split-login #login form input[type="password"]:focus,
body.pdt-split-login #login form input[type="email"]:focus {
  border-color: var(--pdt-login-input-focus);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
  outline: none;
}

body.pdt-split-login #login form input[type="text"]::placeholder,
body.pdt-split-login #login form input[type="password"]::placeholder,
body.pdt-split-login #login form input[type="email"]::placeholder {
  color: var(--pdt-login-text-muted);
}

/* Input Icons via CSS - using input background */
body.pdt-split-login #user_login {
  padding-left: 50px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 18px center;
  background-size: 18px 18px;
}

body.pdt-split-login #user_pass {
  padding-left: 50px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 18px center;
  background-size: 18px 18px;
}

body.pdt-split-login #user_email {
  padding-left: 50px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'%3E%3C/path%3E%3Cpolyline points='22,6 12,13 2,6'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 18px center;
  background-size: 18px 18px;
}

/* Hide labels, use placeholders */
body.pdt-split-login #login form label[for="user_login"],
body.pdt-split-login #login form label[for="user_pass"] {
  position: absolute;
  left: -9999px;
}

/* ============================================
   Remember Me & Forgot Password Row
   ============================================ */
body.pdt-split-login #login form .forgetmenot {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px !important;
}

body.pdt-split-login #login form .forgetmenot label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
  font-size: 13px;
  color: var(--pdt-login-text-muted);
  margin-left: 8px;
  padding-left: 3px;
}

/* Remember Me — fixed neutrals (#rememberme) so primary theme never bleeds in */
body.pdt-split-login #rememberme {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  flex-shrink: 0;
  margin: 0 0 0 1px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  background-color: #fff;
  background-image: none;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 11px 11px;
  cursor: pointer;
  vertical-align: middle;
}

body.pdt-split-login #rememberme:checked {
  background-color: #fff;
  border-color: #94a3b8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}

/* Kill WordPress core Dashicons checkmark pseudo-element on small screens */
body.pdt-split-login #rememberme::before,
body.pdt-split-login #rememberme:checked::before,
body.pdt-split-login #rememberme::after {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  background: none !important;
  font: 0/0 a !important;
}

body.pdt-split-login #rememberme:focus-visible {
  outline: 2px solid #64748b;
  outline-offset: 1px;
}

/* ============================================
   Submit Button - Pill Style
   ============================================ */
body.pdt-split-login #login form .submit {
  margin-top: 25px;
}

body.pdt-split-login #login form p.submit {
  display: block;
}

body.pdt-split-login #login form input[type="submit"],
body.pdt-split-login #login form .button-primary {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 11px 28px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: 0;
  background: linear-gradient(135deg, var(--pdt-login-primary) 0%, var(--pdt-login-secondary) 100%);
  border: none;
  border-radius: 28px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 8px 18px rgba(139, 92, 246, 0.28);
  text-shadow: none;
  overflow: hidden;
}

body.pdt-split-login #login form input[type="submit"]:hover,
body.pdt-split-login #login form .button-primary:hover {
  background: linear-gradient(135deg, var(--pdt-login-primary-hover) 0%, var(--pdt-login-primary) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 10px 22px rgba(139, 92, 246, 0.34);
  transform: translateY(-2px);
}

body.pdt-split-login #login form input[type="submit"]:active,
body.pdt-split-login #login form .button-primary:active {
  transform: translateY(0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 4px 12px rgba(139, 92, 246, 0.26);
}

body.pdt-split-login #login form input[type="submit"]:focus,
body.pdt-split-login #login form .button-primary:focus {
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 8px 18px rgba(139, 92, 246, 0.28);
  outline: none;
}

/* ============================================
   Error & Success Messages
   ============================================ */
#login_error,
.login .message,
.login .success {
  border-radius: var(--pdt-login-radius-sm);
  padding: 16px 20px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#login_error {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #991b1b;
  border-left: 4px solid var(--pdt-login-error);
}

#login_error a {
  color: #dc2626;
  font-weight: 600;
}

.login .message {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
  border-left: 4px solid #3b82f6;
}

.login .success {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #065f46;
  border-left: 4px solid var(--pdt-login-success);
}

/* ============================================
   Navigation Links - Inside Form
   ============================================ */
body.pdt-split-login #nav,
body.pdt-split-login #backtoblog {
  text-align: center;
  margin-top: 25px;
  padding: 0;
}

body.pdt-split-login #nav a,
body.pdt-split-login #backtoblog a {
  color: var(--pdt-login-text-muted);
  font-size: 13px;
  text-decoration: none;
  transition: all 0.3s ease;
}

body.pdt-split-login #nav a:hover,
body.pdt-split-login #backtoblog a:hover {
  color: var(--pdt-login-primary);
}

body.pdt-split-login #nav {
  background: transparent;
  border-radius: 0;
  padding: 0;
}

body.pdt-split-login #nav a {
  margin: 0;
}

body.pdt-split-login #nav a:first-child {
  color: var(--pdt-login-text);
}

/* Separator - Forgot password link */
body.pdt-split-login #nav a:first-child::after {
  content: none;
}

body.pdt-split-login #nav a:last-child {
  color: var(--pdt-login-primary);
  font-weight: 500;
}

/* New here? Create account text */
body.pdt-split-login #backtoblog {
  margin-top: 30px;
}

body.pdt-split-login #backtoblog a {
  color: var(--pdt-login-primary);
  font-weight: 500;
}

/* ============================================
   Privacy Policy Link
   ============================================ */
.login .privacy-policy-page-link {
  text-align: center;
  margin-top: 15px;
}

.login .privacy-policy-page-link a {
  color: var(--pdt-login-text-muted);
  font-size: 12px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.login .privacy-policy-page-link a:hover {
  color: var(--pdt-login-primary);
}

/* ============================================
   Language switcher (desktop / tablet: floating chip)
   ============================================ */
.login .language-switcher {
  position: fixed;
  z-index: 100;
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  right: max(20px, env(safe-area-inset-right, 0px));
  top: auto;
  left: auto;
  max-width: min(380px, calc(100vw - 32px));
  margin: 0;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--pdt-login-border);
  border-radius: 12px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.login .language-switcher label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login .language-switcher form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.login .language-switcher select {
  flex: 1 1 160px;
  min-width: 0;
  padding: 8px 36px 8px 12px;
  font-size: 13px;
  border: 1px solid var(--pdt-login-border);
  border-radius: 20px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: var(--pdt-login-text);
  cursor: pointer;
  appearance: none;
}

.login .language-switcher select:focus {
  border-color: var(--pdt-login-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.login .language-switcher input[type="submit"] {
  flex: 0 0 auto;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--pdt-login-primary) 0%, var(--pdt-login-secondary) 100%);
  border: none;
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.login .language-switcher input[type="submit"]:hover {
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

/* Mobile: FAB + bottom sheet (JS moves .language-switcher into drawer) */
.pdt-lang-mobile-shell {
  display: none;
}

.pdt-lang-mobile-shell.is-active-layout {
  display: block;
}

.pdt-lang-fab {
  position: fixed;
  z-index: 10050;
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pdt-login-primary) 0%, var(--pdt-login-secondary) 100%);
  color: #fff;
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pdt-lang-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.5);
}

.pdt-lang-fab__icon {
  display: flex;
  line-height: 0;
}

.pdt-lang-drawer {
  position: fixed;
  inset: 0;
  z-index: 10040;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.pdt-lang-drawer.is-open {
  pointer-events: auto;
  opacity: 1;
}

.pdt-lang-drawer__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
}

.pdt-lang-drawer__sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 72vh;
  background: var(--pdt-login-card-bg);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.pdt-lang-drawer.is-open .pdt-lang-drawer__sheet {
  transform: translateY(0);
}

.pdt-lang-drawer__handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: #cbd5e1;
  margin: 10px auto 8px;
  flex-shrink: 0;
}

.pdt-lang-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 12px 16px;
  border-bottom: 1px solid var(--pdt-login-border);
}

.pdt-lang-drawer__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--pdt-login-text);
}

.pdt-lang-drawer__close {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--pdt-login-text-muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.pdt-lang-drawer__body {
  padding: 16px;
  overflow-y: auto;
}

.login .language-switcher.pdt-lang-in-drawer {
  position: static;
  max-width: none;
  width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.login .language-switcher.pdt-lang-in-drawer form {
  flex-direction: column;
  align-items: stretch;
}

.login .language-switcher.pdt-lang-in-drawer select {
  flex: none;
  width: 100%;
  border-radius: 12px;
  font-size: 16px;
}

.login .language-switcher.pdt-lang-in-drawer input[type="submit"] {
  flex: none;
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
}

body.pdt-lang-drawer-open {
  overflow: hidden;
}

/* ============================================
   Password Strength Meter
   ============================================ */
body.pdt-split-login #login #pass-strength-result {
  border-radius: var(--pdt-login-radius-sm);
  padding: 10px 15px;
  margin: 10px 0;
  font-weight: 600;
  text-align: center;
}

body.pdt-split-login #login #pass-strength-result.short {
  background: #fecaca;
  color: #991b1b;
}

body.pdt-split-login #login #pass-strength-result.bad {
  background: #fed7aa;
  color: #9a3412;
}

body.pdt-split-login #login #pass-strength-result.good {
  background: #fef08a;
  color: #854d0e;
}

body.pdt-split-login #login #pass-strength-result.strong {
  background: #bbf7d0;
  color: #166534;
}

/* ============================================
   Two Factor Authentication
   ============================================ */
body.pdt-split-login #login .backup-methods-wrap {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--pdt-login-border);
}

/* ============================================
   reCAPTCHA Styling
   ============================================ */
.pdt-recaptcha-wrap {
  margin: 20px 0;
  display: flex;
  justify-content: center;
}

body.pdt-split-login #login .g-recaptcha {
  margin: 20px 0;
  display: flex;
  justify-content: center;
  transform: scale(0.95);
  transform-origin: center;
}

body.pdt-split-login #login .g-recaptcha > div {
  border-radius: var(--pdt-login-radius-sm);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Loading State
   ============================================ */
body.pdt-split-login #login form.loading {
  pointer-events: none;
  opacity: 0.7;
}

body.pdt-split-login #login form.loading input[type="submit"] {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
  cursor: wait;
}

/* ============================================
   Shake Animation for Errors
   ============================================ */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

body.pdt-split-login #login form.shake {
  animation: shake 0.5s ease-in-out;
}

/* ============================================
   Responsive Design - Split Screen
   ============================================ */
@media (max-width: 900px) {
  #login {
    max-width: 500px;
  }

  html.pdt-login-runtime-pending #login,
  html.pdt-login-runtime-pending #login::before {
    min-height: 620px;
  }
  
  .pdt-login-wrapper {
    flex-direction: column;
    min-height: auto;
  }
  
  .pdt-login-left-panel {
    flex: 0 0 auto;
    padding: 40px 30px;
    min-height: 180px;
    /* Prevent top/bottom clipping on custom tall logos in stacked layout. */
    overflow: visible;
  }
  
  .pdt-login-welcome h2 {
    font-size: 32px;
  }
  
  .pdt-login-right-panel {
    padding: 40px 30px;
  }
}

@media (max-width: 520px) {
  body.login {
    padding: max(12px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px)) 16px;
  }

  html.pdt-login-runtime-pending #login,
  html.pdt-login-runtime-pending #login::before {
    min-height: 560px;
  }

  html.pdt-login-runtime-pending #login::before {
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(99, 102, 241, 0.94) 0%, rgba(99, 102, 241, 0.9) 32%, rgba(255, 255, 255, 0.98) 32%, rgba(255, 255, 255, 0.98) 100%);
  }

  body.login.pdt-lang-mobile-on {
    padding-bottom: max(88px, calc(16px + env(safe-area-inset-bottom, 0px)));
  }

  .pdt-login-wrapper {
    border-radius: 16px;
  }

  .pdt-login-left-panel {
    flex: 0 0 auto;
    padding: max(28px, calc(12px + env(safe-area-inset-top, 0px))) 24px 28px;
    min-height: 0;
    overflow: visible;
  }

  .pdt-login-left-panel::before,
  .pdt-login-left-panel::after,
  .pdt-login-decor,
  .pdt-login-wave {
    display: none;
  }

  .pdt-login-logo {
    margin-bottom: 16px;
  }

  .pdt-login-logo img {
    max-width: min(220px, 100%);
    max-height: 128px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center top;
  }

  .pdt-login-welcome {
    padding-top: 6px;
  }

  .pdt-login-welcome h2 {
    font-size: 26px;
  }

  .pdt-login-welcome p {
    font-size: 14px;
  }

  .pdt-login-right-panel {
    padding: 30px 25px;
  }

  .pdt-login-form-title {
    font-size: 24px;
  }

  body.pdt-split-login #login form input[type="text"],
  body.pdt-split-login #login form input[type="password"],
  body.pdt-split-login #login form input[type="email"] {
    padding: 14px 20px;
    font-size: 16px;
  }

  body.pdt-split-login #user_login,
  body.pdt-split-login #user_pass,
  body.pdt-split-login #user_email {
    padding-left: 45px;
  }

  body.pdt-split-login #login form p:has(input[type="text"])::before,
  body.pdt-split-login #login form p:has(input[type="password"])::before {
    left: 16px;
  }

  /* After JS wires FAB + drawer, hide the original floating chip */
  body.login.pdt-lang-mobile-on .language-switcher:not(.pdt-lang-in-drawer) {
    opacity: 0;
    pointer-events: none;
    position: fixed;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  body.login {
    background: #fff !important;
  }
  
  body.login::before,
  body.login::after {
    display: none;
  }
  
  body.pdt-split-login #login form {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ============================================
   Accessibility Improvements
   ============================================ */
body.pdt-split-login #login form input:focus-visible,
body.pdt-split-login #login form button:focus-visible,
body.pdt-split-login #login a:focus-visible {
  outline: 3px solid var(--pdt-login-primary);
  outline-offset: 2px;
}

/* Screen Reader Only */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   Custom Scrollbar
   ============================================ */
body.login::-webkit-scrollbar {
  width: 8px;
}

body.login::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

body.login::-webkit-scrollbar-thumb {
  background: var(--pdt-login-primary);
  border-radius: 4px;
}

body.login::-webkit-scrollbar-thumb:hover {
  background: var(--pdt-login-primary-hover);
}
