/* TopNotch visitor consent controls — intentionally isolated from theme styles. */
#tn-consent-banner,
#tn-consent-dialog,
.tn-consent-footer-link,
.tn-whatsapp-float,
.tn-consent-placeholder,
.tn-consent-status {
  --tn-consent-ink: #292532;
  --tn-consent-muted: #625d69;
  --tn-consent-purple: #7044d5;
  --tn-consent-purple-dark: #5832b1;
  --tn-consent-line: #e8e2ee;
  --tn-consent-wash: #faf8fc;
  box-sizing: border-box;
  color: var(--tn-consent-ink);
  font-family: "TopNotch Satoshi", "Avenir Next", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

#tn-consent-banner *,
#tn-consent-dialog *,
.tn-consent-placeholder *,
.tn-consent-footer-link *,
.tn-whatsapp-float *,
.tn-consent-status *,
#tn-consent-banner *::before,
#tn-consent-dialog *::before,
.tn-consent-placeholder *::before,
#tn-consent-banner *::after,
#tn-consent-dialog *::after,
.tn-consent-placeholder *::after {
  box-sizing: border-box;
}

#tn-consent-banner[hidden],
#tn-consent-dialog[hidden],
.tn-whatsapp-float[hidden],
.tn-consent-placeholder[hidden],
.tn-consent-status[hidden] {
  display: none !important;
}

#tn-consent-banner {
  position: fixed !important;
  z-index: 10000000000 !important;
  inset: auto 20px 20px !important;
  width: min(760px, calc(100vw - 40px)) !important;
  max-height: calc(100dvh - 40px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  margin-inline: auto !important;
  padding: 23px 25px 20px !important;
  border: 1px solid var(--tn-consent-line) !important;
  border-radius: 20px !important;
  background: #fff !important;
  box-shadow: 0 16px 48px rgba(41, 32, 57, .18), 0 2px 8px rgba(41, 32, 57, .06) !important;
  text-align: left !important;
}

#tn-consent-banner h2,
#tn-consent-dialog h2 {
  margin: 0 0 8px !important;
  color: var(--tn-consent-ink) !important;
  font-family: inherit !important;
  font-size: clamp(19px, 2vw, 22px) !important;
  font-weight: 700 !important;
  letter-spacing: -.025em !important;
  line-height: 1.25 !important;
}

#tn-consent-banner p,
#tn-consent-dialog > p {
  margin: 0 0 17px !important;
  color: var(--tn-consent-muted) !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.65 !important;
}

#tn-consent-banner .tn-actions,
#tn-consent-dialog .tn-actions {
  display: flex !important;
  align-items: stretch !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 0 !important;
}

#tn-consent-banner .tn-actions > .tn-consent-button,
#tn-consent-dialog .tn-actions > .tn-consent-button {
  display: inline-flex !important;
  flex: 1 1 0 !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 10px 13px !important;
  border: 1px solid #ded5eb !important;
  border-radius: 999px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: #51445f !important;
  cursor: pointer !important;
  font: 600 14px/1.25 "TopNotch Satoshi", "Avenir Next", system-ui, sans-serif !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: normal !important;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease !important;
}

#tn-consent-banner .tn-actions > .tn-consent-button:hover,
#tn-consent-dialog .tn-actions > .tn-consent-button:hover {
  border-color: #bda9df !important;
  background: #faf8fc !important;
  color: var(--tn-consent-purple-dark) !important;
}

#tn-consent-banner .tn-actions > .tn-consent-button:active,
#tn-consent-dialog .tn-actions > .tn-consent-button:active {
  transform: translateY(1px) !important;
}

#tn-consent-banner .tn-actions > .tn-consent-button:last-child,
#tn-consent-dialog .tn-actions > .tn-consent-button:last-child {
  border-color: var(--tn-consent-purple) !important;
  background: var(--tn-consent-purple) !important;
  color: #fff !important;
}

#tn-consent-banner .tn-actions > .tn-consent-button:last-child:hover,
#tn-consent-dialog .tn-actions > .tn-consent-button:last-child:hover {
  border-color: var(--tn-consent-purple-dark) !important;
  background: var(--tn-consent-purple-dark) !important;
  color: #fff !important;
}

#tn-consent-banner :focus-visible,
#tn-consent-dialog :focus-visible,
.tn-consent-footer-link:focus-visible,
.tn-whatsapp-float:focus-visible,
.tn-consent-placeholder :focus-visible {
  outline: 3px solid #9b7ce3 !important;
  outline-offset: 3px !important;
}

#tn-consent-dialog {
  position: fixed;
  inset: 50% auto auto 50%;
  width: min(580px, calc(100vw - 32px));
  max-width: 580px;
  max-height: min(82dvh, 760px);
  margin: 0;
  padding: 27px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--tn-consent-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(41, 32, 57, .24);
  transform: translate(-50%, -50%);
  text-align: left;
}

#tn-consent-dialog:not([open]) {
  display: none;
}

#tn-consent-dialog::backdrop {
  background: rgba(34, 28, 42, .48);
  backdrop-filter: blur(2px);
}

#tn-consent-dialog .tn-category {
  display: flex !important;
  align-items: flex-start !important;
  gap: 13px !important;
  margin: 0 0 10px !important;
  padding: 15px 16px !important;
  border: 1px solid var(--tn-consent-line) !important;
  border-radius: 16px !important;
  background: var(--tn-consent-wash) !important;
  color: var(--tn-consent-ink) !important;
  cursor: pointer !important;
}

#tn-consent-dialog .tn-category input[type="checkbox"] {
  flex: 0 0 auto !important;
  width: 18px !important;
  height: 18px !important;
  margin: 3px 0 0 !important;
  accent-color: var(--tn-consent-purple) !important;
  cursor: pointer !important;
}

#tn-consent-dialog .tn-category span {
  display: block !important;
  min-width: 0 !important;
  color: var(--tn-consent-muted) !important;
  font-family: inherit !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

#tn-consent-dialog .tn-category strong {
  display: block !important;
  margin: 0 0 3px !important;
  color: var(--tn-consent-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

#tn-consent-dialog .tn-category small {
  display: block !important;
  color: var(--tn-consent-muted) !important;
  font-family: inherit !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
}

#tn-consent-dialog .tn-actions {
  margin-top: 18px !important;
}

.tn-consent-footer-link {
  display: block !important;
  width: max-content !important;
  max-width: calc(100vw - 32px) !important;
  margin: 2px auto 16px !important;
  color: #5d4a78 !important;
  font-family: "TopNotch Satoshi", "Avenir Next", system-ui, sans-serif !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  text-align: center !important;
  text-decoration: underline !important;
  text-decoration-color: rgba(112, 68, 213, .38) !important;
  text-underline-offset: 3px !important;
}

.tn-consent-footer-link:hover {
  color: #86446b !important;
  text-decoration-color: currentColor !important;
}

.tn-whatsapp-float {
  position: fixed !important;
  z-index: 9999999999 !important;
  inset: auto auto calc(16px + env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px)) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  min-height: 50px !important;
  max-width: calc(100vw - 32px) !important;
  margin: 0 !important;
  padding: 11px 17px !important;
  border: 1px solid rgba(255, 255, 255, .22) !important;
  border-radius: 999px !important;
  background: linear-gradient(110deg, #7044d5 0%, #86446b 100%) !important;
  box-shadow: 0 8px 24px rgba(70, 44, 111, .26) !important;
  color: #fff !important;
  font: 700 14px/1.25 "TopNotch Satoshi", "Avenir Next", system-ui, sans-serif !important;
  text-decoration: none !important;
  transition: box-shadow .16s ease, transform .16s ease !important;
}

.tn-whatsapp-float svg {
  display: block !important;
  flex: 0 0 22px !important;
  width: 22px !important;
  height: 22px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  stroke-width: 1.65 !important;
}

.tn-whatsapp-float:hover {
  box-shadow: 0 10px 28px rgba(70, 44, 111, .34) !important;
  color: #fff !important;
  transform: translateY(-2px) !important;
}

.tn-consent-placeholder {
  margin: 24px 0 !important;
  padding: 19px 21px !important;
  border: 1px solid #e9e1f1 !important;
  border-left: 3px solid var(--tn-consent-purple) !important;
  border-radius: 16px !important;
  background: var(--tn-consent-wash) !important;
  text-align: left !important;
}

.tn-consent-placeholder p {
  margin: 0 0 12px !important;
  color: var(--tn-consent-muted) !important;
  font: 400 14px/1.65 "TopNotch Satoshi", "Avenir Next", system-ui, sans-serif !important;
}

.tn-consent-placeholder .tn-consent-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 9px 15px !important;
  border: 1px solid var(--tn-consent-purple) !important;
  border-radius: 999px !important;
  background: var(--tn-consent-purple) !important;
  box-shadow: none !important;
  color: #fff !important;
  cursor: pointer !important;
  font: 600 14px/1.25 "TopNotch Satoshi", "Avenir Next", system-ui, sans-serif !important;
  text-align: center !important;
  text-decoration: none !important;
}

.tn-consent-placeholder .tn-consent-button:hover {
  border-color: var(--tn-consent-purple-dark) !important;
  background: var(--tn-consent-purple-dark) !important;
  color: #fff !important;
}

.tn-consent-status {
  display: block;
  margin: 8px 0 0;
  color: var(--tn-consent-muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 560px) {
  #tn-consent-banner {
    inset: auto 10px calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 96px) !important;
    padding: 18px 16px 15px !important;
    border-radius: 18px !important;
  }

  #tn-consent-banner .tn-actions,
  #tn-consent-dialog .tn-actions {
    gap: 7px !important;
  }

  #tn-consent-banner .tn-actions > .tn-consent-button,
  #tn-consent-dialog .tn-actions > .tn-consent-button {
    min-height: 44px !important;
    padding: 9px 7px !important;
    font-size: 12px !important;
  }

  #tn-consent-dialog {
    width: calc(100vw - 24px);
    max-height: 88dvh;
    padding: 21px 17px;
  }

  #tn-consent-dialog .tn-category {
    padding: 13px !important;
  }

}

@media (min-width: 561px) and (max-width: 1150px) {
  #tn-consent-banner {
    inset: auto 20px calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(100dvh - 96px) !important;
  }
}

@media (max-width: 360px) {
  #tn-consent-banner .tn-actions,
  #tn-consent-dialog .tn-actions {
    flex-direction: column !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #tn-consent-banner *,
  #tn-consent-dialog *,
  .tn-consent-footer-link,
  .tn-whatsapp-float,
  .tn-consent-placeholder *,
  .tn-consent-status {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
