/*
 * Team Link Search — styles for typeahead dropdown + results page.
 *
 * Overriding the dropdown appearance:
 *   Target #tll-search-dropdown and its children.
 *   See README.md § "Overriding dropdown CSS" for guidance.
 *
 * No Tailwind, no framework — plain CSS with BEM-ish class names.
 * All colours use the site's existing orange (#dd7a17) as the accent.
 */

/* ── Shared utilities ──────────────────────────────────────────────────────── */

.tll-sr-only,
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ── Typeahead dropdown ────────────────────────────────────────────────────── */

/*
 * The dropdown is inserted as a sibling of #searchform inside .search.
 * .search uses position:relative (or we add it below) so the dropdown
 * can be absolutely positioned relative to the form container.
 */
.search {
	position: relative;
}

#tll-search-dropdown {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 9999;

	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);

	max-height: 420px;
	overflow-y: auto;

	/* Opaque white — must read clearly against the orange hero background */
	opacity: 1;
}

/* Individual result row */
.tll-dd-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 14px;
	cursor: pointer;
	transition: background 0.08s;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	text-align: left;
}

.tll-dd-item:last-of-type {
	border-bottom: none;
}

.tll-dd-item--active,
.tll-dd-item:hover {
	background: #f5f5f5;
}

/* Avatar */
.tll-dd-avatar {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	object-fit: cover;
	background: #e8e8e8;
	display: block;
}

.tll-dd-avatar--round  { border-radius: 50%; }
.tll-dd-avatar--square { border-radius: 4px; }

.tll-dd-avatar--placeholder {
	background: #e0e0e0;
	display: block;
}

/* Text column */
.tll-dd-text {
	flex: 1;
	min-width: 0;
	font-size: 14px;
	line-height: 1.4;
	color: #111;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tll-dd-name {
	font-weight: 600;
}

.tll-dd-sep {
	margin: 0 4px;
	color: #888;
	font-size: 12px;
}

.tll-dd-type {
	font-size: 12px;
	color: #555;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.tll-dd-subtitle {
	font-size: 12px;
	color: #666;
}

/* <mark> highlight inside dropdown */
#tll-search-dropdown mark {
	background: transparent;
	color: inherit;
	font-weight: 700;
}

/* "See all results" footer row */
.tll-dd-see-all {
	padding: 10px 14px;
	text-align: center;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.tll-dd-see-all a {
	font-size: 13px;
	color: #dd7a17;
	text-decoration: none;
	font-weight: 500;
}

.tll-dd-see-all a:hover {
	text-decoration: underline;
}

/* ── Results page ──────────────────────────────────────────────────────────── */

.tll-results-wrap {
	max-width: 860px;
	margin: 2rem auto;
	padding: 0 1rem;
}

.tll-results-header {
	margin-bottom: 1.5rem;
}

.tll-results-title {
	font-size: 1.4rem;
	font-weight: 600;
	margin: 0 0 1rem;
}

.tll-results-title em {
	font-style: normal;
	color: #dd7a17;
}

/* ── Pill bar (Mode A) ─────────────────────────────────────────────────────── */

.tll-pill-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 1rem;
}

.tll-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 14px;
	border: 1.5px solid #bbb;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 500;
	color: #333;
	background: transparent;
	cursor: pointer;
	text-decoration: none;
	transition: border-color 0.12s, background 0.12s;
	white-space: nowrap;
}

.tll-pill:hover {
	border-color: #dd7a17;
	color: #dd7a17;
}

.tll-pill--active {
	background: #dd7a17;
	border-color: #dd7a17;
	color: #fff;
}

.tll-pill--active:hover {
	background: #c46c12;
	border-color: #c46c12;
	color: #fff;
}

/* ── Mode B header (active pill + filter chips) ────────────────────────────── */

.tll-mode-b-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 1rem;
}

/* Active vertical wrapper */
.tll-active-vertical-wrapper {
	position: relative;
}

.tll-vertical-menu {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	z-index: 100;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
	list-style: none;
	margin: 0;
	padding: 4px 0;
	min-width: 130px;
}

.tll-vertical-menu li a {
	display: block;
	padding: 8px 16px;
	font-size: 14px;
	color: #222;
	text-decoration: none;
}

.tll-vertical-menu li a:hover {
	background: #f5f5f5;
	color: #dd7a17;
}

/* Filter chips form */
.tll-filter-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.tll-filter-chip {
	position: relative;
}

.tll-filter-chip select {
	appearance: none;
	-webkit-appearance: none;
	padding: 5px 28px 5px 12px;
	border: 1.5px solid #bbb;
	border-radius: 20px;
	font-size: 13px;
	color: #333;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E") no-repeat right 10px center;
	background-size: 8px;
	cursor: pointer;
	transition: border-color 0.12s;
}

.tll-filter-chip select:hover,
.tll-filter-chip select:focus {
	border-color: #dd7a17;
	outline: none;
}

.tll-all-filters-link {
	font-size: 13px;
	color: #888;
	cursor: default;   /* stub — no action in v1 */
	padding: 0 4px;
}

/* ── Result count ──────────────────────────────────────────────────────────── */

.tll-result-count {
	font-size: 13px;
	color: #666;
	margin: 0 0 1rem;
}

/* ── Section headings (Mode A) ─────────────────────────────────────────────── */

.tll-section {
	margin-bottom: 2.5rem;
}

.tll-section__heading {
	font-size: 1.1rem;
	font-weight: 700;
	color: #222;
	margin: 0 0 0.75rem;
	padding-bottom: 0.4rem;
	border-bottom: 2px solid #f0f0f0;
}

.tll-see-all {
	display: inline-block;
	margin-top: 0.5rem;
	font-size: 13px;
	color: #dd7a17;
	text-decoration: none;
	font-weight: 500;
}

.tll-see-all:hover {
	text-decoration: underline;
}

/* ── Result card ───────────────────────────────────────────────────────────── */

.tll-card {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid #f0f0f0;
}

.tll-card:last-child {
	border-bottom: none;
}

/* Avatar */
.tll-card__avatar-link {
	flex-shrink: 0;
}

.tll-card__avatar {
	display: block;
	width: 64px;
	height: 64px;
	object-fit: cover;
	background: #e8e8e8;
}

.tll-card__avatar--round  { border-radius: 50%; }
.tll-card__avatar--square { border-radius: 6px; }

.tll-card__avatar--placeholder {
	background: #ddd;
}

/* Body */
.tll-card__body {
	flex: 1;
	min-width: 0;
}

.tll-card__name {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 3px;
}

.tll-card__name a {
	color: #111;
	text-decoration: none;
}

.tll-card__name a:hover {
	color: #dd7a17;
	text-decoration: underline;
}

.tll-card__meta {
	font-size: 13px;
	color: #555;
	margin: 0 0 5px;
	line-height: 1.4;
}

.tll-card__type {
	font-weight: 600;
	color: #333;
}

.tll-card__sep {
	margin: 0 4px;
	color: #aaa;
}

.tll-card__snippet {
	font-size: 13px;
	color: #666;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* <mark> highlight on cards */
.tll-card mark {
	background: transparent;
	color: inherit;
	font-weight: 700;
}

/* Action button */
.tll-card__action {
	flex-shrink: 0;
	align-self: center;
}

.tll-card__btn {
	display: inline-block;
	padding: 7px 14px;
	border: 1.5px solid #dd7a17;
	border-radius: 5px;
	font-size: 13px;
	font-weight: 600;
	color: #dd7a17;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.12s, color 0.12s;
}

.tll-card__btn:hover {
	background: #dd7a17;
	color: #fff;
}

/* ── Pagination ────────────────────────────────────────────────────────────── */

.tll-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid #f0f0f0;
}

.tll-pagination__btn {
	display: inline-block;
	padding: 7px 16px;
	background: #dd7a17;
	color: #fff;
	border-radius: 5px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.12s;
}

.tll-pagination__btn:hover {
	background: #c46c12;
}

.tll-pagination__info {
	font-size: 13px;
	color: #666;
}

/* ── Empty state ───────────────────────────────────────────────────────────── */

.tll-empty {
	padding: 2rem 0;
	color: #555;
}

.tll-empty p {
	margin: 0 0 0.75rem;
}

.tll-empty ul {
	margin: 0;
	padding-left: 1.25rem;
	color: #777;
	font-size: 14px;
	line-height: 1.8;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
	.tll-card {
		flex-wrap: wrap;
	}

	.tll-card__action {
		width: 100%;
		align-self: auto;
	}

	.tll-card__avatar {
		width: 48px;
		height: 48px;
	}

	.tll-results-wrap {
		margin: 1rem auto;
	}

	.tll-mode-b-header {
		flex-direction: column;
		align-items: flex-start;
	}
}
