/* TA-1662 — search dropdown panel ("What | Where", concept B + filter chips).
   Box styles are inline in partials/search/box.volt; the panel is portaled to
   <body> (header nav rules would leak into it otherwise). */

.tas, .tas-panel {
	--tas-blue: #4285F4;
	--tas-blue-d: #1f56c9;
	--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;
	max-height: min(72vh, 700px);
	overflow-y: auto;
	overscroll-behavior: contain;
	background: #fff;
	border: 1px solid #e4e8ef;
	border-radius: 22px;
	box-shadow: 0 30px 70px -20px rgba(17, 24, 39, .42), 0 4px 12px rgba(16, 24, 40, .06);
	padding: 6px 0 10px;
	font-size: 14px;
	color: var(--tas-ink);
	animation: tas-in .16s ease-out;
}
.tas-panel[hidden] { display: none; }
.tas-panel *, .tas-panel *::before, .tas-panel *::after { box-sizing: border-box; }
@keyframes tas-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.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 .9s linear infinite;
	z-index: 2;
}
@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; }

/* ---------- understood line ---------- */
.tas-understood {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 12px;
	padding: 10px 18px 11px;
	border-bottom: 1px solid var(--tas-line);
	color: var(--tas-sub);
	font-size: 13px;
}
.tas-understood b { color: var(--tas-ink); font-weight: 700; }
.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: 14px 18px 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--tas-mute);
}

/* ---------- two columns (B) ---------- */
.tas-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); margin-bottom: -10px; }
.tas-col--left { background: #f6f8fc; border-right: 1px solid var(--tas-line); padding: 4px 10px 16px; display: flex; flex-direction: column; gap: 2px; }
.tas-col--left .tas-sec { padding-left: 10px; padding-right: 10px; }
.tas-col--right { padding: 4px 0 10px; min-width: 0; }

.tas-row {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 9px 18px;
	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, .tas-tile.is-active { background: var(--tas-hover); }
.tas-row-ico { color: var(--tas-mute); }
.tas-row-ico--pin { color: #e8613c; }
.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); }

.tas-cat { padding: 9px 10px; border-radius: 12px; font-size: 14.5px; }
.tas-cat.is-current { background: #fff; font-weight: 700; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); }
.tas-cat.is-active { background: #eef3fd; }
.tas-cat-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.tas-cat-ico svg { width: 18px; height: 18px; }
.tas-count { font-size: 12px; color: #6b7487; background: #fff; border: 1px solid #e3e8f0; border-radius: 999px; padding: 2px 8px; font-weight: 500; }

.tas-top10 {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 10px 0 0;
	padding: 14px 16px;
	border-radius: 16px;
	background: var(--tas-blue);
	color: #fff !important;
	text-decoration: none !important;
}
.tas-col--right .tas-top10 { margin: 10px 18px 4px; }
.tas-top10.is-active { background: #2f6fe0; }
.tas-top10-k { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; opacity: .85; }
.tas-top10-t { font-family: Cabin, "Cabin Fallback", Roboto, sans-serif; font-weight: 700; font-size: 17px; line-height: 1.2; }
.tas-top10-t::first-letter { text-transform: uppercase; }
.tas-top10-s { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.tas-top10-s svg { width: 14px; height: 14px; }

.tas-rhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 14px 18px 8px; }
.tas-rtitle { font-family: Cabin, "Cabin Fallback", Roboto, sans-serif; font-weight: 700; font-size: 17px; color: var(--tas-ink); }
.tas-rnote { font-size: 12px; color: var(--tas-mute); white-space: nowrap; }

/* ---------- chips ---------- */
.tas-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 18px 10px; }
.tas-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 13px;
	border: 1px solid #dfe4ec;
	border-radius: 999px;
	background: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	color: var(--tas-ink) !important;
	text-decoration: none !important;
	cursor: pointer;
	max-width: 100%;
	transition: background .12s, border-color .12s;
}
.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-chip.is-on { background: var(--tas-ink); border-color: var(--tas-ink); color: #fff !important; }
.tas-chip--add { border-style: dashed; border-color: #b9c8e3; background: #f7faff; color: var(--tas-blue-d) !important; }
.tas-chips--cats { padding-top: 12px; }

/* ---------- business row (single-column dropdown) ---------- */
.tas-biz { align-items: center; padding-top: 8px; padding-bottom: 8px; }
.tas-av--sm { width: 44px; height: 44px; border-radius: 12px; font-size: 15px; }
.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 { background: none; color: inherit; font-weight: 700; text-decoration: underline; text-decoration-color: rgba(66, 133, 244, .45); text-underline-offset: 3px; }
.tas-tick { display: inline-flex; flex: none; }
.tas-panel .tas-tick 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-rating .tas-rev { font-weight: 400; }
.tas-panel .tas-star { width: 13px; height: 13px; fill: var(--tas-star); stroke: none; }
.tas-page-n { flex: none; font-size: 12px; color: var(--tas-mute); }
.tas-panel--sheet .tas-page-n { display: none; }

/* ---------- business card ---------- */
.tas-card { align-items: flex-start; gap: 14px; margin: 0 10px; width: calc(100% - 20px); padding: 10px 8px; border-radius: 16px; }
.tas-av {
	position: relative;
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 14px;
	overflow: hidden;
	background: hsl(var(--h, 215), 70%, 93%);
	color: hsl(var(--h, 215), 45%, 36%);
	display: grid;
	place-items: center;
	font-family: Cabin, "Cabin Fallback", Roboto, sans-serif;
	font-weight: 700;
	font-size: 18px;
}
.tas-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.tas-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tas-card-name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.tas-card-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 15px; color: var(--tas-ink); }
.tas-card-nm mark, .tas-page-t mark { background: none; color: inherit; text-decoration: underline; text-decoration-color: rgba(66, 133, 244, .5); text-underline-offset: 3px; }
.tas-verified { display: inline-flex; align-items: center; gap: 3px; flex: none; padding: 1px 8px 1px 4px; border-radius: 999px; background: #eaf3fe; color: #1c6fd1; font-size: 11px; font-weight: 700; }
.tas-panel .tas-verified svg { width: 12px; height: 12px; fill: #228BE6; stroke: none; }
.tas-stars-row { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--tas-sub); }
.tas-stars-row b { color: var(--tas-ink); }
.tas-stars { display: inline-flex; gap: 1px; }
.tas-panel .tas-stars svg { width: 13px; height: 13px; stroke: none; }
.tas-panel .tas-stars svg.is-on { fill: var(--tas-star); }
.tas-panel .tas-stars svg.is-off { fill: #dfe3ea; }
.tas-rev { color: var(--tas-mute); }
.tas-card-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 12.5px; color: var(--tas-sub); }
.tas-pill { padding: 1px 8px; border-radius: 6px; background: #f2f4f8; color: #3e4757; }
.tas-dot { color: #c3c9d4; }
.tas-open { color: #0b7a4b; font-weight: 600; }
.tas-open::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--tas-star); margin-right: 5px; vertical-align: 1px; }
.tas-closed { color: var(--tas-mute); }

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

/* Top-10 list rows */
.tas-go-ico { width: 16px !important; height: 16px !important; color: #b6bfcc; }

.tas-all {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 8px 18px 0;
	padding: 12px 2px 4px;
	border-top: 1px solid var(--tas-line);
	color: var(--tas-blue-d) !important;
	text-decoration: none !important;
	font-size: 14px;
	font-weight: 500;
}
.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; }

/* ---------- focus state (warm welcome) ---------- */
.tas-hello { padding: 16px 18px 6px; display: flex; flex-direction: column; gap: 6px; }
.tas-hello-t { font-family: Cabin, "Cabin Fallback", Roboto, sans-serif; font-weight: 700; font-size: 21px; line-height: 1.2; }
.tas-hello-s { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--tas-sub); }
.tas-live { width: 8px; height: 8px; border-radius: 50%; background: var(--tas-star); box-shadow: 0 0 0 4px rgba(0, 204, 123, .18); }
.tas-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px 18px 4px; }
.tas-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 6px 10px; border-radius: 14px; border: 1px solid #edf0f5; background: #fff; font: inherit; font-size: 13px; font-weight: 500; line-height: 1.2; color: var(--tas-ink); cursor: pointer; text-align: center; min-width: 0; }
.tas-tile > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tas-tile:hover { border-color: #d7e0ee; background: #fbfcff; }

.tas-recent .tas-row-main { color: var(--tas-ink); }

.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: 10px 18px 2px; border-top: 1px solid var(--tas-line); margin-top: 8px; }

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

.tas-skel { display: flex; align-items: center; gap: 12px; padding: 10px 18px; }
.tas-skel-a { width: 56px; height: 56px; border-radius: 14px; }
.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;
	align-items: flex-start;
	gap: 6px;
	padding: 10px 12px 0 !important;
	box-shadow: none !important;
}
.tas--sheet .tas-back { display: grid; place-items: center; flex: none; width: 40px; height: 40px; margin-top: 4px; border: 0; border-radius: 50%; background: #f1f4f9; color: var(--tas-ink); cursor: pointer; padding: 0; }
.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 { flex: 1; flex-direction: column; align-items: stretch; height: auto; border-radius: 18px; padding: 4px; position: relative; }
.tas--sheet .tas-field { height: 48px; border-radius: 14px; flex: none; }
.tas--sheet .tas-lbl { width: 46px; }
.tas--sheet .tas-sep { width: auto; height: 1px; margin: 0 12px; }
.tas--sheet .tas-go { display: none; }
.tas--sheet .tas-clear { position: absolute; right: 10px; top: 16px; }
.tas-panel.tas-panel--sheet { border: 0; border-radius: 0; box-shadow: none; animation: none; border-top: 1px solid var(--tas-line); }
.tas-panel--sheet .tas-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tas-panel--sheet .tas-row { padding-top: 10px; padding-bottom: 10px; }

@media (max-width: 599px) {
	.tas-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tas-rnote { display: none; }
}

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

/* Top-10 lists: plain blue text links (the whole phrase, place included) + arrow */
.tas-page .tas-row-main { display: block; }
.tas-page-t { display: block; color: #1a73e8; font-weight: 500; line-height: 1.35; }
.tas-page-t::first-letter { text-transform: uppercase; }
.tas-page:hover .tas-page-t, .tas-page.is-active .tas-page-t { text-decoration: underline; text-underline-offset: 3px; }
.tas-page .tas-go-ico { color: #1a73e8; }
.tas-page--lead .tas-page-t { font-weight: 600; font-size: 15px; }
