/* All styles are scoped to the plugin to avoid changing the active theme. */
.tdp-panel {
  box-sizing: border-box;
  width: min(var(--tdp-width, 680px), calc(100vw - 32px));
  padding: var(--tdp-padding-top, 18px) var(--tdp-padding-right, 42px) var(--tdp-padding-bottom, 20px) var(--tdp-padding-left, 42px);
  background: var(--tdp-background, #fff);
  color: var(--tdp-color, #000);
  border: 1px solid #eee;
  border-radius: 3px;
  box-shadow: var(--tdp-shadow, 0 12px 48px rgba(0, 0, 0, .18));
  font: normal 400 var(--tdp-size, 16px)/1.7 var(--tdp-font, "Times New Roman", Times, serif);
  text-align: var(--tdp-align, center);
  color-scheme: light;
  isolation: isolate;
}
#tdp-popup { position: fixed; z-index: 999990; top: 50%; left: 50%; transform: translate(-50%, -50%); }
#tdp-popup[hidden] { display: none !important; }
#tdp-popup:not([hidden]) { animation: tdp-appear .2s ease-out; }
.tdp-panel .tdp-scroll { max-height: min(640px, calc(100vh - 140px)); max-height: min(640px, calc(100dvh - 140px)); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.tdp-panel .tdp-content { color: inherit; font: inherit; text-align: inherit; overflow-wrap: anywhere; }
.tdp-panel .tdp-content :where(p, div, span, a, strong, b, em, i, u, s, ul, ol, li, blockquote) { font-family: inherit; font-size: inherit; line-height: inherit; color: inherit; letter-spacing: normal; text-transform: none; text-align: inherit; }
.tdp-panel .tdp-content :where(h1, h2, h3, h4, h5, h6) { font-family: inherit; color: inherit; font-weight: 700; line-height: 1.2; letter-spacing: normal; text-transform: none; text-align: inherit; padding: 0; border: 0; margin: 0 0 10px; }
.tdp-panel .tdp-content h1 { font-size: 2.5em; }
.tdp-panel .tdp-content h2 { font-size: 2.25em; }
.tdp-panel .tdp-content h3 { font-size: 1.75em; }
.tdp-panel .tdp-content h4 { font-size: 1.5em; }
.tdp-panel .tdp-content h5 { font-size: 1.25em; }
.tdp-panel .tdp-content h6 { font-size: 1em; }
.tdp-panel .tdp-content p { margin: 0 0 18px; padding: 0; }
.tdp-panel .tdp-content > :last-child { margin-bottom: 0; }
.tdp-panel .tdp-content :where(strong, b) { font-weight: 700; }
.tdp-panel .tdp-content :where(em, i) { font-style: italic; }
.tdp-panel .tdp-content a { text-decoration: underline; text-underline-offset: 3px; }
.tdp-panel .tdp-content :where(ul, ol) { padding-inline-start: 1.5em; margin: 0 0 18px; text-align: inherit; }
.tdp-panel .tdp-content blockquote { margin: 0 0 18px; padding: 0 1em; border: 0; }
.tdp-panel .tdp-close {
  position: absolute; top: 2px; right: 2px; display: grid; place-items: center;
  box-sizing: border-box; width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  margin: 0; padding: 0; border: 0; border-radius: 3px; background: var(--tdp-close-background, transparent);
  box-shadow: none; color: var(--tdp-close-color, #111); font: 400 28px/1 Arial, sans-serif; text-decoration: none;
  text-transform: none; letter-spacing: 0; cursor: pointer;
}
.tdp-panel button.tdp-close:hover { background: var(--tdp-close-background, transparent); color: var(--tdp-close-color, #111); box-shadow: inset 0 0 0 2px currentColor; }
.tdp-panel :focus-visible { outline: 2px solid #1e64a5; outline-offset: 2px; }
.tdp-screen-reader { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes tdp-appear { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 600px) {
  #tdp-popup { top: auto; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; padding: var(--tdp-padding-top, 44px) var(--tdp-padding-right, 20px) var(--tdp-padding-bottom, 20px) var(--tdp-padding-left, 20px); width: var(--tdp-mobile-width, 90vw); height: var(--tdp-mobile-height, 65vh); height: var(--tdp-mobile-height-dynamic, 65dvh); max-height: calc(100vh - max(12px, env(safe-area-inset-bottom)) - 12px); max-height: calc(100dvh - max(12px, env(safe-area-inset-bottom)) - 12px); }
  #tdp-popup .tdp-scroll { flex: 1 1 auto; min-height: 0; max-height: none; overflow-x: hidden; overflow-y: auto; }
  #tdp-popup[data-mobile-height-mode="auto"] { height: auto; }
  #tdp-popup[data-mobile-height-mode="auto"] .tdp-scroll { flex: 0 1 auto; }
  #tdp-popup[data-mobile-position="center"] { top: 50vh; top: 50dvh; bottom: auto; transform: translate(-50%, -50%); }
  #tdp-popup[data-mobile-content-position="center"] { padding-bottom: var(--tdp-padding-bottom, 44px); }
  #tdp-popup[data-mobile-content-position="center"] .tdp-scroll { display: flex; flex-direction: column; }
  #tdp-popup[data-mobile-content-position="center"] .tdp-content { flex: 0 0 auto; margin-block: auto; width: 100%; }
  #tdp-popup .tdp-content h2 { font-size: 1.65em; }
}
@media (max-height: 450px) and (min-width: 601px) {
  #tdp-popup { top: auto; bottom: 12px; transform: translateX(-50%); }
  #tdp-popup .tdp-scroll { max-height: 40vh; }
}
@media (prefers-reduced-motion: reduce) { #tdp-popup:not([hidden]) { animation: none; } }

.tdp-content > .tdp-mobile-version { display: none; }
.tdp-content > .tdp-desktop-version > :last-child,
.tdp-content > .tdp-mobile-version > :last-child { margin-bottom: 0; }
@media (max-width: 600px) {
  #tdp-popup .tdp-content > .tdp-desktop-version { display: none; }
  #tdp-popup .tdp-content > .tdp-mobile-version { display: block; }
}

/* Structured sections own their spacing, including legacy inline text styling. */
.tdp-panel .tdp-content [data-tdp-block] { margin: 0; line-height: 1.7; }
.tdp-panel .tdp-content [data-tdp-block] > :is(h2,h3,h4,p) { margin: 0; padding: 0; font-family: inherit; font-size: inherit; font-weight: inherit; color: inherit; text-align: inherit; line-height: inherit; }
.tdp-panel .tdp-content [data-tdp-block="heading"] { line-height: 1.2; }
.tdp-panel .tdp-content [data-tdp-block="locations"] > p:last-child { margin-bottom: 0 !important; }

/* Section size must take precedence over legacy responsive heading rules. */
.tdp-panel .tdp-content [data-tdp-block] > :is(h2,h3,h4) { font-size: inherit !important; }
