/**
 * FM-POLISH-006A — Activate Privacy, Terms & Support links
 * Keeps FM-POLISH-006 floating (no-card) shell.
 */

body.fm-polish-006a-auth .fm-auth-sr-only,
body.fm-polish-006-auth .fm-auth-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body.fm-polish-006a-auth .fm-auth-legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 4px;
}

body.fm-polish-006a-auth .fm-auth-legal-links a.fm-auth-legal-link,
body.fm-polish-006-auth .fm-auth-legal-links a.fm-auth-legal-link {
  color: var(--fm-p6-soft, #9AA89F) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

body.fm-polish-006a-auth .fm-auth-legal-links a.fm-auth-legal-link:hover,
body.fm-polish-006a-auth .fm-auth-legal-links a.fm-auth-legal-link:focus-visible,
body.fm-polish-006-auth .fm-auth-legal-links a.fm-auth-legal-link:hover,
body.fm-polish-006-auth .fm-auth-legal-links a.fm-auth-legal-link:focus-visible {
  color: #E8F0EA !important;
  outline: 2px solid rgba(212, 224, 216, 0.7);
  outline-offset: 2px;
}

body.fm-polish-006a-auth .fm-auth-legal-sep {
  color: var(--fm-p6-soft, #9AA89F);
  opacity: 0.7;
  padding: 0 2px;
}

/* Consent: checkbox separate from legal anchors */
body.fm-polish-006a-auth .fm-auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: start;
  margin: 8px 0 4px;
}

body.fm-polish-006a-auth .fm-auth-consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}

body.fm-polish-006a-auth .fm-auth-consent-text {
  line-height: 1.45;
  color: var(--fm-p6-muted, #C5CEC7);
}

body.fm-polish-006a-auth .fm-auth-consent-text label {
  cursor: pointer;
  font-weight: inherit;
  color: inherit;
}

body.fm-polish-006a-auth .fm-auth-inline-legal,
body.fm-polish-006-auth .fm-auth-inline-legal {
  color: #D4E0D8 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  border-radius: 4px;
}

body.fm-polish-006a-auth .fm-auth-inline-legal:hover,
body.fm-polish-006a-auth .fm-auth-inline-legal:focus-visible,
body.fm-polish-006-auth .fm-auth-inline-legal:hover,
body.fm-polish-006-auth .fm-auth-inline-legal:focus-visible {
  color: #FFFDF7 !important;
  outline: 2px solid rgba(212, 224, 216, 0.75);
  outline-offset: 2px;
}

/* Internal legal reader */
body.fm-polish-006a-auth .fm-auth-legal-body {
  text-align: start;
  margin-top: 28px;
  max-height: min(46vh, 420px);
  overflow-y: auto;
  padding-inline-end: 6px;
}

body.fm-polish-006a-auth .fm-auth-legal-section {
  margin-bottom: 18px;
}

body.fm-polish-006a-auth .fm-auth-legal-section h2 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--fm-p6-ink, #F4F0E6);
  font-weight: 650;
}

body.fm-polish-006a-auth .fm-auth-legal-section p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--fm-p6-muted, #C5CEC7);
}

body.fm-polish-006a-auth .fm-auth-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 12px;
}

body.fm-polish-006a-auth a.fm-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}

/* Legal reader may need page scroll; keep Sign In no-scroll elsewhere */
body.fm-polish-006a-auth #auth-session-overlay.fm-ds-001c-overlay:has([data-testid^="fm-ds-001c-legal-"]) {
  overflow-y: auto !important;
}

@media (max-width: 640px) {
  body.fm-polish-006a-auth .fm-auth-legal-links a.fm-auth-legal-link {
    min-height: 44px;
    padding: 12px 10px;
  }
}

html[dir="rtl"] body.fm-polish-006a-auth .fm-auth-consent {
  text-align: start;
}
