/* =========================================================
   RB Verified Recruiters — Badge CSS
   Scope: .rbvr-badge
   ========================================================= */

/* Base badge container */
.rbvr-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    vertical-align: middle;
    margin-left: 3px;
    cursor: default;
    line-height: 1;
}

/* The SVG icon */
.rbvr-badge .rbvr-icon {
    width: 16px;
    height: 16px;
    display: block;
    flex-shrink: 0;
    transition: transform 0.18s ease, filter 0.18s ease;
    filter: drop-shadow(0 1px 2px rgba(26, 86, 219, 0.25));
}

/* Hover glow + slight scale */
.rbvr-badge:hover .rbvr-icon,
.rbvr-badge:focus .rbvr-icon {
    transform: scale(1.18);
    filter: drop-shadow(0 2px 6px rgba(26, 86, 219, 0.45));
}

/* Entry animation */
@keyframes rbvr-pop-in {
    0%   { opacity: 0; transform: scale(0.5); }
    70%  { transform: scale(1.12); }
    100% { opacity: 1; transform: scale(1); }
}

.rbvr-badge .rbvr-icon {
    animation: rbvr-pop-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ── Tooltip (CSS-only, no child span — uses ::before + ::after) ── */
.rbvr-badge::before {
    content: attr(data-rbvr-tooltip);
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #1a2332;
    color: #f0f4ff;
    font-size: 11px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
    padding: 5px 9px;
    border-radius: 5px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

/* Tooltip arrow */
.rbvr-badge::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border: 5px solid transparent;
    border-top-color: #1a2332;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 9999;
}

/* Show tooltip on hover / focus */
.rbvr-badge:hover::before,
.rbvr-badge:focus::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.rbvr-badge:hover::after,
.rbvr-badge:focus::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Focus ring for keyboard users ───────────────────── */
.rbvr-badge:focus {
    outline: 2px solid #1a56db;
    outline-offset: 2px;
    border-radius: 50%;
}

/* ── Responsive sizing ───────────────────────────────── */
@media (max-width: 600px) {
    .rbvr-badge .rbvr-icon {
        width: 14px;
        height: 14px;
    }
    .rbvr-badge::before {
        font-size: 10px;
        padding: 4px 7px;
    }
}

/* ── Dark mode ───────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .rbvr-badge::before {
        background: #e8f0fe;
        color: #1a2332;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }
    .rbvr-badge::after {
        border-top-color: #e8f0fe;
    }
    .rbvr-badge .rbvr-icon {
        filter: drop-shadow(0 1px 3px rgba(79, 163, 255, 0.4));
    }
}
