/**
 * Bestage Creator Hub — Frontend Stylesheet
 * Visually matched to Bestage Bazar's dark marketplace theme.
 *
 * @package BCH\Assets
 */

:root {
	--bch-bg: #111111;
	--bch-bg-elevated: #1a1a1a;
	--bch-bg-card: #171717;
	--bch-primary: #8B0000;
	--bch-primary-hover: #a30000;
	--bch-accent: #FFCC00;
	--bch-text: #FFFFFF;
	--bch-text-muted: #b3b3b3;
	--bch-border: #2a2a2a;
	--bch-radius-lg: 16px;
	--bch-radius-md: 10px;
	--bch-radius-sm: 6px;
	--bch-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
	--bch-transition: all 0.25s ease;
}

.bch-page-wrap,
.bch-archive-wrap,
.bch-single-creator,
.bch-dashboard-shell,
.bch-directory-embed {
	color: var(--bch-text);
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
	max-width: 1280px;
	margin: 0 auto;
	padding: 24px 16px;
}

/* Buttons */
.bch-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px;
	border-radius: var(--bch-radius-md);
	font-weight: 600;
	font-size: 14px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: var(--bch-transition);
	text-decoration: none;
}
.bch-btn-small { padding: 6px 14px; font-size: 13px; }
.bch-btn-primary { background: var(--bch-primary); color: #fff; }
.bch-btn-primary:hover { background: var(--bch-primary-hover); transform: translateY(-1px); }
.bch-btn-outline { background: transparent; border-color: var(--bch-border); color: var(--bch-text); }
.bch-btn-outline:hover { border-color: var(--bch-accent); color: var(--bch-accent); }
.bch-btn-whatsapp { background: #25D366; color: #0b0b0b; width: 100%; margin-bottom: 8px; }
.bch-btn-danger { background: transparent; border-color: var(--bch-primary); color: var(--bch-primary); }
.bch-btn-outline.is-active, .bch-favorite-toggle.is-active, .bch-follow-toggle.is-active {
	border-color: var(--bch-accent);
	color: var(--bch-accent);
}

/* ==========================================================================
   Creator Directory — marketplace card grid
   4 columns desktop / 2 tablet / 1 mobile, equal gaps. Every card is the
   same height via CSS Grid row-stretch + flex-column layout + fixed-line
   text truncation, rather than a hardcoded pixel height (which breaks
   under font-size zoom/longer translations) — same visual result,
   more robust.
   ========================================================================== */
.bch-creator-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	margin-top: 20px;
	align-items: stretch;
}
@media (max-width: 1100px) {
	.bch-creator-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (max-width: 560px) {
	.bch-creator-grid { grid-template-columns: 1fr; gap: 16px; }
}

.bch-creator-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--bch-bg-card);
	border: 1px solid var(--bch-border);
	border-radius: var(--bch-radius-lg);
	padding: 24px 20px 20px;
	box-shadow: var(--bch-shadow);
	transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
	overflow: hidden;
}
.bch-creator-card:hover,
.bch-creator-card:focus-within {
	transform: translateY(-6px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
	border-color: var(--bch-accent);
}
.bch-creator-card.is-featured { border-color: var(--bch-accent); box-shadow: 0 0 0 1px var(--bch-accent), 0 12px 32px rgba(255, 204, 0, 0.15); }
.bch-creator-card.is-highlighted { border-left: 4px solid var(--bch-accent); }
.bch-card-pinned-badge {
	position: absolute;
	top: 48px;
	left: 14px;
	z-index: 3;
	font-size: 16px;
	background: var(--bch-bg-card);
	border-radius: 50%;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.bch-card-featured-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	background: var(--bch-accent);
	color: #111;
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 20px;
	z-index: 3;
}

/* Favorite button sits above the card's stretched click-through link
   (z-index) so tapping the heart never triggers card navigation, and
   the card itself never nests a <button> inside an <a> (invalid HTML)
   — see the stretched-link technique below. */
.bch-card-fav-btn {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 3;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid var(--bch-border);
	background: rgba(0, 0, 0, 0.45);
	color: var(--bch-text);
	font-size: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: var(--bch-transition);
}
.bch-card-fav-btn:hover { border-color: var(--bch-accent); transform: scale(1.08); }

.bch-card-avatar-wrap {
	display: flex;
	justify-content: center;
	margin-bottom: 16px;
}
.bch-card-avatar,
.bch-card-avatar-wrap img {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--bch-border);
	background: var(--bch-bg-elevated);
	transition: border-color 0.22s ease;
}
.bch-creator-card:hover .bch-card-avatar,
.bch-creator-card:hover .bch-card-avatar-wrap img { border-color: var(--bch-accent); }

.bch-card-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	text-align: center;
	min-width: 0; /* allow text truncation inside a flex child */
}

.bch-card-name {
	position: relative;
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.bch-card-stretched-link { color: var(--bch-text); text-decoration: none; }
/* The "clickable whole card" technique: this link is visually just the
   name, but stretched via ::after to cover the entire card. Any other
   interactive element (favorite button, the CTA link below) is given
   position:relative + a higher z-index so it stays independently
   clickable — no nested <a>/<button>, fully valid & accessible HTML. */
.bch-card-stretched-link::after {
	content: "";
	position: absolute;
	inset: -24px -20px -20px;
	z-index: 1;
}
.bch-verified-tick { color: #3b9eff; font-size: 15px; }

.bch-card-category {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--bch-accent);
	min-height: 15px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bch-card-platforms {
	margin: 0 0 10px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	min-height: 24px;
}
.bch-card-platform-chip {
	font-size: 11px;
	color: var(--bch-text-muted);
	background: var(--bch-bg-elevated);
	border: 1px solid var(--bch-border);
	border-radius: 20px;
	padding: 3px 9px;
	white-space: nowrap;
}

.bch-card-stats-row {
	display: flex;
	justify-content: center;
	gap: 16px;
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--bch-text);
}
.bch-card-stat { display: inline-flex; align-items: center; gap: 4px; }
.bch-card-stat-muted { color: var(--bch-text-muted); font-weight: 400; }

.bch-card-location {
	margin: 0 0 10px;
	font-size: 12px;
	color: var(--bch-text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-height: 16px;
}

.bch-card-bio {
	margin: 0 0 4px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--bch-text-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: calc(1.5em * 2);
}

.bch-card-footer {
	margin-top: 16px;
	padding-top: 0;
}
.bch-card-cta {
	position: relative;
	z-index: 2; /* above the stretched link, so hover/focus feedback is correct */
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 12px;
	background: var(--bch-primary);
	color: #fff;
	font-weight: 600;
	font-size: 14px;
	border-radius: var(--bch-radius-md);
	text-decoration: none;
	transition: var(--bch-transition);
}
.bch-card-cta:hover { background: var(--bch-primary-hover); }
.bch-card-cta-icon { transition: transform 0.22s ease; }
.bch-creator-card:hover .bch-card-cta-icon { transform: translateX(3px); }

.bch-badge {
	display: inline-block;
	background: var(--bch-bg-elevated);
	border: 1px solid var(--bch-border);
	color: var(--bch-text-muted);
	border-radius: var(--bch-radius-sm);
	padding: 3px 8px;
	font-size: 12px;
	margin: 2px 4px 2px 0;
}
.bch-badge-featured { position: absolute; top: 10px; left: 10px; background: var(--bch-accent); color: #111; border: none; font-weight: 700; z-index: 2; }

@media (max-width: 560px) {
	.bch-card-fav-btn { width: 40px; height: 40px; }
	.bch-card-cta { padding: 14px; font-size: 15px; }
	.bch-card-avatar,
	.bch-card-avatar-wrap img { width: 90px; height: 90px; }
}

/* ==========================================================================
   Creator Directory — search bar + filters
   ========================================================================== */
.bch-search-widget {
	background: var(--bch-bg-card);
	border: 1px solid var(--bch-border);
	border-radius: var(--bch-radius-lg);
	padding: 16px;
	margin: 16px 0 24px;
}

.bch-search-box {
	position: relative;
	display: flex;
	align-items: center;
}
.bch-search-icon {
	position: absolute;
	left: 18px;
	font-size: 16px;
	pointer-events: none;
	opacity: 0.7;
}
.bch-search-box input[type="search"] {
	width: 100%;
	background: var(--bch-bg-elevated);
	color: var(--bch-text);
	border: 1px solid var(--bch-border);
	border-radius: 999px;
	padding: 14px 46px;
	font-size: 15px;
	transition: var(--bch-transition);
}
.bch-search-box input[type="search"]:focus {
	outline: none;
	border-color: var(--bch-accent);
}
.bch-search-box input[type="search"]::-webkit-search-cancel-button { display: none; }

.bch-search-clear {
	position: absolute;
	right: 46px;
	background: transparent;
	border: none;
	color: var(--bch-text-muted);
	font-size: 14px;
	cursor: pointer;
	padding: 6px;
	line-height: 1;
}
.bch-search-clear:hover { color: var(--bch-text); }

.bch-search-spinner {
	position: absolute;
	right: 16px;
	width: 18px;
	height: 18px;
	border: 2px solid var(--bch-border);
	border-top-color: var(--bch-accent);
	border-radius: 50%;
	animation: bch-spin 0.7s linear infinite;
}
@keyframes bch-spin { to { transform: rotate(360deg); } }

.bch-filters-toggle {
	display: none;
	width: 100%;
	margin-top: 12px;
	padding: 10px;
	background: var(--bch-bg-elevated);
	border: 1px solid var(--bch-border);
	border-radius: var(--bch-radius-md);
	color: var(--bch-text);
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
}

.bch-filters-panel {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}
.bch-filters-panel select,
.bch-filters-panel input[type="text"],
.bch-filters-panel input[type="number"] {
	background: var(--bch-bg-elevated);
	color: var(--bch-text);
	border: 1px solid var(--bch-border);
	border-radius: var(--bch-radius-sm);
	padding: 9px 12px;
	font-size: 13px;
}
.bch-checkbox { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--bch-text-muted); }

@media (max-width: 700px) {
	.bch-filters-toggle { display: block; }
	.bch-filters-panel {
		display: none;
		flex-direction: column;
		align-items: stretch;
	}
	.bch-filters-panel.is-open { display: flex; }
	.bch-filters-panel select,
	.bch-filters-panel input[type="text"],
	.bch-filters-panel input[type="number"],
	.bch-filters-panel .bch-btn {
		width: 100%;
	}
}

.bch-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.bch-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border-radius: var(--bch-radius-sm);
	background: var(--bch-bg-card);
	border: 1px solid var(--bch-border);
	color: var(--bch-text);
	text-decoration: none;
	font-size: 14px;
	transition: var(--bch-transition);
}
.bch-pagination .page-numbers:hover { border-color: var(--bch-accent); color: var(--bch-accent); }
.bch-pagination .page-numbers.current { background: var(--bch-primary); border-color: var(--bch-primary); color: #fff; }

.bch-empty-state {
	text-align: center;
	color: var(--bch-text-muted);
	padding: 60px 20px;
}
.bch-empty-state p:first-child { font-size: 17px; font-weight: 600; color: var(--bch-text); margin-bottom: 6px; }

/* Single profile */
.bch-cover-image img { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--bch-radius-lg); }
.bch-profile-header { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin: 20px 0; }
.bch-profile-avatar img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 3px solid var(--bch-accent); }
.bch-profile-headline h1 { margin: 0 0 4px; font-size: 26px; }
.bch-profile-meta, .bch-profile-stats { color: var(--bch-text-muted); font-size: 14px; }
.bch-profile-stats span { margin-right: 14px; }
.bch-achievement-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.bch-achievement-badge {
	font-size: 12px;
	background: var(--bch-bg-elevated);
	border: 1px solid var(--bch-border);
	border-radius: 20px;
	padding: 4px 10px;
	color: var(--bch-text-muted);
}
.bch-profile-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.bch-profile-body { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-top: 20px; }
.bch-profile-section { background: var(--bch-bg-card); border: 1px solid var(--bch-border); border-radius: var(--bch-radius-lg); padding: 20px; margin-bottom: 20px; }
.bch-tag { display: inline-block; background: var(--bch-bg-elevated); border-radius: 20px; padding: 4px 12px; margin: 3px; font-size: 12px; }
.bch-leaderboard-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; }

.bch-social-platform-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.bch-social-platform-card {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--bch-bg-elevated);
	border: 1px solid var(--bch-border);
	border-radius: var(--bch-radius-md);
	padding: 12px 14px;
}
.bch-social-platform-icon { font-size: 22px; line-height: 1; }
.bch-social-platform-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bch-social-platform-info strong { font-size: 14px; }
.bch-social-platform-username, .bch-social-platform-followers { font-size: 12px; color: var(--bch-text-muted); }
.bch-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.bch-gallery-grid img { width: 100%; border-radius: var(--bch-radius-sm); }
.bch-contact-card, .bch-collab-card, .bch-qr-card { background: var(--bch-bg-card); border: 1px solid var(--bch-border); border-radius: var(--bch-radius-lg); padding: 18px; margin-bottom: 20px; }
.bch-contact-card .bch-btn, .bch-contact-card button { width: 100%; margin-bottom: 8px; }
.bch-qr-image { border-radius: var(--bch-radius-sm); }
.bch-review-list { list-style: none; margin: 0; padding: 0; }
.bch-review-list li { border-bottom: 1px solid var(--bch-border); padding: 12px 0; }
.bch-stars { color: var(--bch-accent); margin-left: 8px; }
.bch-inline-form { display: flex; flex-direction: column; gap: 8px; }
.bch-inline-form input, .bch-inline-form textarea, .bch-inline-form select {
	background: var(--bch-bg-elevated); color: var(--bch-text); border: 1px solid var(--bch-border); border-radius: var(--bch-radius-sm); padding: 8px 10px;
}
.bch-feedback { margin-top: 8px; font-size: 13px; }
.bch-feedback.is-success { color: #4caf50; }
.bch-feedback.is-error { color: var(--bch-primary); }

@media (max-width: 900px) {
	.bch-profile-body { grid-template-columns: 1fr; }
	.bch-profile-actions { margin-left: 0; }
}

/* Search unification tab (injected next to Bazar's own search widget) */
.bch-search-type-tabs { display: flex; gap: 8px; margin: 16px 0 4px; }
.bch-search-creator-panel { margin-top: 16px; }

.bch-platform-selector {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 20px;
}
.bch-platform-btn { font-size: 14px; }

.bch-platform-search-box { margin-bottom: 18px; }
.bch-platform-search-box label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--bch-text-muted);
	margin-bottom: 6px;
}
.bch-platform-search-input {
	width: 100%;
	max-width: 420px;
	background: var(--bch-bg-elevated);
	color: var(--bch-text);
	border: 1px solid var(--bch-border);
	border-radius: 999px;
	padding: 12px 18px;
	font-size: 14px;
}
.bch-platform-search-input:focus { outline: none; border-color: var(--bch-accent); }

@media (max-width: 560px) {
	.bch-platform-selector { gap: 8px; }
	.bch-platform-btn { flex: 1 1 calc(50% - 8px); }
	.bch-platform-search-input { max-width: 100%; }
}
