/*
 * Staff MFA login / setup / OTP screens — responsive layout on top of admin_jazzmin_brand.css
 */

body.login-page.staff-mfa-auth {
  padding: clamp(1rem, 4vw, 2rem) clamp(0.75rem, 3vw, 1.5rem);
}

body.login-page.staff-mfa-auth .login-box {
  max-width: min(34rem, 100%);
}

body.login-page.staff-mfa-auth .login-box--setup {
  max-width: min(32rem, 100%);
}

body.login-page.staff-mfa-auth .staff-mfa-card-title {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.75rem;
}

body.login-page.staff-mfa-auth .staff-mfa-lead {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #495057;
  margin-bottom: 1rem;
}

body.login-page.staff-mfa-auth .staff-mfa-username {
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* QR — scale down on narrow viewports, cap size on desktop */
.staff-mfa-qr-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1rem;
  padding: 0.25rem;
  max-width: 100%;
}

.staff-mfa-qr-wrap img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 16rem);
  max-height: min(16rem, 52vw);
  object-fit: contain;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  padding: clamp(0.5rem, 2vw, 0.75rem);
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 39, 68, 0.06);
}

.staff-mfa-manual-setup {
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.staff-mfa-manual-setup summary {
  cursor: pointer;
  color: #1a4a6e;
  font-weight: 600;
  list-style: none;
  padding: 0.35rem 0;
}

.staff-mfa-manual-setup summary::-webkit-details-marker {
  display: none;
}

.staff-mfa-manual-setup summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
}

.staff-mfa-manual-setup[open] summary::before {
  transform: rotate(90deg);
}

.staff-mfa-uri {
  margin-top: 0.5rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1.45;
  word-break: break-all;
  overflow-wrap: anywhere;
  background: #f4f8fb;
  border: 1px solid rgba(26, 74, 110, 0.12);
  border-radius: 0.375rem;
  color: #495057;
}

.staff-mfa-otp-input {
  font-size: 1.25rem !important;
  letter-spacing: 0.2em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.staff-mfa-recovery-list {
  margin: 1rem 0 1.25rem;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  max-height: min(50vh, 20rem);
  overflow-y: auto;
}

.staff-mfa-recovery-list li {
  padding: 0.35rem 0;
  font-size: 0.95rem;
  word-break: break-all;
}

@media (min-width: 576px) {
  .staff-mfa-qr-wrap img {
    max-width: 14rem;
    max-height: 14rem;
  }

  body.login-page.staff-mfa-auth .staff-mfa-recovery-list {
    columns: 2;
    column-gap: 1.5rem;
  }

  body.login-page.staff-mfa-auth .staff-mfa-recovery-list li {
    break-inside: avoid;
  }
}

@media (min-width: 768px) {
  body.login-page.staff-mfa-auth .login-box--setup {
    max-width: 30rem;
  }

  .staff-mfa-qr-wrap img {
    max-width: 15rem;
    max-height: 15rem;
  }
}

@media (max-width: 575.98px) {
  body.login-page.staff-mfa-auth .login-logo {
    margin-bottom: 1.25rem !important;
  }

  body.login-page.staff-mfa-auth .login-logo img {
    max-height: 4.5rem;
  }

  body.login-page.staff-mfa-auth .card-body,
  body.login-page.staff-mfa-auth .login-card-body {
    padding: 1.25rem 1rem 1.5rem;
  }

  body.login-page.staff-mfa-auth .btn-primary {
    font-size: 1rem;
    min-height: 3rem;
  }
}
