/* ==== WTC Search — personalizza qui font e colori ==== */
.wtc-s-box,
.wtc-s-results {
	--wtc-s-dark: #212529;
	--wtc-s-font: inherit;
	--wtc-s-font-head: inherit;
	--wtc-s-font-btn: "HandelGo", sans-serif;
	--wtc-s-radius: 15px;
	--wtc-s-mark: #FFE58A;
	font-family: var(--wtc-s-font);
}
/* Tema chiaro (pagina risultati) */
.wtc-s-results {
	--wtc-s-text: #212529;
	--wtc-s-muted: #5A6070;
	--wtc-s-line: #E3E6EE;
	--wtc-s-hover: #F4F5F7;
	--wtc-s-link: #212529;
	color: var(--wtc-s-text);
}
/* Tema scuro (popup) */
.wtc-s-box {
	--wtc-s-text: #F1F3F5;
	--wtc-s-muted: #ADB5BD;
	--wtc-s-line: rgba(255, 255, 255, .12);
	--wtc-s-hover: rgba(255, 255, 255, .07);
	--wtc-s-link: #FFFFFF;
	--wtc-s-icon: #ADB5BD;
	color: var(--wtc-s-text);
	background: var(--wtc-s-dark);
}
.wtc-s-box *, .wtc-s-results * { box-sizing: border-box; }
.wtc-s-box [hidden], .wtc-s-results [hidden] { display: none !important; }
.wtc-s-box mark, .wtc-s-results mark { background: var(--wtc-s-mark); color: #212529; padding: 0 2px; border-radius: 3px; }
.wtc-s-svg { width: 1em; height: 1em; display: block; }

/* ---- Campo di ricerca (comune): lente dentro, radius 15px ---- */
.wtc-s-field { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.wtc-s-field .wtc-s-lens { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 20px; pointer-events: none; display: flex; }
.wtc-s-field input[type="search"] {
	width: 100%; height: 56px; margin: 0; padding: 0 18px 0 50px !important;
	border-radius: var(--wtc-s-radius) !important; outline: none; box-shadow: none !important;
	font-family: var(--wtc-s-font); font-size: 18px; -webkit-appearance: none; appearance: none;
}
.wtc-s-field input[type="search"]::-webkit-search-cancel-button { display: none; }

/* ---- Bottoni stile home (outline #212529, HandelGo) — reset degli stili globali del kit ---- */
.wtc-s-results .wtc-s-btn,
.wtc-s-results .wtc-s-tab,
.wtc-s-box .wtc-s-all {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 28px !important; margin: 0;
	border: 2px solid var(--wtc-s-dark) !important; border-radius: 8px !important;
	background: transparent !important; color: var(--wtc-s-dark) !important;
	font-family: var(--wtc-s-font-btn) !important; font-weight: 500 !important; font-size: 15px !important;
	text-transform: uppercase; letter-spacing: .02em; line-height: 1; text-decoration: none !important;
	box-shadow: none !important; cursor: pointer; transition: background .15s, color .15s;
}
.wtc-s-results .wtc-s-btn:hover,
.wtc-s-results .wtc-s-tab:hover,
.wtc-s-results .wtc-s-tab.is-active {
	background: var(--wtc-s-dark) !important; color: #FFFFFF !important;
}
.wtc-s-results .wtc-s-btn:focus-visible,
.wtc-s-results .wtc-s-tab:focus-visible { outline: 2px solid var(--wtc-s-dark); outline-offset: 2px; }
.wtc-s-results .wtc-s-tab span { opacity: .6; }

/* ---- Popup (scuro) ---- */
.wtc-s-box { border-radius: 0; overflow: hidden; }
.wtc-s-form { display: flex; align-items: center; gap: 12px; padding: 20px 24px; margin: 0; }
.wtc-s-box .wtc-s-lens { color: var(--wtc-s-icon); }
.wtc-s-box .wtc-s-field input[type="search"] {
	border: 2px solid #FFFFFF !important; background: transparent !important; color: #FFFFFF !important; font-size: 22px;
}
.wtc-s-box .wtc-s-field input::placeholder { color: var(--wtc-s-muted); opacity: 1; }
.wtc-s-box .wtc-s-close,
.wtc-s-box .wtc-s-close:hover,
.wtc-s-box .wtc-s-close:focus {
	width: 44px; height: 44px; padding: 0 !important; margin: 0;
	border: 0 !important; background: transparent !important; box-shadow: none !important;
	color: var(--wtc-s-icon) !important; font-size: 22px; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.wtc-s-box .wtc-s-close:hover { color: #FFFFFF !important; }
.wtc-s-box.is-loading .wtc-s-lens { animation: wtc-s-pulse .8s ease-in-out infinite alternate; }
@keyframes wtc-s-pulse { to { opacity: .35; } }

.wtc-s-live:empty { display: none; }
.wtc-s-live { border-top: 1px solid var(--wtc-s-line); }
.wtc-s-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); max-height: 60vh; overflow-y: auto; }
.wtc-s-col { padding: 20px 24px; display: flex; flex-direction: column; gap: 18px; }
.wtc-s-col + .wtc-s-col { border-left: 1px solid var(--wtc-s-line); }
.wtc-s-group { display: flex; flex-direction: column; gap: 2px; }
.wtc-s-ghead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.wtc-s-glabel { font-family: var(--wtc-s-font-btn); font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--wtc-s-muted); }
.wtc-s-ghead a { font-size: 14px; font-weight: 500; color: var(--wtc-s-link) !important; text-decoration: underline; text-underline-offset: 3px; }
.wtc-s-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 24px; border-top: 1px solid var(--wtc-s-line); }
.wtc-s-hint { font-size: 13px; color: var(--wtc-s-muted); }
.wtc-s-box .wtc-s-all { border-color: #FFFFFF !important; color: #FFFFFF !important; }
.wtc-s-box .wtc-s-all:hover { background: #FFFFFF !important; color: var(--wtc-s-dark) !important; }
.wtc-s-empty { padding: 24px; margin: 0; color: var(--wtc-s-muted); }

/* ---- Item (comune) ---- */
.wtc-s-item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; color: var(--wtc-s-text) !important; text-decoration: none !important; }
.wtc-s-item:hover, .wtc-s-item:focus-visible, .wtc-s-item.is-active { background: var(--wtc-s-hover); outline: none; }
.wtc-s-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.wtc-s-title { font-size: 15px; font-weight: 500; line-height: 1.35; }
.wtc-s-item--person .wtc-s-title { font-weight: 600; font-size: 16px; }
.wtc-s-meta { font-size: 13px; color: var(--wtc-s-muted); }
.wtc-s-ico { width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; overflow: hidden; }
.wtc-s-ico--person { width: 46px; height: 46px; border-radius: 50%; background: #DCE2F3; color: #2B3A6B; font-weight: 600; font-size: 14px; }
.wtc-s-ico--person img { width: 100%; height: 100%; object-fit: cover; }
.wtc-s-ico--file { background: #FCE8E6; color: #B3261E; font-size: 10px; font-weight: 700; }
.wtc-s-ico--ext  { background: #E6EEFC; color: #1F4AA8; }
.wtc-s-ico--page { background: #EEF0F4; color: #3A4050; }

/* ---- Pagina risultati (chiara) ---- */
.wtc-s-rhead { display: flex; flex-direction: column; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--wtc-s-line); margin-bottom: 40px; }
.wtc-s-count { font-size: 14px; color: var(--wtc-s-muted); margin-bottom: -12px; }
.wtc-s-h1 { margin: 0; font-family: var(--wtc-s-font-head); font-size: clamp(30px, 4vw, 48px); line-height: 1.1; }
.wtc-s-rform { display: flex; align-items: center; gap: 12px; max-width: 900px; margin: 0; }
.wtc-s-results .wtc-s-lens { color: #ADB5BD; }
.wtc-s-results .wtc-s-field input[type="search"] { border: 2px solid var(--wtc-s-dark) !important; background: #FFFFFF !important; color: var(--wtc-s-text) !important; }
.wtc-s-results .wtc-s-btn { min-height: 56px; }
.wtc-s-tabs { display: flex; gap: 10px; flex-wrap: wrap; }

.wtc-s-section { margin-bottom: 56px; }
.wtc-s-h2 { margin: 0 0 20px; font-family: var(--wtc-s-font-head); font-size: 26px; }
.wtc-s-h2 span { color: var(--wtc-s-muted); font-weight: 500; }
.wtc-s-list { display: flex; flex-direction: column; gap: 12px; }
.wtc-s-results .wtc-s-item { padding: 16px 20px; border: 1px solid var(--wtc-s-line); border-radius: var(--wtc-s-radius); gap: 18px; }
.wtc-s-results .wtc-s-ico { width: 44px; height: 44px; border-radius: 10px; }
.wtc-s-results .wtc-s-title { font-size: 17px; }
.wtc-s-excerpt { font-size: 14px; color: var(--wtc-s-muted); line-height: 1.45; }
.wtc-s-cta { font-family: var(--wtc-s-font-btn); font-size: 13px; font-weight: 500; text-transform: uppercase; color: var(--wtc-s-dark); flex-shrink: 0; }

/* Persone in griglia di card */
.wtc-s-list--people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.wtc-s-results .wtc-s-item--person { flex-direction: column; align-items: stretch; padding: 16px; }
.wtc-s-results .wtc-s-item--person .wtc-s-ico { width: 100%; height: auto; aspect-ratio: 1; border-radius: 10px; font-size: 28px; }
.wtc-s-tag { align-self: flex-start; margin-top: 6px; font-size: 12px; font-weight: 600; color: #2B3A6B; background: #EEF1FA; border-radius: 12px; padding: 4px 10px; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
	.wtc-s-list--people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.wtc-s-box { min-height: 100%; }
	.wtc-s-form { padding: 14px 16px; gap: 8px; }
	.wtc-s-box .wtc-s-field input[type="search"] { font-size: 17px; height: 50px; }
	.wtc-s-hint { display: none; }
	.wtc-s-cols { max-height: none; }
	.wtc-s-col { padding: 8px 16px; }
	.wtc-s-col + .wtc-s-col { border-left: 0; }
	.wtc-s-foot { position: sticky; bottom: 0; background: var(--wtc-s-dark); padding: 12px 16px; }
	.wtc-s-box .wtc-s-all { width: 100%; }
	.wtc-s-rform { flex-wrap: wrap; }
	.wtc-s-rform .wtc-s-field { flex-basis: 100%; }
	.wtc-s-results .wtc-s-btn { width: 100%; }
	.wtc-s-results .wtc-s-item { padding: 12px 14px; }
	.wtc-s-cta { display: none; }
}
@media (max-width: 480px) {
	.wtc-s-list--people { grid-template-columns: minmax(0, 1fr); }
}
