/* Release-note dialog shared by the home, TonyProxy and TJLog pages (release-notes.js). */
/* Tokens fall back from the TonyProxy palette to TJLog's, so it themes with either page. */
.tp-rn-dialog {
  --rn-surface: var(--tp-surface, var(--surface, #1c1c1e));
  --rn-text: var(--tp-text, var(--fg, #f5f5f7));
  --rn-muted: var(--tp-text-secondary, var(--muted, #8e8e93));
  --rn-line: var(--tp-border, var(--line, #2c2c2e));
  --rn-accent: var(--tp-blue, var(--accent, #0a84ff));
  --rn-font: var(--tp-font-text, var(--body, -apple-system, system-ui, sans-serif));
  --rn-mono: var(--tp-font-mono, var(--mono, ui-monospace, monospace));
  width: min(640px, calc(100vw - 32px));
  max-height: min(80vh, 760px);
  /* Page resets zero every margin, which pins a modal dialog to the top-left corner. */
  margin: auto;
  padding: 0;
  border: 1px solid var(--rn-line);
  border-radius: 18px;
  background: var(--rn-surface);
  color: var(--rn-text);
  font-family: var(--rn-font);
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / .6), 0 0 0 1px rgb(255 255 255 / .04);
  overflow: hidden;
}
.tp-rn-dialog[open] { display: flex; animation: tp-rn-in 220ms cubic-bezier(0.16, 1, 0.3, 1); }
.tp-rn-dialog::backdrop { background: rgb(0 0 0 / .55); backdrop-filter: blur(4px); }
.tp-rn-panel { display: flex; flex-direction: column; width: 100%; min-height: 0; }

.tp-rn-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 22px 24px 16px; border-bottom: 1px solid var(--rn-line);
}
.tp-rn-title { margin: 0; font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.01em; }
.tp-rn-meta { margin: 6px 0 0; color: var(--rn-muted); font: 500 .8rem/1.3 var(--rn-mono); }
.tp-rn-close {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--rn-line); background: transparent; color: var(--rn-muted);
  font-size: 1.2rem; line-height: 1; cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.tp-rn-close:hover { color: var(--rn-text); border-color: var(--rn-muted); }
.tp-rn-close:active { transform: scale(.94); }
.tp-rn-close:focus-visible { outline: 2px solid var(--rn-accent); outline-offset: 2px; }

.tp-rn-body { padding: 8px 24px 26px; overflow-y: auto; overscroll-behavior: contain; line-height: 1.6; }
/* The CI template opens with an <h2>What's New</h2> that repeats the dialog title. */
.tp-rn-body > h1:first-child, .tp-rn-body > h2:first-child { display: none; }
.tp-rn-body :is(h1, h2, h3, h4) { margin: 22px 0 6px; font-size: 1rem; line-height: 1.35; letter-spacing: 0; color: var(--rn-text); }
.tp-rn-body :is(h1, h2, h3, h4) + p { margin-top: 0; }
.tp-rn-body p, .tp-rn-body ul, .tp-rn-body ol, .tp-rn-body pre, .tp-rn-body blockquote { margin: 10px 0; color: var(--rn-muted); }
.tp-rn-body ul, .tp-rn-body ol { padding-left: 1.3em; }
.tp-rn-body li + li { margin-top: 4px; }
.tp-rn-body strong, .tp-rn-body b { color: var(--rn-text); }
.tp-rn-body a { color: var(--rn-accent); }
.tp-rn-body code { font: .85em var(--rn-mono); padding: 1px 5px; border-radius: 5px; background: rgb(127 127 127 / .14); }
.tp-rn-body pre { padding: 12px; border-radius: 10px; background: rgb(127 127 127 / .1); overflow-x: auto; }
.tp-rn-body pre code { padding: 0; background: none; }
.tp-rn-body blockquote { padding-left: 12px; border-left: 3px solid var(--rn-line); }

@keyframes tp-rn-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tp-rn-dialog[open] { animation: none; } }
@media (max-width: 480px) {
  .tp-rn-head { padding: 18px 16px 12px; }
  .tp-rn-body { padding: 4px 16px 20px; }
}
/* Trigger buttons carry display:inline-flex from their page's button class. */
.tp-rn-trigger[hidden] { display: none !important; }
