/* ==========================================================================
   AGENT LIST (post 54) — "Search Console" redesign, scoped to .al-search2
   --------------------------------------------------------------------------
   Elevates the tier-filter pills (al0019, wrapper .w9a-tierbar/.w9a-tierlink)
   and the live search bar (al0021, wrapper .w9a-searchconsole) into one
   cohesive premium instrument, matching the hero redesign's (.al-hero2)
   visual language: white/glass cards, 28px radius, gold-tinted shadow,
   gradient accents — the same "s5 card" idiom as .s5-card / .s5-statgrid /
   .s5-trust / .s5-steps in w9-site5.php.

   SCOPE: .al-search2 is added to al0025's css_classes only (this page's
   container) — nothing here touches the shared agent-list.css base rules
   directly, so master/super/admin/sub-admin-agent-list (which reuse that
   same stylesheet for their own [w9_agent_list] grids) are unaffected.

   SAFETY: every selector agent-search.js / agent-list.js reads —
   .w9a-search-input, .w9a-search-clear, .w9a-search-count (+ its <b>),
   .w9a-search-empty, .w9a-grid, .w9a-card, .w9a-listbar, .w9a-searchwrap —
   is preserved verbatim with its existing DOM relationships (see
   agent-shortcode.php / agent-list.js "search" section). Only NEW wrapper
   elements/classes were added around them (.w9a-tierbar, .w9a-tierlink(-*),
   .w9a-searchconsole, .w9a-searchconsole-label) — nothing was renamed or
   removed, and agent-list.css / agent-shortcode.php / agent-search.js were
   not edited.
   ========================================================================== */

/* ---------- tier filter pills -> tab strip ---------- */
.al-search2 .elementor-element-al0019 { margin-top: 22px; }
.al-search2 .w9a-tierbar {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 0;
}
.al-search2 .w9a-tierlink {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	padding: 10px 10px 10px 18px;
	border-radius: 999px;
	background: rgba(36, 31, 22, 0.927);
	border: 1px solid var(--s5-line);
	box-shadow: var(--s5-shadow);
	font-family: var(--s5-en);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .01em;
	text-transform: none;
	color: var(--s5-ink);
	text-decoration: none;
	white-space: nowrap;
	transition: transform .35s cubic-bezier(.2,.7,.15,1), box-shadow .35s ease, border-color .35s ease, background .35s ease;
}
.al-search2 .w9a-tierlink-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	padding: 3px 9px;
	border-radius: 999px;
	background: rgba(200, 134, 11, .12);
	color: var(--s5-gold-3);
	font-family: var(--s5-en);
	font-size: 10.5px;
	font-weight: 800;
	transition: background .35s ease, color .35s ease;
}
.al-search2 .w9a-tierlink:hover {
	transform: translateY(-3px);
	border-color: var(--s5-line-gold);
	box-shadow: var(--s5-glow);
	background: #241F16;
}
.al-search2 .w9a-tierlink:hover .w9a-tierlink-count {
	background: var(--s5-grad);
	color: #F5EFE0;
}
.al-search2 .w9a-tierlink:focus-visible {
	outline: none;
	box-shadow: 0 0 0 4px rgba(200,134,11,0.22), var(--s5-glow);
}

/* ---------- search console shell ---------- */
.al-search2 .elementor-element-al0021 { margin-top: 18px; }
.al-search2 .w9a-searchconsole {
	position: relative;
	isolation: isolate;
	max-width: 900px;
	margin: 0 auto;
	padding: 22px 26px 24px;
	border-radius: 28px;
	background: linear-gradient(135deg, rgba(36, 31, 22, .96) 0%, rgba(36, 31, 22, .90) 100%);
	border: 1px solid var(--s5-line);
	box-shadow: var(--s5-shadow-hi);
}
.al-search2 .w9a-searchconsole::before {
	content: "";
	position: absolute;
	inset: -30% -8%;
	z-index: -1;
	background: radial-gradient(closest-side, var(--s5-gold-2), transparent 72%);
	opacity: .07;
	filter: blur(30px);
	pointer-events: none;
}
.al-search2 .w9a-searchconsole-label {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 12px;
	font-family: var(--s5-en);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--s5-gold-3);
}
.al-search2 .w9a-searchconsole-label svg { flex: none; }

/* .w9a-listbar keeps its base flex/gap layout from agent-list.css — only
   the outer margin is reset to 0 here since .w9a-searchconsole's own
   padding now supplies that spacing. */
.al-search2 .w9a-listbar { margin: 0; gap: 14px; }

@media (max-width: 640px) {
	.al-search2 .w9a-searchconsole { padding: 18px 16px 20px; border-radius: 24px; }
	.al-search2 .w9a-tierlink { font-size: 12px; padding: 9px 9px 9px 15px; }
}

/* ---------- SLIM PASS: compact console, shorter pill input ---------- */
.al-search2 .w9a-searchconsole { padding: 14px 20px 16px; }
.al-search2 .w9a-searchconsole-label { margin-bottom: 8px; font-size: 10px; }
.al-search2 .elementor-element-al0021 { margin-top: 12px; }
.al-search2 .elementor-element-al0019 { margin-top: 16px; }

.al-search2 .w9a-listbar { margin: 0; gap: 10px; }
.al-search2 .w9a-search-input {
	padding: 9px 44px 9px 50px !important;
	font-size: 14px !important;
}
.al-search2 .w9a-search-ic { width: 32px; height: 32px; left: 5px; }
.al-search2 .w9a-search-ic svg { width: 14px; height: 14px; }
.al-search2 .w9a-search-clear { width: 26px !important; height: 26px !important; }
.al-search2 .w9a-search-count { padding: 7px 16px; font-size: 12.5px; }
.al-search2 .w9a-search-count b { font-size: 13px; }

.al-search2 .w9a-tierlink { padding: 8px 8px 8px 15px; font-size: 12.5px; }
.al-search2 .w9a-tierlink-count { min-width: 21px; padding: 2px 8px; font-size: 10px; }

@media (max-width: 640px) {
	.al-search2 .w9a-searchconsole { padding: 12px 14px 14px; }
}

/* ---------- VERY SLIM PASS: label + input + count on one row ----------
   The previous slim pass only trimmed padding — the console still stacked
   label / input / count as three separate rows (the base agent-list.css
   `.w9a-searchwrap{ flex: 1 1 440px; }` doesn't fit inside agent-pages.css's
   shared `.w9a-listbar{ max-width: 420px; }` cap, so it wrapped). This drops
   that cap and lays everything out as one compact bar on desktop — the
   biggest height win, since it removes two entire rows. DOM/JS selectors
   untouched (see file header) — layout-only. */
.al-search2 .elementor-element-al0019 { margin-top: 10px; }
/* body.vk prefix is load-bearing, not decoration: vk-overrides.css ships
   `body.vk .elementor-widget-html{ margin: 0; }` site-wide, specificity
   (0,2,1) — a bare `.al-search2 .elementor-element-al0021` is (0,2,0) and
   silently loses every time regardless of source order, which is why this
   element had NO visible gap above or below it despite three separate
   margin-top attempts in this file's history. Matching the `body.vk`
   prefix here brings this to (0,3,1), which wins.
   Targets `.w9a-searchconsole` itself (my own raw HTML output), not the
   `.elementor-element-al0021` Elementor wrapper div — post 54 is the only
   page with that exact widget id, but every agent-tier page's search bar
   renders the same `.w9a-searchconsole` root element, so this one rule
   now supplies the gap on all of them without needing a per-page,
   per-ID duplicate. */
body.vk .al-search2 .w9a-searchconsole{ margin-top: 18px; margin-bottom: 18px; }

/* PREMIUM BACKGROUND pass — the one-line layout above already solved the
   height problem; this only enriches the pill's own surface so it reads
   as a distinct "instrument" rather than a plain white bar sitting on the
   (now also white, see w9-site5.php .al-story2/.al-cta2) page background:
   a warm gold-tinted glass gradient instead of flat white, a stronger
   ambient glow (::before, already existed at .07 opacity — bumped and
   given actual gold+blue colour instead of a single flat tint), and a
   thin gold accent bar (::after) echoing the "instrument top-line" cue
   already used elsewhere on this page (.al-hero2 dock, the old registry
   stat card). Still exactly one row — nothing here touches layout. */
.al-search2 .w9a-searchconsole {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	padding: 10px 20px 10px 18px;
	border-radius: 20px;
	background: linear-gradient(120deg, rgba(36, 31, 22, .97) 0%, rgba(36, 31, 22, .90) 48%, rgba(36, 31, 22, .97) 100%);
	border: 1px solid rgba(200,134,11,0.22);
	box-shadow: var(--s5-shadow-hi), inset 0 1px 0 rgba(232,162,0,0.22);
}
.al-search2 .w9a-searchconsole::before {
	inset: -60% -10%;
	background: radial-gradient(closest-side, var(--s5-gold-2), transparent 70%) 15% 30% / 55% 100% no-repeat,
		radial-gradient(closest-side, #E8A200, transparent 70%) 85% 70% / 45% 100% no-repeat;
	opacity: .12;
}
.al-search2 .w9a-searchconsole::after {
	content: "";
	position: absolute;
	left: 22px;
	right: 22px;
	top: 0;
	height: 2px;
	border-radius: 0 0 2px 2px;
	background: var(--s5-grad);
	opacity: .6;
}
.al-search2 .w9a-searchconsole-label {
	margin: 0;
	flex: none;
	white-space: nowrap;
}

.al-search2 .w9a-listbar {
	flex: 1 1 240px;
	min-width: 0;
	margin: 0;
	gap: 10px;
	flex-wrap: nowrap;
}
.al-search2 .w9a-searchwrap {
	flex: 1 1 auto;
	min-width: 140px;
	max-width: none;
}
.al-search2 .w9a-search-input {
	padding: 7px 38px 7px 42px !important;
	font-size: 13px !important;
}
.al-search2 .w9a-search-ic { width: 26px; height: 26px; left: 5px; }
.al-search2 .w9a-search-ic svg { width: 11px; height: 11px; }
.al-search2 .w9a-search-clear { width: 20px !important; height: 20px !important; right: 6px; }
.al-search2 .w9a-search-count {
	flex: none;
	padding: 5px 12px;
	font-size: 11.5px;
}
.al-search2 .w9a-search-count b { font-size: 12px; }

@media (max-width: 640px) {
	.al-search2 .w9a-searchconsole {
		flex-direction: column;
		align-items: stretch;
		padding: 10px 14px;
		border-radius: 18px;
	}
	.al-search2 .w9a-searchconsole-label { margin-bottom: 6px; }
	.al-search2 .w9a-listbar { flex-wrap: wrap; }
	/* .w9a-listbar switches to flex-direction:column at this width (base
	   agent-list.css) — the desktop `flex:1 1 auto` above would then grow
	   .w9a-searchwrap along the (now vertical) main axis to fill the whole
	   column instead of just sizing to its own content, stretching the
	   input to ~200px tall and pushing the icon to float in the empty
	   space. Reset back to content-sized. */
	.al-search2 .w9a-searchwrap { flex: none; min-width: 0; }
	/* Same footgun one level up: .al-search2 .w9a-listbar itself carries
	   `flex:1 1 240px` for the DESKTOP row (240px = a width basis). Inside
	   .w9a-searchconsole's own flex-direction:column at this width, that
	   240px basis applies to the main axis again — now vertical — forcing
	   .w9a-listbar to a 240px-tall box regardless of its ~43px of actual
	   content, which is exactly the "giant gap + floating icon" bug this
	   whole comment block already describes one level down. Reset here too. */
	.al-search2 .w9a-listbar { flex: none; }
}

/* ==========================================================================
   AGENT LIST (post 54) — CARD SKIN v2 "Holographic ID Badge"
   --------------------------------------------------------------------------
   A deliberate departure from the shared light cream/gold pill card every
   other agent-tier page still uses (agent-list.css's base .w9a-card —
   master/super/admin/sub-admin-agent-list are untouched by this block,
   same SCOPE/SAFETY guarantee as the search-console section above: only
   .al-search2-prefixed selectors, no DOM/class changes, agent-list.css
   itself not edited). Dark glass ID-card body, a slow-spinning conic-
   gradient "holographic" ring instead of a static border, and a 5-colour
   accent cycle (by grid position, so it applies whether or not an agent
   has a real photo — the old :has(.w9a-avatar-vN) approach only ever
   coloured placeholder-avatar cards, which most of this page's 78 agents
   aren't). Rounded-rect, not the old pill shape, at every width.

   `--w9a-accent` is the one variable everything below reads from (photo
   ring, tier chip, hover glow) — cycle the 5 nth-of-type blocks below to
   retheme instead of hunting through each property.
   ========================================================================== */
.al-search2 .w9a-card:nth-of-type(5n+1) { --w9a-accent: #FFC72C; } /* gold (bright)  */
.al-search2 .w9a-card:nth-of-type(5n+2) { --w9a-accent: #E8A200; } /* gold (amber)   */
.al-search2 .w9a-card:nth-of-type(5n+3) { --w9a-accent: #C8860B; } /* gold (base)    */
.al-search2 .w9a-card:nth-of-type(5n+4) { --w9a-accent: #B5830F; } /* gold (bronze)  */
.al-search2 .w9a-card:nth-of-type(5n+5) { --w9a-accent: #8A5A0A; } /* gold (deep amber) */

.al-search2 .w9a-card {
	/* Was a flat muted taupe (#9C927C) — an unnamed custom property missed
	   by the site-wide dark-mode conversion (it isn't a background-role
	   property by name, so the automated pass defaulted it to a text-role
	   tone instead of a dark one). The comment below already says "the
	   card's own dark fill", confirming dark was always the intent. */
	--w9a-card-bg: linear-gradient(155deg, #211C14 0%, #1B160F 100%);
	position: relative;
	isolation: isolate;
	overflow: hidden;
	border: none;
	border-radius: 20px !important;
	background: var(--w9a-card-bg);
	box-shadow: 0 14px 34px rgba(232,162,0,0.10), inset 0 1px 0 rgba(232,162,0,0.22);
}
/* spinning holographic ring: ::before fills the whole card with a rotating
   conic gradient, ::after sits 2px in on top of it with the card's own dark
   fill — the uncovered 2px rim is the only part of ::before left visible,
   reading as an animated gradient border rather than a static one. */
.al-search2 .w9a-card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -2;
	border-radius: inherit;
	background: conic-gradient(from 0deg, #FFC72C, #E8A200, #C8860B, #B5830F, #8A5A0A, #FFC72C);
	opacity: .6;
	animation: w9aRingSpin 8s linear infinite;
}
.al-search2 .w9a-card::after {
	content: "";
	position: absolute;
	inset: 2px;
	z-index: -1;
	border-radius: calc(20px - 2px);
	background: var(--w9a-card-bg);
}
@keyframes w9aRingSpin { to { transform: rotate(360deg); } }

.al-search2 .w9a-card.w9a-hide { display: none !important; }

body:not(.w9a-modal-open) .al-search2 .w9a-card:hover {
	transform: translateY(-5px) scale(1.015);
	box-shadow: 0 22px 48px -10px rgba(232,162,0,0.10), 0 0 0 1px var(--w9a-accent) inset;
}
body:not(.w9a-modal-open) .al-search2 .w9a-card:hover::before {
	opacity: 1;
	animation-duration: 2.4s;
}

/* entrance: scale+rise instead of the shared plain rise-in — reads as
   distinct from every other agent-tier page's [data-reveal] motion.
   Specificity here (0,3,0 / 0,4,0) beats wickets-home.css's bare
   [data-reveal] (0,1,0) / [data-reveal].is-in (0,2,0). */
.al-search2 .w9a-card[data-reveal] { opacity: 0; transform: scale(.86) translateY(14px); }
.al-search2 .w9a-card[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- photo — round, accent-ringed, no more per-avatar hard-coded gradients ---------- */
.al-search2 .w9a-photo {
	width: 44px;
	height: 44px;
	box-shadow: 0 0 0 2px rgba(200,134,11,0.22), 0 0 0 4px var(--w9a-accent);
}
body:not(.w9a-modal-open) .al-search2 .w9a-card:hover .w9a-photo {
	transform: scale(1.1);
	box-shadow: 0 0 0 2px rgba(200,134,11,0.22), 0 0 0 5px var(--w9a-accent);
}
.al-search2 .w9a-verified-badge { box-shadow: 0 0 0 2px rgba(200,134,11,0.22); }

/* ---------- text — the shared rules assume a light card (dark ink on
   cream); all !important because .w9a-name/.w9a-toggle fight Elementor's
   global kit h3/button rules the same way agent-list.css's own comments
   already document, so undoing them needs equal firepower. ---------- */
.al-search2 .w9a-name { color: #FFFFFF !important; }
.al-search2 .w9a-crown { filter: drop-shadow(0 0 4px rgba(255, 199, 44, .6)); }
.al-search2 .w9a-group {
	background: color-mix(in srgb, var(--w9a-accent) 18%, transparent);
	color: var(--w9a-accent);
}
.al-search2 .w9a-rating { color: #FFC72C; }
.al-search2 .w9a-idrow { color: #E8A200; }
.al-search2 .w9a-idlabel { color: #FFC72C; }
.al-search2 .w9a-rating::before,
.al-search2 .w9a-idrow::before { background: rgba(36, 31, 22, .18); }

.al-search2 .w9a-toggle {
	background: rgba(36, 31, 22, .06) !important;
	border-color: rgba(232,162,0,0.22) !important;
	color: #FFFFFF !important;
}
.al-search2 .w9a-toggle:hover {
	background: var(--w9a-accent) !important;
	border-color: var(--w9a-accent) !important;
	color: #9C927C !important;
}

@media (max-width: 767px) {
	/* the shared mobile pass (agent-list.css) reverts .w9a-card to
	   border-radius:999px — keep this page's rounded-rect identity instead
	   of snapping back to a pill at narrow widths. */
	.al-search2 .w9a-card { border-radius: 16px !important; }
	.al-search2 .w9a-card::after { border-radius: calc(16px - 2px); }
	.al-search2 .w9a-photo { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
	.al-search2 .w9a-card::before { animation: none; opacity: .45; }
	.al-search2 .w9a-card[data-reveal] { transform: none; }
}
