/*
	File: assets/css/03-browser-section.css
	Description: Searchable registrar browser, filters, result cards, and empty states.
	Last modified: 2026-07-17
	Copyright: (c) 2026 mytag.sol Community. All rights reserved.
*/

.browser-section {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.35rem;
	width: 100%;
	max-width: var(--content-width);
	margin: 0 auto;
	padding: 2.2rem 1.2rem 3rem;
	color-scheme: only dark;
}

#browser-controls {
	--browser-control-width: 500px;
	flex-direction: column;
	align-items: center;
	gap: 0.9rem;
	width: 100%;
	max-width: var(--browser-control-width);
	margin-right: auto;
	margin-left: auto;
}

.browser-search-wrap {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	max-width: var(--browser-control-width);
}

.bsw-icon::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 1rem;
	width: 0.72rem;
	height: 0.72rem;
	border: 2px solid rgba(255, 255, 255, 0.34);
	border-radius: 50%;
	transform: translateY(-58%);
}

.bsw-icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 1.62rem;
	width: 0.45rem;
	height: 2px;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.34);
	transform: translateY(0.22rem) rotate(45deg);
}

.browser-search {
	width: 100%;
	min-height: 44px;
	padding: 0.7rem 4.6rem 0.7rem 2.65rem;
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-card);
	outline: none;
	background: rgba(255, 255, 255, 0.05);
	color: var(--color-text);
	font-size: 0.94rem;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.browser-search::placeholder {
	color: rgba(255, 255, 255, 0.34);
}

.browser-search:focus {
	border-color: rgba(255, 192, 0, 0.72);
	box-shadow: 0 0 0 3px rgba(255, 192, 0, 0.07);
}

.browser-search::-webkit-search-cancel-button {
	display: none;
}

.bsw-clear {
	position: absolute;
	right: 0.55rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	padding: 0 0.65rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--radius-pill);
	background: rgba(255, 255, 255, 0.06);
	color: rgba(255, 255, 255, 0.62);
	font-size: 0.76rem;
	font-weight: 700;
	line-height: 1;
}

.bsw-clear[hidden] {
	display: none;
}

.browser-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem 0.6rem;
	width: calc(100% - 1.5rem);
	max-width: calc(var(--browser-control-width) - 1.5rem);
}

.filter-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	min-height: 34px;
	padding: 0.38rem 0.85rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-pill);
	background: rgba(255, 255, 255, 0.05);
	color: rgba(255, 255, 255, 0.76);
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.filter-pill:hover,
.filter-pill.active {
	border-color: var(--color-border-strong);
	background: rgba(255, 192, 0, 0.1);
	color: var(--color-gold);
}

.filter-pill:hover {
	transform: translateY(-1px);
}

.browser-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.9rem;
	justify-content: center;
	align-items: stretch;
	width: 100%;
	max-width: 1080px;
}

.bc {
	--bc-accent: rgba(255, 192, 0, 0.3);
	--bc-accent-soft: rgba(255, 192, 0, 0.045);
	position: relative;
	display: grid;
	flex: 0 1 255px;
	grid-template-rows: auto auto 1fr auto;
	justify-items: start;
	align-content: start;
	gap: 0.5rem;
	width: 255px;
	min-width: 0;
	max-width: 100%;
	min-height: 0;
	overflow: hidden;
	padding: 1rem;
	border: 1px solid rgba(217, 177, 255, 0.42);
	border-radius: var(--radius-card);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 36%),
		linear-gradient(135deg, rgba(31, 14, 82, 0.62), rgba(14, 0, 31, 0.64));
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
	color: inherit;
	text-decoration: none;
	text-align: left;
	opacity: 1;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.22s ease, transform 0.2s ease, background 0.2s ease;
}

.bc::after {
	content: "";
	position: absolute;
	right: -26px;
	top: -26px;
	width: 84px;
	height: 84px;
	border-radius: 50%;
	background: radial-gradient(circle, var(--bc-accent-soft), transparent 68%);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.bc-featured {
	border-color: var(--bc-accent);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 36%),
		linear-gradient(135deg, rgba(38, 16, 92, 0.78), rgba(14, 0, 31, 0.7));
}

.bc[data-cat="identity"] {
	--bc-accent: rgba(255, 192, 0, 0.3);
	--bc-accent-soft: rgba(255, 192, 0, 0.045);
}

.bc[data-cat="community"] {
	--bc-accent: rgba(217, 177, 255, 0.34);
	--bc-accent-soft: rgba(217, 177, 255, 0.065);
}

.bc[data-cat="meme"] {
	--bc-accent: rgba(255, 159, 45, 0.34);
	--bc-accent-soft: rgba(255, 159, 45, 0.07);
}

.bc[data-cat="business"],
.bc[data-cat="finance"] {
	--bc-accent: rgba(96, 190, 255, 0.28);
	--bc-accent-soft: rgba(96, 190, 255, 0.055);
}

.bc[data-cat="creator"],
.bc[data-cat="gaming"],
.bc[data-cat="ai"] {
	--bc-accent: rgba(120, 255, 214, 0.24);
	--bc-accent-soft: rgba(120, 255, 214, 0.048);
}

.bc-featured::after,
.bc:hover::after {
	opacity: 1;
}

.bc-badge {
	justify-self: start;
	margin-right: 0;
	margin-left: 0;
	max-width: 28ch;
	padding: 0.22rem 0.55rem;
	border: 1px solid rgba(255, 192, 0, 0.24);
	border-radius: 6px;
	background: rgba(255, 192, 0, 0.07);
	color: rgba(255, 192, 0, 0.78);
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	line-height: 1;
	text-transform: uppercase;
}

.bc:hover {
	border-color: var(--color-border-strong);
	box-shadow: var(--shadow-card);
	transform: translateY(-2px);
}

.bc-paused {
	cursor: default;
	opacity: 0.78;
}

.bc-paused:hover {
	border-color: rgba(217, 177, 255, 0.42);
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.36);
	transform: none;
}

.bc-paused:hover::after {
	opacity: 0;
}

.bc-paused .bc-badge,
.bc-paused .bc-cta {
	border-color: rgba(255, 255, 255, 0.16);
	background: rgba(255, 255, 255, 0.055);
	color: rgba(255, 255, 255, 0.58);
}

.bc-paused .bc-cta {
	pointer-events: none;
	transition: none;
}

.bc-paused .bc-name strong {
	color: rgba(255, 192, 0, 0.7);
}

.bc-paused:hover .bc-cta {
	border-color: rgba(255, 255, 255, 0.16);
	background: rgba(255, 255, 255, 0.055);
	box-shadow: none;
	color: rgba(255, 255, 255, 0.58);
	transform: none;
}

.bc-hidden {
	display: none;
}

.bc-filtering {
	opacity: 0;
	transform: translateY(4px);
}

.bc-name {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.04rem;
	justify-self: start;
	max-width: 100%;
	margin-right: 0;
	margin-left: 0.35rem;
	line-height: 1.12;
	transform: translateY(2px);
}

.bc-name span {
	color: rgba(217, 177, 255, 0.82);
	color: color-mix(in srgb, var(--color-lavender) 70%, #ffffff 30%);
	font-size: 0.82rem;
	font-weight: 600;
	white-space: nowrap;
}

.bc-name strong {
	color: var(--color-gold);
	font-size: clamp(1rem, 4.7vw, 1.14rem);
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.2;
	word-break: break-word;
	overflow-wrap: anywhere;
}

.bc p {
	justify-self: start;
	max-width: 34ch;
	margin-top: -0.16rem;
	margin-right: 0;
	margin-bottom: 0.12rem;
	margin-left: 0.35rem;
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.76rem;
	line-height: var(--line-readable);
	text-wrap: pretty;
	overflow-wrap: break-word;
	transform: translateY(2px);
}

.bc-cta {
	display: inline-flex;
	align-items: center;
	justify-self: start;
	margin-right: 0;
	margin-left: 0;
	min-height: 29px;
	padding: 0.34rem 0.68rem;
	border: 1px solid rgba(255, 192, 0, 0.32);
	border-radius: var(--radius-pill);
	background: rgba(255, 192, 0, 0.1);
	color: var(--color-gold);
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.bc:hover .bc-cta,
.bc:focus-visible .bc-cta {
	border-color: rgba(255, 216, 77, 0.72);
	background: rgba(255, 192, 0, 0.12);
	box-shadow: 0 0 8px rgba(255, 192, 0, 0.05);
	color: var(--color-gold-bright);
	transform: none;
}

.browser-empty {
	color: var(--color-text-faint);
	font-size: 0.92rem;
	text-align: center;
}

.browser-count {
	width: fit-content;
	max-width: 100%;
	margin-right: auto;
	margin-left: auto;
	color: var(--color-text-faint);
	font-size: 0.82rem;
	line-height: 1.4;
	text-align: center;
}

.browser-more-wrap {
	display: none;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
}

.browser-more-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 0.52rem 1.25rem;
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-pill);
	background: rgba(255, 255, 255, 0.05);
	color: rgba(255, 192, 0, 0.86);
	font-size: 0.84rem;
	font-weight: 700;
	line-height: 1;
}

.browser-more-btn:hover {
	background: rgba(255, 192, 0, 0.1);
	color: var(--color-gold);
}

@media (min-width: 560px) {
	.browser-section {
		padding-right: 2rem;
		padding-left: 2rem;
	}

	.bc {
		padding: 1.05rem;
	}

	.bc-name {
		gap: 0.08rem;
	}

	.bc-name span {
		font-size: 0.86rem;
	}

	.bc-name strong {
		font-size: clamp(1rem, 2.6vw, 1.16rem);
	}

	.bc p {
		margin-bottom: 0.28rem;
		font-size: 0.78rem;
	}

	.bc-cta {
		min-height: 30px;
		padding: 0.35rem 0.72rem;
		font-size: 0.72rem;
	}
}

@media print {
	.browser-search-wrap,
	.browser-filters,
	.browser-more-wrap {
		display: none !important;
	}

	.bc {
		background: #ffffff !important;
		border: 1px solid #cccccc !important;
		box-shadow: none !important;
		break-inside: avoid;
	}
}
