@charset "UTF-8";

/* ==========================================================
   POPUP LOGIN – UI/UX clean (texts only in .popup-subtitle)
========================================================== */

/* ----------------------------------------------------------
   NO DEAD HOVER ZONE (bridge)
---------------------------------------------------------- */
.login-card {
  overflow: visible !important; /* Bridge darf nicht abgeschnitten werden */
  padding: 18px 18px 16px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.22) !important;
}

/* Bridge breiter, damit kein "toter Bereich" */
.login-card::after {
  top: calc(-1 * var(--dropdown-gap));
  height: var(--dropdown-gap);
  left: -34px;
  right: -34px;
  background: transparent;
}

/* Während Success: Popup offen halten */
.login-card.force-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

/* ----------------------------------------------------------
   HEADER TEXTS
---------------------------------------------------------- */
.login-card .login-inner {
  position: relative;
}

.login-card .popup-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.login-card .popup-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: rgba(0, 0, 0, 0.92);
  line-height: 1.15;
}

/* ✅ ALL messages happen here */
.login-card .popup-subtitle {
  font-size: 13px;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.62);

  /* smooth replace */
  min-height: 18px;
  transition: opacity 160ms ease, transform 160ms ease;
}

.login-card .popup-subtitle.is-animating {
  opacity: 0;
  transform: translateY(-2px);
}

/* status colors (still same element) */
.login-card .popup-subtitle.is-error {
  color: rgba(140, 0, 18, 0.92);
}
.login-card .popup-subtitle.is-success {
  color: rgba(0, 95, 55, 0.92);
}

/* ----------------------------------------------------------
   STEPS
---------------------------------------------------------- */
.login-card .popup-step {
  display: none;
  animation: popupStepIn 200ms ease both;
}
.login-card .popup-step.is-active {
  display: block;
}

@keyframes popupStepIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading state */
.login-card.is-loading .popup-step {
  pointer-events: none;
  opacity: 0.92;
}

/* ----------------------------------------------------------
   INPUTS
---------------------------------------------------------- */
.login-card .login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.login-card .login-field label {
  font-size: 12.5px;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.78);
}

.login-card .login-field input {
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f6f6f8;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease,
    background 160ms ease;
}

.login-card .login-field input:focus {
  background: #fff;
  border-color: rgba(227, 5, 19, 0.35);
  box-shadow: 0 0 0 4px rgba(227, 5, 19, 0.12);
}

/* ----------------------------------------------------------
   ACTIONS
---------------------------------------------------------- */
.login-card .login-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 12px;
}

.login-card .login-actions button {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.01em;
  cursor: pointer;
  background: var(--ipfRot);
  color: #fff;
  transition: transform 120ms ease, filter 160ms ease, opacity 160ms ease;
}

.login-card .login-actions button:hover {
  filter: brightness(0.98);
}
.login-card .login-actions button:active {
  transform: translateY(1px);
}
.login-card .login-actions button:disabled {
  opacity: 0.75;
  cursor: default;
}

.login-card .login-actions a {
  text-align: center;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.62);
  text-decoration: none;
}
.login-card .login-actions a:hover {
  color: var(--ipfRot);
}

/* ----------------------------------------------------------
   2FA DIGITS
---------------------------------------------------------- */
.login-card .totp-code {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.login-card .totp-digit {
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f6f6f8;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease,
    background 160ms ease;
}

.login-card .totp-digit:focus {
  background: #fff;
  border-color: rgba(227, 5, 19, 0.35);
  box-shadow: 0 0 0 4px rgba(227, 5, 19, 0.12);
}

/* ----------------------------------------------------------
   SUCCESS STEP (height auto, no overlay bugs)
---------------------------------------------------------- */
.login-card .popup-success-surface {
  width: 100%;
  border-radius: 22px;
  padding: 16px 16px 14px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.12);
  text-align: center;

  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-card .popup-success-text {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(0, 0, 0, 0.9);
  word-break: break-word;
}

.login-card .popup-success-text .popup-name {
  color: var(--ipfRot);
  font-weight: 900;
}

.login-card .popup-success-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.08);
}

.login-card .popup-success-progress > span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: rgba(227, 5, 19, 0.75);
}

.login-card .popup-success-progress > span.run {
  animation: popupProgress var(--popup-reload-ms, 1000ms) linear forwards;
}

@keyframes popupProgress {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

/* ----------------------------------------------------------
   Responsive
---------------------------------------------------------- */
@media (max-width: 768px) {
  .login-card {
    padding: 16px !important;
  }

  .login-card .popup-title {
    font-size: 17px;
  }

  .login-card .totp-code {
    gap: 8px;
  }

  .login-card .totp-digit {
    height: 44px;
    font-size: 17px;
  }
}
