/**
 * Password UI structure shared by Pure, Minimal and GlassUI (mobile password login views,
 * password setup / reset groups, requirements list, strength meter).
 *
 * Colours come from tokens every template sets on its root:
 *   --pym-pw-text    helper / requirement text
 *   --pym-pw-muted   quiet text (hints)
 *   --pym-pw-link    secondary action buttons
 *   --pym-pw-ok      satisfied requirement
 *   --pym-pw-track   empty strength track
 *
 * @package OTPex
 * @since   1.4.16
 */

/* ── OTP / password methods inside the mobile panel ── */
.pym-auth .pym-auth__mobile-view {
  display: none;
}

.pym-auth .pym-auth__mobile-view--active {
  display: block;
}

.pym-auth .pym-auth__password-setup[hidden] {
  display: none !important;
}

/* Visually hidden, still announced. */
.pym-auth .pym-auth__sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ── Complete Profile: password section ── */
.pym-auth .pym-auth__password-setup {
  margin: 8px 0 16px !important;
}

.pym-auth .pym-auth__section-head {
  margin: 0 0 12px !important;
  padding: 0 !important;
  text-align: start;
}

.pym-auth .pym-auth__section-title {
  margin: 0 0 4px !important;
  padding: 0 !important;
  color: var(--pym-pw-text, inherit);
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.6 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  direction: rtl !important;
  font-family: inherit !important;
}

.pym-auth .pym-auth__section-hint {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--pym-pw-muted, inherit);
  font-size: 12px !important;
  line-height: 1.8 !important;
}

/* ── Strength meter ── */
.pym-auth .pym-auth__pass-group .pym-auth__pass-strength {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 8px 0 0 !important;
}

.pym-auth .pym-auth__pass-group .pym-auth__pass-meter {
  flex: 1 1 auto !important;
  width: auto !important;
  height: 4px !important;
  border-radius: 4px !important;
  background: var(--pym-pw-track, #e5e7eb) !important;
  overflow: hidden !important;
}

.pym-auth .pym-auth__pass-group .pym-auth__pass-meter-fill {
  width: 0;
  height: 100% !important;
  border-radius: inherit !important;
  transition: width 0.2s ease, background-color 0.2s ease !important;
}

.pym-auth .pym-auth__pass-group .pym-auth__pass-label {
  min-width: 44px !important;
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  direction: rtl !important;
  text-align: start !important;
}

/* ── Live requirements ── */
.pym-auth .pym-auth__pass-reqs {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)) !important;
  gap: 4px 12px !important;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.pym-auth .pym-auth__req {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--pym-pw-muted, inherit);
  font-size: 12px !important;
  line-height: 1.7 !important;
  list-style: none !important;
  transition: color 0.15s ease;
}

.pym-auth .pym-auth__req-icon {
  flex: none !important;
  width: 14px !important;
  height: 14px !important;
}

.pym-auth .pym-auth__req-check {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.pym-auth .pym-auth__req-dot {
  opacity: 0.55;
}

/* Satisfied: colour + a check mark + screen-reader text (never colour alone). */
.pym-auth .pym-auth__req[data-met="1"] {
  color: var(--pym-pw-ok, #027a48);
}

.pym-auth .pym-auth__req[data-met="1"] .pym-auth__req-check {
  opacity: 1;
}

.pym-auth .pym-auth__req[data-met="1"] .pym-auth__req-dot {
  opacity: 1;
}

/* ── Secondary actions (switch method / forgot / generator) ── */
.pym-auth .pym-auth__mobile-view .pym-auth__switch-view,
.pym-auth .pym-auth__email-view .pym-auth__switch-view {
  text-align: center;
}

.pym-auth .pym-auth__text-btn {
  color: var(--pym-pw-link, inherit);
  cursor: pointer;
}

.pym-auth .pym-auth__pass-group .pym-auth__generate-pass {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 8px !important;
  cursor: pointer;
}

.pym-auth .pym-auth__pass-group .pym-auth__generate-pass svg {
  flex: none;
}

@media (max-width: 480px) {
  .pym-auth .pym-auth__pass-reqs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 3px 8px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pym-auth .pym-auth__req,
  .pym-auth .pym-auth__req-check,
  .pym-auth .pym-auth__pass-group .pym-auth__pass-meter-fill {
    transition: none !important;
  }
}
