.tpm-ps-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.tpm-ps-reopen {
  display: block;
  margin-top: 0.35rem;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.tpm-ps-banner {
  position: fixed;
  z-index: 999990;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  max-width: 1160px;
  margin: 0 auto;
  padding: 1.2rem 3rem 1.2rem 1.3rem;
  border: 1px solid rgba(47, 32, 28, 0.2);
  border-radius: 18px;
  background: #fffaf4;
  color: #2f201c;
  box-shadow: 0 18px 50px rgba(47, 32, 28, 0.22);
}

.tpm-ps-banner[hidden],
.tpm-ps-modal[hidden] {
  display: none !important;
}

.tpm-ps-banner h2,
.tpm-ps-panel h2 {
  margin: 0 0 0.45rem;
  color: #2f201c;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.15;
}

.tpm-ps-banner p,
.tpm-ps-category p {
  margin: 0;
  line-height: 1.55;
}

.tpm-ps-banner a,
.tpm-ps-panel a {
  color: #9d174d;
  font-weight: 700;
}

.tpm-ps-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.tpm-ps-button {
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 2px solid #5c3a31;
  border-radius: 999px;
  background: transparent;
  color: #2f201c;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
}

.tpm-ps-button--choice {
  min-width: 12rem;
  background: #5c3a31;
  color: #fff;
}

.tpm-ps-button:hover,
.tpm-ps-button:focus-visible,
.tpm-ps-reopen:focus-visible,
.tpm-ps-close:focus-visible {
  outline: 3px solid #d6a32c;
  outline-offset: 3px;
}

.tpm-ps-close {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #2f201c;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.tpm-ps-modal {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.tpm-ps-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 17, 14, 0.68);
}

.tpm-ps-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 680px);
  max-height: min(88vh, 720px);
  overflow: auto;
  padding: 1.6rem;
  border-radius: 20px;
  background: #fffaf4;
  color: #2f201c;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.tpm-ps-category {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(47, 32, 28, 0.18);
  border-radius: 14px;
  background: #fff;
}

.tpm-ps-category strong,
.tpm-ps-category--toggle span span {
  display: block;
}

.tpm-ps-category--toggle {
  cursor: pointer;
}

.tpm-ps-category--toggle input {
  flex: 0 0 auto;
  width: 2.8rem;
  height: 1.5rem;
  accent-color: #9d174d;
}

.tpm-ps-always-on {
  flex: 0 0 auto;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #efe1cf;
  font-size: 0.82rem;
  font-weight: 800;
}

.tpm-ps-panel__footer {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

html.tpm-ps-modal-open {
  overflow: hidden;
}

.tpm-ps-managed-embed {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 16px;
}

@media (max-width: 860px) {
  .tpm-ps-banner {
    grid-template-columns: 1fr;
  }

  .tpm-ps-actions,
  .tpm-ps-button,
  .tpm-ps-button--choice {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .tpm-ps-banner {
    right: 0.6rem;
    bottom: 0.6rem;
    left: 0.6rem;
    padding: 1.1rem 2.7rem 1.1rem 1rem;
    border-radius: 14px;
  }

  .tpm-ps-panel {
    padding: 1.2rem;
    border-radius: 16px;
  }

  .tpm-ps-category {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tpm-ps-banner,
  .tpm-ps-modal {
    scroll-behavior: auto;
  }
}
