/**
 * Diblati Features — Feature 01: tiered verification badges.
 *
 * Mobile-first, RTL. Pills sit inline next to the display name and wrap
 * gracefully instead of breaking the name line on 375px screens.
 */

/* Container: inline with the name, wraps when space is tight. */
.dibfeat-badges {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	vertical-align: middle;
	margin-inline-start: 8px;
}

/* Base pill. */
.dibfeat-badge {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.7;
	white-space: nowrap;
	border: 1px solid transparent;
	cursor: default;
	/* Tap target floor for touch users. */
	min-height: 28px;
}

.dibfeat-badge-icon {
	line-height: 1;
}

.dibfeat-badge-label {
	line-height: 1;
}

/* Tier colors: bronze → silver → gold. */
.dibfeat-badge--phone {
	background: linear-gradient(180deg, #f8e3c4, #e9b26c);
	border-color: #d69a4f;
	color: #5b3a12;
}

.dibfeat-badge--selfie {
	background: linear-gradient(180deg, #f3f5f8, #ccd6e2);
	border-color: #a9b6c8;
	color: #37455a;
}

.dibfeat-badge--id {
	background: linear-gradient(180deg, #ffecab, #e7b93f);
	border-color: #c1902b;
	color: #5c430a;
}

/* Mini variant for browse cards. */
.dibfeat-badges--mini {
	margin-inline-start: 0;
	gap: 4px;
}

.dibfeat-badges--mini .dibfeat-badge {
	font-size: 11px;
	padding: 2px 8px;
	min-height: 24px;
}

/* Tap tooltip for touch devices (title= doesn't fire on tap). */
.dibfeat-badge.is-open::after {
	content: attr(data-tip);
	position: absolute;
	inset-block-start: calc(100% + 6px);
	inset-inline-start: 0;
	z-index: 50;
	background: #0b2545;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.6;
	white-space: nowrap;
	padding: 6px 12px;
	border-radius: 10px;
	box-shadow: 0 8px 20px rgba(11, 37, 69, 0.3);
	pointer-events: none;
}

/* 375px and narrow: shrink slightly, never push the name off its line. */
@media (max-width: 375px) {
	.dibfeat-badges {
		gap: 4px;
		margin-inline-start: 6px;
	}

	.dibfeat-badge {
		font-size: 11px;
		padding: 2px 8px;
	}
}

/* Hero context: the theme's .profile-hero-name is block-level; let the
   badges sit on the same visual line without stretching it. */
.profile-hero-name .dibfeat-badges {
	margin-block-start: 4px;
}

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
	.dibfeat-badge {
		transition: none;
	}
}
