/* YADIM Advanced Search and Search Results. Fonts, backgrounds, borders, corners and shadows of the parts come from the Design tab; this is the structure and the motion. */

/* ======== the search box ======== */
.as { --as-w: 640px; --as-h: 70vh; --as-top: 14vh; --as-overlay: rgba(8, 12, 24, .55); --as-blur: 6px; --as-bg: #fff; --as-text: #1d2327; --as-accent: #2a7de1; --as-gblur: 18px; position: relative; color: var(--as-text); }
.as-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.as-trigger { display: inline-flex; align-items: center; gap: .5em; padding: .55em 1em; border-radius: 999px; background: var(--as-bg); color: var(--as-text); border: 1px solid rgba(0, 0, 0, .15); text-decoration: none; cursor: pointer; font: inherit; }
.as-trigger:focus-visible, .as-close:focus-visible, .as-clear:focus-visible, .as-submit:focus-visible, .as-item:focus-visible, .as-chip input:focus-visible + span, .as-select:focus-visible { outline: 3px solid var(--as-accent); outline-offset: 2px; }
.as-icon { flex: 0 0 auto; opacity: .7; }
.as-window { box-sizing: border-box; background: var(--as-bg); color: var(--as-text); border-radius: 14px; }
.as-form { margin: 0; }
.as-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.as-input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; font-size: 1.1em; padding: 4px 0; appearance: none; -webkit-appearance: none; box-shadow: none; }
.as-input::-webkit-search-cancel-button { display: none; }
.as-close { z-index: 3; }
.as-clear, .as-close { flex: 0 0 auto; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .07); color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.as-submit { flex: 0 0 auto; padding: .5em 1.1em; border: 0; border-radius: 999px; background: var(--as-accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.as-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.as-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.as-chip { position: relative; cursor: pointer; } .as-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.as-chip span { display: inline-block; padding: .3em .85em; border-radius: 999px; background: rgba(0, 0, 0, .06); font-size: .9em; }
.as-chip input:checked + span { background: var(--as-accent); color: #fff; }
.as-select { padding: .35em .6em; border: 1px solid rgba(0, 0, 0, .15); border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: .9em; max-width: 14em; }
.as-results { overflow-y: auto; overscroll-behavior: contain; max-height: calc(var(--as-h) - 120px); padding: 6px; }
.as-results.is-loading { opacity: .55; transition: opacity .15s; }
.as-items { display: flex; flex-direction: column; gap: 2px; }
.as-item { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.as-item:hover, .as-item.is-selected { background: color-mix(in srgb, var(--as-accent) 12%, transparent); }
.as-item.is-selected { box-shadow: inset 3px 0 0 var(--as-accent); }
.as-thumb { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: rgba(0, 0, 0, .06); }
.as-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.as-title { font-weight: 600; overflow-wrap: anywhere; } .as-excerpt { font-size: .88em; opacity: .75; line-height: 1.4; overflow-wrap: anywhere; }
.as-meta { display: flex; gap: 8px; font-size: .75em; opacity: .6; text-transform: uppercase; letter-spacing: .04em; }
.as-item mark, .as-card mark { background: color-mix(in srgb, var(--as-accent) 25%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.as-all { justify-content: center; margin-top: 4px; color: var(--as-accent); border-top: 1px solid rgba(0, 0, 0, .06); border-radius: 0 0 10px 10px; }
.as-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 4px; font-size: .75em; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .65; }
.as-forget { border: 0; background: none; color: var(--as-accent); font: inherit; font-size: 1em; cursor: pointer; text-transform: none; letter-spacing: 0; }
.as-msg { margin: 0; padding: 22px 16px; text-align: center; opacity: .75; }
.as-error { color: #b32d2e; opacity: 1; }

/* inline and expandable: the results drop down under the box */
.as-mode-inline .as-window { position: relative; border: 1px solid rgba(0, 0, 0, .15); }
.as-mode-inline .as-bar, .as-mode-inline .as-filters { border-bottom: 0; }
.as-mode-inline .as-results, .as-mode-expandable .as-results { position: absolute; z-index: 2147482000; left: 0; right: 0; top: 100%; margin-top: 6px; background: var(--as-bg); border: 1px solid rgba(0, 0, 0, .12); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .18); max-height: var(--as-h); }
.as-mode-expandable .as-layer { position: fixed; z-index: 2147483000; top: 0; left: 0; width: min(var(--as-w, 420px), 92vw); } /* fixed, not absolute: a header that clips or is shorter than the box cannot cut it off; the script puts it under the button */
.as-mode-expandable .as-window { border: 1px solid rgba(0, 0, 0, .15); box-shadow: 0 10px 30px rgba(0, 0, 0, .15); position: relative; }
.as-mode-expandable .as-bar { border-bottom: 0; } .as-mode-expandable .as [hidden] { display: none !important; }
.as-mode-expandable .as-trigger[aria-expanded="true"] { visibility: hidden; }

/* dialogs: panel, overlay, palette */
.as [hidden] { display: none !important; }
.as-mode-panel .as-layer, .as-mode-overlay .as-layer, .as-mode-palette .as-layer { position: fixed; inset: 0; z-index: 2147483000; display: flex; max-width: 100vw; overflow: hidden; }
.as-backdrop { position: absolute; inset: 0; background: var(--as-overlay); -webkit-backdrop-filter: blur(var(--as-blur)); backdrop-filter: blur(var(--as-blur)); opacity: 0; transition: opacity .2s ease; }
.as-mode-panel .as-window, .as-mode-overlay .as-window, .as-mode-palette .as-window { position: relative; display: flex; flex-direction: column; box-shadow: 0 24px 80px rgba(0, 0, 0, .35); opacity: 0; transition: opacity .2s ease, transform .22s cubic-bezier(.16, 1, .3, 1); }
.as-mode-panel .as-results, .as-mode-overlay .as-results, .as-mode-palette .as-results { flex: 1 1 auto; max-height: none; }
.as.is-open .as-backdrop, .as.is-open .as-window { opacity: 1; transform: none; }
.as-mode-palette .as-layer { align-items: flex-start; justify-content: center; padding: var(--as-top) 12px 12px; }
.as-mode-palette .as-window { width: min(var(--as-w), 100%); max-height: var(--as-h); left: var(--as-x, 0); top: var(--as-y, 0); }
.as-mode-palette .as-close { display: none; }
.as-mode-palette.as-anim-scale .as-window { transform: scale(.96) translateY(-8px); } .as-mode-palette.as-anim-slide .as-window { transform: translateY(-24px); }
.as-mode-overlay .as-layer { align-items: flex-start; justify-content: center; }
.as-mode-overlay .as-window { width: 100%; height: 100%; border-radius: 0; max-height: none; padding: 6vh min(8vw, 80px) 0; } .as-mode-overlay .as-bar { padding: 18px 0; } .as-mode-overlay .as-input { font-size: 1.8em; }
.as-mode-overlay .as-close { position: absolute; top: 24px; right: clamp(32px, 4vw, 64px); width: 40px; height: 40px; z-index: 2; }
.as-mode-overlay.as-anim-scale .as-window { transform: scale(1.03); } .as-mode-overlay.as-anim-slide .as-window { transform: translateY(-3vh); }
.as-mode-overlay .as-results { max-width: var(--as-w); margin: 0 auto; width: 100%; box-sizing: border-box; }
.as-mode-panel .as-layer { justify-content: flex-end; }
.as-mode-panel.as-side-left .as-layer { justify-content: flex-start; }
.as-mode-panel .as-window { width: min(var(--as-w), 100%); height: 100%; border-radius: 0; max-height: none; transform: translateX(32px); }
.as-mode-panel.as-side-left .as-window { transform: translateX(-32px); }
.as-mode-panel .as-close { position: absolute; top: 10px; right: 10px; z-index: 2; } .as-mode-panel .as-bar { padding-right: 52px; }
.as-mode-panel.as-anim-fade .as-window, .as-mode-panel.as-anim-scale .as-window { transform: none; }
html[data-yas-lock] { overflow: hidden; padding-right: var(--yas-gap, 0); }
@media (max-width: 767px) {
  .as-mode-palette .as-layer { padding: 8px; } .as-mode-palette .as-window { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  .as-mode-palette .as-close { display: block; position: absolute; top: 8px; right: 8px; } .as-mode-palette .as-bar { padding-right: 48px; }
  .as-mode-overlay .as-close { top: 16px; right: 24px; }
  .as-thumb { flex-basis: 42px; width: 42px; height: 42px; } .as-mode-overlay .as-input { font-size: 1.3em; }
}
/* glass */
.as-glass .as-window { background: color-mix(in srgb, var(--as-bg) 55%, transparent); -webkit-backdrop-filter: blur(var(--as-gblur)) saturate(1.4); backdrop-filter: blur(var(--as-gblur)) saturate(1.4); border: 1px solid rgba(255, 255, 255, .35); }
/* the Visual Builder shows the window or the opening button, one at a time */
.as-preview.as-view-window:not(.as-mode-inline) .as-trigger, .as-preview.as-view-button .as-layer { display: none !important; }
/* the Visual Builder shows the window in place, not over the page */
.as-preview .as-layer { position: relative !important; inset: auto !important; display: block !important; padding: 0 !important; }
.as-preview .as-backdrop { display: none; } .as-preview .as-window { position: relative !important; width: min(var(--as-w), 100%) !important; height: auto !important; max-height: none !important; opacity: 1 !important; transform: none !important; margin: 0 auto; }
.as-preview .as-results { max-height: none; position: static !important; margin: 0; box-shadow: none; border: 0; }
@media (prefers-reduced-motion: reduce) { .as-backdrop, .as-window, .as-results.is-loading { transition: none !important; transform: none !important; } }

/* ======== the search results ======== */
.sr { --sr-cols: 3; --sr-gap: 24px; --sr-ratio: 16 / 10; --sr-accent: #2a7de1; width: 100%; }
.sr-sr, .sr-card .sr-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.sr-heading { margin: 0 0 6px; } .sr-count { margin: 0 0 18px; opacity: .7; }
.sr-list { display: grid; grid-template-columns: repeat(var(--sr-cols), minmax(0, 1fr)); gap: var(--sr-gap); margin: 0; padding: 0; list-style: none; }
.sr-layout-list .sr-list { grid-template-columns: 1fr; }
.sr-card { box-sizing: border-box; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 12px; background: #fff; border: 1px solid #e5e7eb; }
.sr-layout-grid:not(.sr-equal) .sr-list { align-items: start; }
.sr-layout-list.sr-img-left .sr-card { flex-direction: row; } .sr-layout-list.sr-img-left .sr-media { flex: 0 0 34%; }
.sr-media { display: block; flex: 0 0 auto; aspect-ratio: var(--sr-ratio); overflow: hidden; background: #e5e7eb; line-height: 0; }
.sr-img { width: 100%; height: 100%; object-fit: cover; }
.sr-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; min-width: 0; }
.sr-type { align-self: flex-start; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--sr-accent) 12%, transparent); color: var(--sr-accent); font-size: .72em; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.sr-title { margin: 0; font-size: 1.15em; line-height: 1.3; } .sr-title a { color: inherit; text-decoration: none; } .sr-title a:hover { color: var(--sr-accent); }
.sr-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; font-size: .82em; opacity: .65; }
.sr-excerpt { margin: 0; line-height: 1.55; opacity: .85; }
.sr-terms { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; } .sr-term { font-size: .78em; padding: 1px 8px; border-radius: 6px; background: rgba(0, 0, 0, .06); } .sr-term a { color: inherit; text-decoration: none; }
.sr-fields { margin: 0; display: grid; gap: 2px; font-size: .88em; } .sr-field { display: flex; gap: .5em; } .sr-field dt { font-weight: 600; } .sr-field dd { margin: 0; }
.sr-more { margin-top: auto; padding-top: 6px; color: var(--sr-accent); font-weight: 600; text-decoration: none; } .sr-more:hover { text-decoration: underline; }
.sr-card mark { background: color-mix(in srgb, var(--sr-accent) 25%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.sr-msg { padding: 28px 16px; text-align: center; border: 1px dashed #c3c4c7; border-radius: 10px; opacity: .85; } .sr-msg p { margin: 0 0 6px; } .sr-empty-title { font-weight: 600; }
.sr-note { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: rgba(179, 45, 46, .1); color: #b32d2e; }
.sr-body.is-loading { opacity: .55; transition: opacity .15s; }
.sr-btn { display: inline-block; padding: .55em 1.2em; border: 1px solid #d0d7de; border-radius: 999px; background: #fff; color: inherit; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.sr-btn:hover { border-color: var(--sr-accent); } .sr-load.is-loading { opacity: .6; }
.sr-btn:focus-visible, .sr-page:focus-visible, .sr-more:focus-visible, .sr-opt input:focus-visible, .sr-title a:focus-visible, .sr-reset:focus-visible { outline: 3px solid var(--sr-accent); outline-offset: 2px; }
.sr-pager { margin: 26px 0 0; text-align: center; } .sr-pager ul { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sr-page { display: inline-block; min-width: 2.4em; padding: .45em .8em; border-radius: 8px; border: 1px solid #d0d7de; color: inherit; text-decoration: none; text-align: center; }
.sr-page[aria-current="page"] { background: var(--sr-accent); border-color: var(--sr-accent); color: #fff; } .sr-gap { padding: .45em .3em; opacity: .5; }
.sr-infinite .sr-pager-more { opacity: 0; height: 1px; overflow: hidden; margin: 0; }
/* filters */
.sr-filters { margin: 0 0 22px; }
.sr-filters-form { display: flex; flex-wrap: wrap; gap: 14px 28px; padding: 16px 18px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.sr-group { margin: 0; padding: 0; border: 0; min-width: 0; } .sr-group legend { padding: 0; margin-bottom: 6px; font-weight: 700; font-size: .85em; text-transform: uppercase; letter-spacing: .05em; opacity: .7; }
.sr-opt { display: flex; align-items: center; gap: 8px; padding: 2px 0; cursor: pointer; }
.sr-select { display: flex; flex-direction: column; gap: 4px; } .sr-select span { font-weight: 700; font-size: .85em; text-transform: uppercase; letter-spacing: .05em; opacity: .7; } .sr-select select { padding: .4em .6em; border-radius: 8px; border: 1px solid #d0d7de; font: inherit; background: #fff; color: inherit; }
.sr-actions { display: flex; align-items: center; gap: 14px; align-self: flex-end; margin-left: auto; } .sr-reset { color: var(--sr-accent); }
.sr-filters-form.is-live .sr-apply { display: none; }
.sr-collapsible > summary { list-style: none; cursor: pointer; display: inline-block; margin-bottom: 10px; } .sr-collapsible > summary::-webkit-details-marker { display: none; }
.sr-beside .sr-filters-form, .sr-drawer .sr-filters-form { flex-direction: column; flex-wrap: nowrap; }
.sr-split { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; } .sr-split > .sr-filters { margin: 0; position: sticky; top: 20px; }
.sr-open-filters, .sr-close-filters { display: none; }
@media (max-width: 980px) { .sr-list { grid-template-columns: repeat(var(--sr-cols-t, min(var(--sr-cols), 2)), minmax(0, 1fr)); } .sr-layout-list .sr-list { grid-template-columns: 1fr; } }
@media (max-width: 767px) {
  .sr-list { grid-template-columns: repeat(var(--sr-cols-m, 1), minmax(0, 1fr)); } .sr-layout-list .sr-list { grid-template-columns: 1fr; } .sr-layout-list.sr-img-left .sr-card { flex-direction: column; } .sr-layout-list.sr-img-left .sr-media { flex-basis: auto; }
  .sr-split { grid-template-columns: 1fr; } .sr-split > .sr-filters { position: static; }
  .sr-drawer .sr-open-filters { display: inline-block; margin-bottom: 14px; }
  .sr-drawer .sr-panel { position: fixed; inset: 0 auto 0 0; z-index: 999980; width: min(88vw, 340px); overflow-y: auto; padding: 16px; background: #fff; box-shadow: 8px 0 40px rgba(0, 0, 0, .3); transform: translateX(-105%); visibility: hidden; transition: transform .25s ease, visibility 0s .25s; }
  .sr-drawer .sr-panel.is-open { transform: none; visibility: visible; transition: transform .25s ease; }
  .sr-drawer .sr-filters-form { border: 0; padding: 40px 0 0; } .sr-drawer .sr-close-filters { display: block; position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .07); font-size: 22px; cursor: pointer; }
}
@media (prefers-reduced-motion: reduce) { .sr-drawer .sr-panel, .sr-body.is-loading { transition: none !important; } }
