/*
 * Site search results (blocks/site-search/). Handle "tfp-site-search", after tfp-photo-gallery for the page
 * head, results bar, band and the --pg-* tokens. Written phone first: one column, 44px targets, tabs that
 * scroll sideways; the wider layouts are added at 768px and 1024px.
 * Theme rules: 1px borders, radius 4px, no shadows or gradients; yellow is a surface (the highlight, the one
 * primary action), never text on a light background.
 */

/* ---- Head: the query stays in the field --------------------------------- */

.ss-head__title { max-width: 26ch; overflow-wrap: anywhere; }
.ss-form { margin: 1.5rem 0 0; max-width: 720px; }
.ss-form__label { display: block; margin: 0 0 8px; font-size: 14px; line-height: 20px; color: rgba(255, 255, 255, .86); }
.ss-form__row { display: flex; gap: 8px; }
.ss-form__field { position: relative; display: flex; flex: 1 1 auto; align-items: center; min-width: 0; }
.ss-form__field .pg-ico { position: absolute; left: 14px; width: 20px; height: 20px; color: var(--pg-muted); pointer-events: none; }
.ss .ss-form__input {
	width: 100%; height: 52px; margin: 0; padding: 0 12px 0 44px;
	border: 1px solid #fff; border-radius: var(--pg-radius); background: #fff; box-shadow: none;
	font-size: 17px; line-height: 24px; color: var(--pg-ink);
}
.ss .ss-form__input:focus { box-shadow: none; outline: 2px solid var(--pg-yellow); outline-offset: 2px; }
.ss-form__go {
	flex: 0 0 auto; min-width: 52px; height: 52px; margin: 0; padding: 0 20px;
	border: 1px solid var(--pg-yellow); border-radius: var(--pg-radius); background: var(--pg-yellow); color: var(--pg-ink);
	font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; transition: var(--pg-fade);
}
.ss-form__go:hover { background: #E0AC00; border-color: #E0AC00; }
html[data-theme="light"] .ss-form__label { color: var(--pg-muted); }
html[data-theme="light"] .ss .ss-form__input { border-color: var(--pg-n200); }
html[data-theme="light"] .ss .ss-form__input:focus { outline-color: var(--pg-blue); }

/* ---- Tabs: one per result type, with its count --------------------------- */

.ss-tabs .pg-wrap { padding-left: 0; padding-right: 0; }
.ss .ss-tabs__list {
	display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
	padding: 0 clamp(1rem, 3.5vw, 4rem);
}
.ss-tabs__list::-webkit-scrollbar { display: none; }
.ss-tabs__list li { flex: 0 0 auto; }
.ss-tab {
	display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 12px;
	border-bottom: 3px solid transparent; color: var(--pg-text) !important; font-size: 15px; line-height: 20px; font-weight: 600;
	text-decoration: none !important; white-space: nowrap; transition: var(--pg-fade);
}
.ss-tab:hover { color: var(--pg-ink) !important; border-bottom-color: var(--pg-n200); }
.ss-tab.is-current { color: var(--pg-ink) !important; font-weight: 700; border-bottom-color: var(--pg-yellow); }
.ss-tab__n { font-size: 12px; line-height: 18px; padding: 0 6px; border-radius: var(--pg-radius); background: var(--pg-n100); color: var(--pg-text); }
.ss-tab.is-current .ss-tab__n { background: var(--pg-ink); color: #fff; }
.ss-tab:focus-visible { outline-offset: -2px; }

/* ---- Results ------------------------------------------------------------ */

.ss-results { scroll-margin-top: 140px; }
.ss-wrap > * { max-width: 960px; }   /* a readable column, on the same left edge as the head and the tabs */
.ss-note { margin: 0 0 24px; padding: 12px 16px; border-left: 3px solid var(--pg-yellow); background: var(--pg-n50); font-size: 15px; line-height: 22px; }

.ss-group + .ss-group { margin-top: 40px; }
.ss-group__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding-bottom: 12px; border-bottom: 1px solid var(--pg-ink); }
.ss-group__title { display: flex; align-items: baseline; gap: 10px; margin: 0; color: var(--pg-ink); font-size: 22px; line-height: 28px; }
.ss-group__n { font-size: 13px; line-height: 20px; font-weight: 400; color: var(--pg-muted); }
.ss-group__all { font-size: 14px; font-weight: 700; white-space: nowrap; }
.ss-rbar { justify-content: space-between; margin-bottom: 0; padding-bottom: 8px; border-bottom: 1px solid var(--pg-ink); }
.ss-rbar .pg-rbar__count { white-space: normal; }

.ss .ss-list { list-style: none; margin: 0; padding: 0; }
.ss-item { border-bottom: 1px solid var(--pg-n200); }
.ss-item__link { display: flex; align-items: flex-start; gap: 16px; padding: 18px 0; color: inherit !important; text-decoration: none !important; }
.ss-item__body { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-width: 0; }
.ss-item__kind { font-size: 12px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--pg-blue); }
.ss .ss-item__title { margin: 0; color: var(--pg-ink); font-size: 19px; line-height: 26px; font-weight: 700; text-wrap: pretty; }
.ss-item__link:hover .ss-item__title, .ss-item__link:focus-visible .ss-item__title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ss-item__snip { font-size: 15px; line-height: 24px; color: var(--pg-text); overflow-wrap: anywhere; }
.ss-item__meta { font-size: 12px; line-height: 18px; color: var(--pg-muted); overflow-wrap: anywhere; }
.ss-item__thumb { flex: 0 0 88px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--pg-radius); background: var(--pg-n100); }
.ss-item__thumb img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }

/* The search words. Yellow as a surface under ink text (10.4:1), never yellow text. */
.ss-mark { padding: 0 2px; border-radius: 2px; background: var(--pg-yellow); color: var(--pg-ink); font-weight: inherit; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.ss-item__snip .ss-mark { font-weight: 700; }

.ss .ss-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; padding-top: 18px; }
.ss-photo__link { display: flex; flex-direction: column; gap: 8px; color: inherit !important; text-decoration: none !important; }
.ss-photo__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--pg-radius); background: var(--pg-n100); }
.ss-photo__media img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.ss-photo__title { font-size: 14px; line-height: 20px; color: var(--pg-ink); }
.ss-photo__link:hover .ss-photo__title { text-decoration: underline; }

.ss .pg-more { margin-top: 24px; }
.ss-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; }
.ss-pager__btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px;
	border: 1px solid var(--pg-ink); border-radius: var(--pg-radius); background: #fff; color: var(--pg-ink) !important;
	font-size: 15px; font-weight: 700; text-decoration: none !important; white-space: nowrap; transition: var(--pg-fade);
}
a.ss-pager__btn:hover { background: var(--pg-n50); }
.ss-pager__btn.is-off { border-color: var(--pg-n200); color: #9AA3AD !important; }
.ss-pager__at { font-size: 12px; line-height: 18px; letter-spacing: .08em; text-transform: uppercase; color: var(--pg-muted); text-align: center; }

/* ---- No results / nothing typed ------------------------------------------ */

.ss-none { max-width: 720px; }
.ss-none__title { margin: 0 0 16px; color: var(--pg-ink); font-size: 24px; line-height: 30px; }
.ss-none__sub { margin: 32px 0 12px; color: var(--pg-ink); font-size: 17px; line-height: 24px; }
.ss .ss-tips { margin: 0; }
.ss .ss-tips li { position: relative; margin: 0 0 8px; padding-left: 20px; font-size: 16px; line-height: 26px; }
.ss .ss-tips li::before { content: ""; position: absolute; left: 0; top: 11px; width: 8px; height: 3px; background: var(--pg-yellow); }
.ss .ss-places { display: flex; flex-wrap: wrap; gap: 8px; }
.ss-place {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
	border: 1px solid var(--pg-ink); border-radius: var(--pg-radius); background: #fff; color: var(--pg-ink) !important;
	font-size: 15px; font-weight: 700; text-decoration: none !important; transition: var(--pg-fade);
}
.ss-place:hover { background: var(--pg-n50); }
.ss-none__ask { margin: 32px 0 0; font-size: 16px; line-height: 26px; }
.ss-none__ask a { font-weight: 700; }

/* ---- 768px and up -------------------------------------------------------- */

@media (min-width: 768px) {
	.ss-form__go { padding: 0 28px; }
	.ss-tab { padding: 0 14px; }
	.ss-group + .ss-group { margin-top: 56px; }
	.ss-group__title { font-size: 26px; line-height: 32px; }
	.ss-item__link { gap: 32px; padding: 22px 0; }
	.ss .ss-item__title { font-size: 21px; line-height: 28px; }
	.ss-item__snip { font-size: 16px; line-height: 26px; max-width: 72ch; }
	.ss-item__thumb { flex-basis: 144px; }
	.ss .ss-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; }
}
@media (min-width: 1024px) {
	.ss-results { scroll-margin-top: 160px; }
	.ss .ss-photos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
