/* ==========================================================================
   DSL Profile Badges
   ========================================================================== */

.dsl-user-badges {
    margin: 12px 0;
}

.dsl-user-badges__list,
.dsl-listing-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.dsl-listing-badges {
    margin: 6px 0 10px;
}

/* ── Single badge chip ──────────────────────────────────────────────────── */

.dsl-badge {
    --dsl-badge-color: #2563eb;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 6px;
    background: color-mix(in srgb, var(--dsl-badge-color) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--dsl-badge-color) 40%, #fff);
    color: var(--dsl-badge-color);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: default;
    transition: transform 0.15s, box-shadow 0.15s;
}

.dsl-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.dsl-badge__icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
    color: var(--dsl-badge-color);
}

.dsl-badge__label {
    white-space: nowrap;
}

/* Compact variant for listing pages — icon only */
.dsl-listing-badges .dsl-badge {
    padding: 4px;
    width: 28px;
    height: 28px;
    justify-content: center;
}

.dsl-listing-badges .dsl-badge__icon {
    width: 18px;
    height: 18px;
}

/* ── Tooltip ────────────────────────────────────────────────────────────── */

.dsl-badge__tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    max-width: 260px;
    padding: 8px 12px;
    background: #1f2937;
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 100;
    white-space: normal;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dsl-badge__tooltip strong {
    color: #fff;
    font-weight: 700;
}

.dsl-badge__tooltip span {
    color: #d1d5db;
    font-weight: 400;
}

.dsl-badge__tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
}

.dsl-badge:hover .dsl-badge__tooltip,
.dsl-badge:focus-within .dsl-badge__tooltip {
    opacity: 1;
    visibility: visible;
}

/* ── Mobile ─────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .dsl-badge {
        font-size: 11px;
        padding: 3px 8px 3px 5px;
    }

    .dsl-badge__icon {
        width: 16px;
        height: 16px;
    }

    .dsl-badge__tooltip {
        min-width: 140px;
    }
}