/* TA-1662 — search dropdown panel (box styles are inline in partials/search/box.volt) */

.tas, .tas-panel {
	--tas-blue: #4285F4;
	--tas-blue-d: #2a64c5;
	--tas-ink: #111827;
	--tas-sub: #5b6577;
	--tas-mute: #8a94a6;
	--tas-line: #edf0f5;
	--tas-hover: #f3f6fc;
	--tas-star: #00CC7B;
	text-align: left;
}

.tas-panel {
	position: fixed;
	z-index: 100001;
	box-sizing: border-box;
	font-family: Roboto, "Roboto Fallback", -apple-system, "Segoe UI", sans-serif;
	line-height: 1.35;
	text-align: left;
	max-height: min(72vh, 640px);
	overflow-y: auto;
	overscroll-behavior: contain;
	background: #fff;
	border: 1px solid #e4e8ef;
	border-radius: 16px;
	box-shadow: 0 18px 50px -12px rgba(16, 24, 40, .25), 0 4px 12px rgba(16, 24, 40, .06);
	padding: 6px 0 8px;
	font-size: 14px;
	color: var(--tas-ink);
	animation: tas-in .14s ease-out;
}
.tas-panel[hidden] { display: none; }
@keyframes tas-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* thin progress bar while a newer query loads over old results */
.tas-panel.is-busy::before {
	content: "";
	position: sticky;
	top: -6px;
	display: block;
	height: 2px;
	margin: -6px 0 4px;
	background: linear-gradient(90deg, transparent, var(--tas-blue), transparent);
	background-size: 40% 100%;
	background-repeat: no-repeat;
	animation: tas-bar 0.9s linear infinite;
}
@keyframes tas-bar { from { background-position: -40% 0; } to { background-position: 140% 0; } }

.tas-panel svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* "what we understood" */
.tas-understood {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 10px;
	padding: 8px 16px 10px;
	margin-bottom: 2px;
	border-bottom: 1px solid var(--tas-line);
	color: var(--tas-sub);
	font-size: 13px;
}
.tas-understood b { color: var(--tas-ink); font-weight: 600; }
.tas-understood .tas-u-ico { width: 15px; height: 15px; color: var(--tas-mute); }
.tas-understood > span { flex: 1; min-width: 0; }

.tas-sec {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px 6px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--tas-mute);
}
.tas-sec-loc { display: inline-flex; align-items: center; gap: 4px; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12.5px; color: var(--tas-sub); }
.tas-sec-loc svg { width: 14px; height: 14px; }

.tas-divider {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px 4px;
	font-size: 12px;
	font-weight: 600;
	color: var(--tas-mute);
}
.tas-divider::after { content: ""; flex: 1; height: 1px; background: var(--tas-line); }

/* rows */
.tas-row {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 8px 16px;
	border: 0;
	background: none;
	font: inherit;
	color: inherit;
	text-align: left;
	text-decoration: none !important;
	cursor: pointer;
}
.tas-row.is-active, .tas-all.is-active, .tas-chip.is-active { background: var(--tas-hover); }
.tas-row-ico { color: var(--tas-mute); }
.tas-row-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tas-row--cta { color: var(--tas-blue); font-weight: 600; }
.tas-row--cta .tas-row-ico { color: var(--tas-blue); }

/* business row */
.tas-av {
	position: relative;
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	overflow: hidden;
	background: hsl(var(--h, 215), 70%, 94%);
	color: hsl(var(--h, 215), 45%, 38%);
	display: grid;
	place-items: center;
	font-weight: 700;
	font-size: 15px;
}
.tas-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.tas-biz-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tas-biz-name { display: flex; align-items: center; gap: 5px; min-width: 0; }
.tas-biz-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14.5px; color: var(--tas-ink); }
.tas-biz-nm mark, .tas-page-t mark { background: none; color: inherit; font-weight: 700; text-decoration: underline; text-decoration-color: rgba(66,133,244,.45); text-underline-offset: 3px; }
.tas-verified { display: inline-flex; flex: none; }
.tas-verified svg { width: 15px; height: 15px; fill: #228BE6; stroke: none; }
.tas-biz-sub { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--tas-sub); font-size: 12.5px; white-space: nowrap; overflow: hidden; }
.tas-biz-sub > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.tas-rating { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--tas-ink); }
.tas-panel .tas-star { width: 13px; height: 13px; fill: var(--tas-star); stroke: none; }
.tas-rev { font-weight: 400; color: var(--tas-mute); }
.tas-dot { color: #c3c9d4; }

/* Top-10 list rows */
.tas-page-ico {
	flex: none;
	width: 32px;
	height: 32px;
	border-radius: 10px;
	display: grid;
	place-items: center;
	background: #eef4ff;
	color: var(--tas-blue);
}
.tas-page-ico svg { width: 16px; height: 16px; }
.tas-page .tas-row-main { display: flex; align-items: baseline; gap: 6px; }
.tas-page-t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.tas-page-t::first-letter { text-transform: uppercase; }
.tas-page-w { color: var(--tas-sub); white-space: nowrap; }
.tas-page-w::before { content: "in "; }
.tas-page-n { flex: none; font-size: 12px; color: var(--tas-mute); }
.tas-go-ico { width: 16px !important; height: 16px !important; color: #b6bfcc; }
.tas-page--lead {
	margin: 6px 10px 2px;
	width: calc(100% - 20px);
	border-radius: 12px;
	background: linear-gradient(90deg, #f1f6ff, #f7fbff);
	border: 1px solid #dfe9fd;
	padding: 10px 12px;
}
.tas-page--lead .tas-page-t { font-weight: 600; color: var(--tas-blue-d); }
.tas-page--lead .tas-page-ico { background: var(--tas-blue); color: #fff; }
.tas-page--lead.is-active { background: #e8f0ff; }

/* see all */
.tas-all {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 6px;
	padding: 12px 16px 6px;
	border-top: 1px solid var(--tas-line);
	color: var(--tas-blue-d) !important;
	text-decoration: none !important;
	font-size: 14px;
}
.tas-all .tas-row-ico { color: var(--tas-blue); }
.tas-kbd { font: 600 11px/1 inherit; color: var(--tas-mute); border: 1px solid #dfe3ea; border-bottom-width: 2px; border-radius: 6px; padding: 3px 6px; }

/* chips */
.tas-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 16px 10px; }
.tas-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	border: 1px solid #e1e6ee;
	border-radius: 999px;
	background: #fff;
	font: inherit;
	font-size: 13px;
	color: var(--tas-ink) !important;
	text-decoration: none !important;
	cursor: pointer;
	max-width: 100%;
}
.tas-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tas-chip:hover { border-color: #c8d3e6; background: var(--tas-hover); }
.tas-chip .tas-chip-ico { width: 14px; height: 14px; color: var(--tas-blue); }

.tas-recent .tas-row-main { color: var(--tas-ink); }
.tas-fill { border: 0; background: none; padding: 4px; color: #b6bfcc; cursor: pointer; display: grid; place-items: center; border-radius: 6px; }
.tas-fill:hover { color: var(--tas-blue); background: #eef4ff; }
.tas-fill svg { width: 16px; height: 16px; }

.tas-linkbtn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	border: 0;
	background: none;
	padding: 0;
	font: inherit;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--tas-blue);
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
}
.tas-linkbtn svg { width: 14px; height: 14px; }
.tas-linkbtn:hover { color: var(--tas-blue-d); text-decoration: underline; }
.tas-locbtn.is-busy { opacity: .6; pointer-events: none; }
.tas-foot { padding: 8px 16px 4px; border-top: 1px solid var(--tas-line); margin-top: 4px; }

/* empty / error */
.tas-empty { padding: 18px 16px 8px; }
.tas-empty-t { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.tas-empty-s { color: var(--tas-sub); font-size: 13px; }

/* skeleton */
.tas-skel { display: flex; align-items: center; gap: 12px; padding: 9px 16px; }
.tas-skel-a { width: 44px; height: 44px; border-radius: 12px; }
.tas-skel-t { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.tas-skel-t span { height: 11px; border-radius: 6px; width: 62%; }
.tas-skel-t span + span { width: 38%; }
.tas-skel-a, .tas-skel-t span {
	background: linear-gradient(90deg, #eef1f6 0%, #f7f9fc 50%, #eef1f6 100%);
	background-size: 200% 100%;
	animation: tas-sh 1.1s linear infinite;
}
@keyframes tas-sh { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* phones: full-screen sheet */
.tas-back { display: none; }
html.tas-lock, html.tas-lock body { overflow: hidden !important; }
.tas--sheet {
	position: fixed !important;
	inset: 0;
	z-index: 100000;
	width: auto !important;
	background: #fff;
	display: flex;
	flex-direction: column;
	padding: 10px 12px 0;
}
.tas--sheet .tas-box { flex: none; }
.tas--sheet .tas-back {
	display: grid;
	place-items: center;
	flex: none;
	width: 34px;
	height: 34px;
	margin: 0 2px 0 -8px;
	border: 0;
	background: none;
	color: var(--tas-ink);
	cursor: pointer;
}
.tas--sheet .tas-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tas--sheet .tas-box .tas-ico { display: none; }
.tas-panel.tas-panel--sheet {
	border: 0;
	border-radius: 0;
	box-shadow: none;
	animation: none;
	border-top: 1px solid var(--tas-line);
}
.tas-panel *, .tas-panel *::before, .tas-panel *::after { box-sizing: border-box; }
.tas-panel--sheet .tas-row { padding-top: 10px; padding-bottom: 10px; }

@media (max-width: 767px) {
	.tas-page-n { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.tas-panel, .tas-skel-a, .tas-skel-t span, .tas-panel.is-busy::before { animation: none; }
}
