/* Veva Support theme: site chrome, global part. Only what scoped CSS cannot reach lives here: the result rows
   search-palette.js builds, built-in markup inside the footer, and the page scroll lock while the header's
   phone sheet is open. The header, footer and menus style themselves in their .razor.css files. */

/* Phone menu open: the page behind the sheet stops scrolling */
@media (max-width: 1023.98px) {
  body:has(.vs-header__toggle:checked) { overflow: hidden; }
}

/* Search palette: rows added by the script */
.vs-palette__set + .vs-palette__set { margin-top: var(--space-1); }
.vs-palette__item { cursor: pointer; }
.vs-palette__text { min-width: 0; }
.vs-palette__ic svg { display: block; width: 16px; height: 16px; }
.vs-palette__item b.vs-palette__code { font-family: var(--font-mono); font-size: 14px; font-variant-ligatures: none; }
.vs-palette__message { margin: 0 0 var(--space-3); }
.vs-palette__message b { color: var(--grey-black); font-weight: 600; }
.vs-palette__empty .vs-link--more svg { width: .85em; height: .85em; }

/* The palette leaves as it arrives. A dialog is gone the moment it closes, so <vs-search-palette> sets data-closing
   first and closes the dialog when the animation ends; the fill keeps it hidden until then. */
@media (prefers-reduced-motion: no-preference) {
  .vs-palette[open] { animation: vs-palette-in .16s ease-out; }
  .vs-palette[open]::backdrop { animation: vs-palette-fade .16s ease-out; }
  .vs-palette[data-closing] { animation: vs-palette-out .16s ease-in forwards; }
  .vs-palette[data-closing]::backdrop { animation: vs-palette-fade-out .16s ease-in forwards; }
}

@keyframes vs-palette-in { from { opacity: 0; transform: translateY(-6px) scale(.985); } }
@keyframes vs-palette-fade { from { opacity: 0; } }
@keyframes vs-palette-out { to { opacity: 0; transform: translateY(-6px) scale(.985); } }
@keyframes vs-palette-fade-out { to { opacity: 0; } }

/* Footer: the Cookie settings button (Cookie consent module) reads as one of the footer's links */
.vs .vs-footer .veva-cookie-settings-button { padding: 0; border: 0; background: none; color: var(--white); font: inherit; font-size: 15px; line-height: 24px; text-align: left; cursor: pointer; }
.vs .vs-footer .veva-cookie-settings-button:hover { text-decoration: underline; text-underline-offset: 3px; }
