/* ============================================================
   JUSTANDERSSON – Login-Drawer Styles (U17)
   ============================================================ */

/* ── Login-Button in der Navigation ────────────────────────── */

#nav-login-container {
  display: flex;
  align-items: center;
}

.login-nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1.5px solid var(--blue-light, #5A8BA6);
  border-radius: 20px;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.login-nav-btn:hover {
  background: var(--blue, #3D5E77);
  color: #fff;
  border-color: var(--blue, #3D5E77);
}

/* Roter Badge für ungelesene Nachrichten */
.login-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #e53e3e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Overlay ─────────────────────────────────────────────────── */

.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.login-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Drawer ──────────────────────────────────────────────────── */

#login-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 32px rgba(61, 94, 119, 0.18);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

#login-drawer.open {
  transform: translateX(0);
}

.login-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e8e8e8;
}

.login-drawer-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-dark, #2C4A5E);
  margin: 0;
}

.login-drawer-close {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 22px;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.login-drawer-close:hover {
  background: #f0f0f0;
  color: #333;
}

.login-drawer-body {
  flex: 1;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Zustände im Drawer ──────────────────────────────────────── */

.login-state {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.login-state.active {
  display: flex;
}

/* ── Formularfelder ──────────────────────────────────────────── */

.login-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light, #555566);
  margin-bottom: 4px;
  display: block;
}

.login-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d0d0d0;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.login-input:focus {
  border-color: var(--blue, #3D5E77);
}

.login-btn {
  width: 100%;
  padding: 12px 20px;
  background: var(--blue, #3D5E77);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.login-btn:hover {
  background: var(--blue-dark, #2C4A5E);
}

.login-btn:active {
  transform: scale(0.98);
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-link-btn {
  background: none;
  border: none;
  color: var(--blue, #3D5E77);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  text-align: center;
}

/* ── OTP-Eingabe: 6 Einzelfelder ─────────────────────────────── */

.otp-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.otp-inputs input {
  width: 44px;
  height: 52px;
  border: 1.5px solid #d0d0d0;
  border-radius: 10px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.otp-inputs input:focus {
  border-color: var(--blue, #3D5E77);
}

/* ── Hinweis-Text ────────────────────────────────────────────── */

.login-hint {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
  text-align: center;
}

.login-hint a {
  color: var(--blue, #3D5E77);
}

/* ── DSGVO-Checkbox ──────────────────────────────────────────── */

.login-dsgvo-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.login-dsgvo-row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.login-dsgvo-row label {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  cursor: pointer;
}

.login-dsgvo-row a {
  color: var(--blue, #3D5E77);
  text-decoration: underline;
}

/* ── Fehlermeldung ───────────────────────────────────────────── */

.login-error {
  padding: 10px 14px;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 8px;
  color: #c53030;
  font-size: 13px;
  display: none;
}

.login-error.visible {
  display: block;
}

/* ── Erfolgsmeldung ──────────────────────────────────────────── */

.login-success-msg {
  padding: 14px;
  background: #f0fff4;
  border: 1px solid #c6f6d5;
  border-radius: 8px;
  color: #276749;
  font-size: 14px;
  text-align: center;
}

/* ── Responsive: Mobile ──────────────────────────────────────── */

@media (max-width: 768px) {
  #login-drawer {
    width: 100%;
    border-radius: 0;
  }
}

/* ── Kundenkonto-Dropdown (UI-18 Bereinigung) ─────────────── */
.nav-user-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid rgba(61,94,119,0.15);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(26,26,46,0.14);
  z-index: 9999;
  overflow: hidden;
  animation: ddFadeIn 0.15s ease;
}

@keyframes ddFadeIn {
  from { opacity:0; transform:translateY(-6px); }
  to   { opacity:1; transform:translateY(0); }
}

.nav-user-dd-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-dark, #1a2744);
  background: none;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.nav-user-dd-item:last-child { border-bottom: none; }
.nav-user-dd-item:hover { background: #f0f6fa; color: var(--blue, #3D5E77); }

.nav-user-dd-logout {
  color: #c0392b;
}
.nav-user-dd-logout:hover { background: #fff5f5; color: #c0392b; }
