/* ==========================================================================
 * MonkeyThunder.com — Theme-Adaptive Mechanical Odometer & Zero-PII Modal
 * Inherits TFS V2.0 Light / Medium-Dark / Dark CSS variables (--tf-*)
 * ========================================================================== */

footer.tf-global-footer.tf-footer--has-odometer,
footer.tf-global-footer.tf-footer--no-wave.tf-footer--has-odometer {
  justify-content: space-between !important;
  padding: 0 22px !important;
  gap: 12px;
}

.tf-footer-left {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 0;
  color: var(--tf-ink-strong, currentColor);
}

.tf-odometer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 6px 0 7px;
  border-radius: 6px;
  background: var(--tf-bg-well, rgba(148, 163, 184, 0.12));
  border: 1px solid var(--tf-border-subtle, rgba(148, 163, 184, 0.28));
  color: var(--tf-ink-strong, currentColor);
  user-select: none;
}

.tf-odometer-pip {
  width: 5px;
  height: 5px;
  border-radius: 9999px;
  background: var(--tf-brand-accent, #10b981);
  opacity: 0.92;
  flex-shrink: 0;
}

.tf-odometer--loading .tf-odometer-pip {
  opacity: 0.36;
}

.tf-odometer-wheels {
  display: inline-flex;
  align-items: center;
  height: 18px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  -webkit-mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.38) 0%,
    #000 22%,
    #000 78%,
    rgba(0, 0, 0, 0.38) 100%
  );
  mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.38) 0%,
    #000 22%,
    #000 78%,
    rgba(0, 0, 0, 0.38) 100%
  );
}

.tf-odo-cell {
  position: relative;
  width: 1.18ch;
  height: 18px;
  overflow: hidden;
  display: inline-block;
  text-align: center;
}

.tf-odo-cell + .tf-odo-cell {
  border-left: 1px solid var(--tf-border-subtle, rgba(148, 163, 184, 0.22));
}

.tf-odo-cell--muted {
  opacity: 0.34;
}

.tf-odo-cell--active {
  opacity: 0.96;
}

.tf-odometer--loading .tf-odo-cell {
  opacity: 0.28;
}

.tf-odo-ribbon {
  display: flex;
  flex-direction: column;
  transform: translateY(calc(var(--odo-digit, 0) * -18px));
  transition: transform calc(420ms + var(--odo-delay, 0ms)) cubic-bezier(0.2, 0.92, 0.28, 1);
  will-change: transform;
}

.tf-odo-num {
  height: 18px;
  line-height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .tf-odo-ribbon {
    transition: none;
  }
}

.tf-privacy-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 9999px;
  border: 1px solid var(--tf-border-subtle, rgba(148, 163, 184, 0.28));
  background: var(--tf-bg-pill, rgba(255, 255, 255, 0.06));
  color: var(--tf-ink-body, currentColor);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tf-privacy-trigger:hover {
  background: var(--tf-brand-accent-tint, rgba(16, 185, 129, 0.12));
  border-color: var(--tf-brand-accent-border, rgba(16, 185, 129, 0.4));
  color: var(--tf-ink-strong, currentColor);
}

.tf-privacy-trigger:focus-visible {
  outline: 2px solid var(--tf-brand-accent, #10b981);
  outline-offset: 2px;
}

.tf-privacy-icon {
  width: 12.5px;
  height: 12.5px;
  color: var(--tf-brand-accent, #10b981);
  flex-shrink: 0;
}

/* Zero-PII Privacy Modal (Theme-Adaptive Light / Med / Dark) */
.tf-odo-backdrop {
  position: fixed;
  inset: 0;
  z-index: 650;
  background: rgba(8, 13, 23, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.tf-odo-backdrop.is-open {
  display: flex;
}

.tf-odo-modal {
  width: 100%;
  max-width: 480px;
  border-radius: 18px;
  background: var(--tf-bg-card, #111a2c);
  border: 1px solid var(--tf-border-strong, rgba(148, 163, 184, 0.35));
  box-shadow: var(--tf-shadow-frame, 0 28px 70px -16px rgba(0, 0, 0, 0.55));
  color: var(--tf-ink-body, #e2e8f0);
  padding: 20px 22px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.tf-odo-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--tf-border-subtle, rgba(148, 163, 184, 0.2));
}

.tf-odo-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
}

.tf-odo-modal-shield {
  width: 19px;
  height: 19px;
  color: var(--tf-brand-accent, #10b981);
  flex-shrink: 0;
}

.tf-odo-modal-title {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--tf-ink-strong, #ffffff);
}

.tf-odo-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--tf-ink-muted, #94a3b8);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tf-odo-close:hover {
  background: var(--tf-bg-well, rgba(148, 163, 184, 0.15));
  color: var(--tf-ink-strong, #ffffff);
}

.tf-odo-modal-body {
  font-size: 13px;
  line-height: 1.56;
  color: var(--tf-ink-body, #cbd5e1);
}

.tf-odo-modal-body p {
  margin: 0 0 10px 0;
}

.tf-odo-modal-body strong {
  color: var(--tf-ink-strong, #ffffff);
}

.tf-odo-modal-body code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--tf-brand-accent-tint, rgba(16, 185, 129, 0.12));
  border: 1px solid var(--tf-brand-accent-border, rgba(16, 185, 129, 0.35));
  color: var(--tf-ink-strong, #ffffff);
}

.tf-odo-list {
  margin: 10px 0 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tf-odo-modal-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--tf-border-subtle, rgba(148, 163, 184, 0.2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tf-odo-meta {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--tf-ink-muted, #64748b);
}

.tf-odo-done-btn {
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid var(--tf-brand-accent, #059669);
  background: var(--tf-brand-accent, #059669);
  color: #ffffff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.tf-odo-done-btn:hover {
  background: var(--tf-brand-accent-hover, #047857);
}

@media (max-width: 720px) {
  body.tf-unified-body {
    padding-bottom: 66px !important;
  }

  footer.tf-global-footer.tf-footer--has-odometer,
  footer.tf-global-footer.tf-footer--no-wave.tf-footer--has-odometer {
    height: auto !important;
    min-height: 32px;
    padding: 5px 12px !important;
    flex-wrap: wrap;
    justify-content: space-between !important;
    gap: 4px 10px;
  }

  footer.tf-global-footer.tf-footer--has-odometer .tf-footer-tagline-right {
    margin: 0 !important;
    font-size: 11px;
  }

  .tf-footer-left {
    gap: 6px;
  }

  .tf-privacy-trigger {
    padding: 0 7px;
    font-size: 10.5px;
  }
}

@media (max-width: 639.98px) {
  footer.tf-global-footer.tf-footer--has-odometer .tf-footer-tagline-right {
    order: -1;
    width: 100%;
    justify-content: center;
    text-align: center;
    font-size: 10.5px;
    opacity: 0.9;
  }

  footer.tf-global-footer.tf-footer--has-odometer .tf-footer-left {
    width: 100%;
    justify-content: space-between;
  }
}

/* Interactive MonkeyThunder Logo & Bug (Light / Med / Dark topbars) */
svg.tf-mt-interactive-logo {
  height: 55px !important;
  max-height: 55px !important;
  width: auto !important;
  display: block !important;
  flex-shrink: 0;
}

svg.tf-mt-interactive-logo .mt-go-ink {
  fill: #0b0f19;
}

svg.tf-mt-interactive-logo .mt-go-accent {
  fill: #1d4ed8;
}

svg.tf-mt-interactive-logo .mt-go-sclera {
  fill: none;
  stroke: none;
}

svg.tf-mt-interactive-logo .mt-go-pupil {
  fill: #0b0f19;
}

html[data-theme="medium-dark"] svg.tf-mt-interactive-logo .mt-go-ink,
html[data-theme="dark"] svg.tf-mt-interactive-logo .mt-go-ink,
html[data-theme="medium-dark"] svg.tf-mt-interactive-logo .mt-go-accent,
html[data-theme="dark"] svg.tf-mt-interactive-logo .mt-go-accent {
  fill: #ffffff;
}

html[data-theme="medium-dark"] svg.tf-mt-interactive-logo .mt-go-sclera,
html[data-theme="dark"] svg.tf-mt-interactive-logo .mt-go-sclera {
  fill: #f8fafc;
  stroke: #0b0f19;
  stroke-width: 2.2px;
  stroke-linejoin: round;
}

html[data-theme="medium-dark"] svg.tf-mt-interactive-logo .mt-go-pupil,
html[data-theme="dark"] svg.tf-mt-interactive-logo .mt-go-pupil {
  fill: #0b0f19;
}

@media (max-width: 900px) {
  svg.tf-mt-interactive-logo {
    height: auto !important;
    max-height: 46px !important;
    max-width: 100% !important;
  }
}

@media (max-width: 720px) {
  svg.tf-mt-interactive-logo {
    max-height: 42px !important;
  }
}

@media print {
  .tf-odo-backdrop {
    display: none !important;
  }
}
