/* Certified educator / organization: a badge on the profile photo, bottom right
   (frontend/partials/_certified-badge). Its label shows on hover, keyboard focus or a
   tap. The anchor wraps the photo so the badge is placed on the photo itself. */
.certified-anchor {
    position: relative;
    display: inline-block;
    vertical-align: top;
}
.certified-anchor--center {
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.certified-badge {
    position: absolute;
    right: -4%;
    bottom: -4%;
    z-index: 3;
    width: 36%;
    min-width: 22px;
    max-width: 60px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: url('../img/certified-badge.svg') center / contain no-repeat;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25));
    cursor: pointer;
}
.certified-badge:focus {
    outline: none;
}
.certified-badge:focus-visible {
    outline: 2px solid var(--theme-color, #af990a);
    outline-offset: 2px;
}
.certified-badge__tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    padding: 5px 10px;
    border-radius: 8px;
    background: #1f2a1c;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s ease, visibility .15s ease;
}
.certified-badge__tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: #1f2a1c;
}
.certified-badge:hover .certified-badge__tip,
.certified-badge:focus-visible .certified-badge__tip,
.certified-badge.is-open .certified-badge__tip {
    opacity: 1;
    visibility: visible;
}
@media (prefers-reduced-motion: reduce) {
    .certified-badge__tip { transition: none; }
}
