.tm-privacy-notice {
  position: fixed;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: 100;
  display: none;
  width: min(1040px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px;
  color: #283443;
  background: #fffaf3;
  border: 1px solid rgba(201, 169, 106, .62);
  border-radius: 6px;
  box-shadow: 0 18px 50px rgba(9, 24, 42, .24);
}

.tm-privacy-notice.is-visible {
  display: grid;
  gap: 13px;
}

.tm-privacy-copy {
  margin: 0;
  font: 500 .82rem/1.5 "Inter", system-ui, -apple-system, sans-serif;
}

.tm-privacy-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 8px;
  align-items: center;
}

.tm-privacy-button,
.tm-privacy-link,
.tm-privacy-settings {
  min-height: 42px;
  font: 700 .76rem/1 "Inter", system-ui, -apple-system, sans-serif;
}

.tm-privacy-button {
  border: 1px solid #0b1d31;
  border-radius: 4px;
  padding: 0 14px;
  cursor: pointer;
  white-space: normal;
  line-height: 1.2;
}

.tm-privacy-button-primary {
  color: #fff;
  background: #0b1d31;
}

.tm-privacy-button-secondary {
  color: #0b1d31;
  background: #fffaf3;
}

.tm-privacy-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  color: #0b1d31;
  text-underline-offset: 3px;
}

.tm-privacy-settings {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tm-cta-privacy-note {
  max-width: 580px;
  margin: 10px auto 0;
  color: inherit;
  font: 500 .72rem/1.45 "Inter", system-ui, -apple-system, sans-serif;
  opacity: .78;
}

.tm-cta-privacy-note a {
  color: inherit;
  font-weight: 700;
  text-underline-offset: 3px;
}

.tm-privacy-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  width: 100%;
  padding: 13px 18px calc(13px + env(safe-area-inset-bottom));
  color: rgba(255, 255, 255, .72);
  background: #09182a;
  border-top: 1px solid rgba(201, 169, 106, .24);
  font: 600 .68rem/1.4 "Inter", system-ui, -apple-system, sans-serif;
  text-align: center;
}

.tm-privacy-footer-links a,
.tm-privacy-footer-links button {
  min-height: 32px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(201, 169, 106, .62);
  text-underline-offset: 4px;
}

.tm-privacy-footer-links a:hover,
.tm-privacy-footer-links button:hover,
.tm-privacy-footer-links a:focus-visible,
.tm-privacy-footer-links button:focus-visible {
  color: #ffffff;
  text-decoration-color: #c9a96a;
}

body.tm-privacy-notice-open .wa-float,
body.tm-privacy-notice-open .wa-fab,
body.tm-privacy-notice-open .fab {
  bottom: calc(13px + env(safe-area-inset-bottom) + var(--tm-privacy-offset, 0px));
}

body.tm-privacy-preferences-open,
body.tm-privacy-whatsapp-open {
  overflow: hidden;
}

.tm-privacy-preferences {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(9, 24, 42, .64);
}

.tm-privacy-preferences.is-visible {
  display: grid;
}

.tm-privacy-whatsapp {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: none;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(9, 24, 42, .7);
}

.tm-privacy-whatsapp.is-visible {
  display: grid;
}

.tm-privacy-whatsapp-card {
  width: min(520px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 22px;
  color: #283443;
  background: #fffaf3;
  border: 1px solid rgba(201, 169, 106, .72);
  border-radius: 6px;
  box-shadow: 0 24px 70px rgba(9, 24, 42, .38);
}

.tm-privacy-whatsapp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.tm-privacy-whatsapp h2 {
  margin: 0;
  color: #0b1d31;
  font: 600 clamp(1.45rem, 5vw, 2rem)/1.08 "Fraunces", Georgia, serif;
}

.tm-privacy-whatsapp h2:focus {
  outline: none;
}

.tm-privacy-whatsapp-copy {
  margin: 16px 0 20px;
  font: 500 .84rem/1.58 "Inter", system-ui, -apple-system, sans-serif;
}

.tm-privacy-whatsapp-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(201, 169, 106, .34);
}

.tm-privacy-whatsapp-actions .tm-privacy-link {
  grid-column: 1 / -1;
}

.tm-privacy-preferences-card {
  width: min(560px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 22px;
  color: #283443;
  background: #fffaf3;
  border: 1px solid rgba(201, 169, 106, .72);
  border-radius: 6px;
  box-shadow: 0 24px 70px rgba(9, 24, 42, .34);
}

.tm-privacy-preferences-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.tm-privacy-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: #9a702d;
  font: 700 .61rem/1 "JetBrains Mono", monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.tm-privacy-preferences h2 {
  margin: 0;
  color: #0b1d31;
  font: 600 clamp(1.45rem, 5vw, 2rem)/1.08 "Fraunces", Georgia, serif;
}

.tm-privacy-preferences h2:focus {
  outline: none;
}

.tm-privacy-close {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  color: #0b1d31;
  background: transparent;
  border: 1px solid rgba(11, 29, 49, .28);
  border-radius: 50%;
  cursor: pointer;
  font: 400 1.45rem/1 Arial, sans-serif;
}

.tm-privacy-intro {
  margin: 14px 0 20px;
  font: 500 .84rem/1.55 "Inter", system-ui, -apple-system, sans-serif;
}

.tm-privacy-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 0;
  color: inherit;
  border-top: 1px solid rgba(201, 169, 106, .34);
}

.tm-privacy-category strong {
  color: #0b1d31;
  font: 700 .88rem/1.3 "Inter", system-ui, -apple-system, sans-serif;
}

.tm-privacy-category p {
  margin: 5px 0 0;
  font: 500 .76rem/1.5 "Inter", system-ui, -apple-system, sans-serif;
}

.tm-privacy-always-on {
  flex: 0 0 auto;
  color: #785821;
  font: 700 .65rem/1.2 "Inter", system-ui, -apple-system, sans-serif;
}

.tm-privacy-switch {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  height: 27px;
}

.tm-privacy-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.tm-privacy-switch span {
  position: absolute;
  inset: 0;
  background: #c9c5bd;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease;
}

.tm-privacy-switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 19px;
  height: 19px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 7px rgba(9, 24, 42, .24);
  transition: transform .2s ease;
}

.tm-privacy-switch input:checked + span {
  background: #0b1d31;
}

.tm-privacy-switch input:checked + span::after {
  transform: translateX(21px);
}

.tm-privacy-switch input:focus-visible + span {
  outline: 3px solid rgba(201, 169, 106, .58);
  outline-offset: 3px;
}

.tm-privacy-preferences-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(201, 169, 106, .34);
}

.tm-privacy-preferences-actions .tm-privacy-link {
  grid-column: 1 / -1;
}

@media (min-width: 760px) {
  .tm-privacy-notice.is-visible {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 15px 18px;
  }

  .tm-privacy-copy {
    max-width: 650px;
  }

  .tm-privacy-actions {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    min-width: 356px;
  }
}

@media (max-width: 420px) {
  .tm-privacy-notice {
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 8px;
    width: calc(100% - 16px);
    padding: 13px;
  }

  .tm-privacy-actions {
    grid-template-columns: 1fr 1fr;
  }

  .tm-privacy-preferences {
    align-items: end;
    padding: 8px;
  }

  .tm-privacy-whatsapp {
    align-items: end;
    padding: 8px;
  }

  .tm-privacy-preferences-card {
    max-height: calc(100dvh - 16px);
    padding: 18px 16px;
  }

  .tm-privacy-whatsapp-card {
    max-height: calc(100dvh - 16px);
    padding: 18px 16px;
  }

  .tm-privacy-preferences-actions {
    grid-template-columns: 1fr;
  }

  .tm-privacy-whatsapp-actions {
    grid-template-columns: 1fr;
  }

  .tm-privacy-preferences-actions .tm-privacy-link {
    grid-column: auto;
    min-height: 32px;
  }

  .tm-privacy-whatsapp-actions .tm-privacy-link {
    grid-column: auto;
    min-height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tm-privacy-notice,
  .tm-privacy-switch span,
  .tm-privacy-switch span::after,
  body.tm-privacy-notice-open .wa-float,
  body.tm-privacy-notice-open .wa-fab,
  body.tm-privacy-notice-open .fab {
    transition: none !important;
  }
}
