/* =====================================================================
   PhotoZone Graphy — achievement badges (badges.css)
   Used by the profile page and the Settings badge picker.
   Markup comes from pzg_badge_html():
     <div class="pzb pzb-gold pzb-md"> .pzb-medal > (svg.pzb-svg + .pzb-face) · .pzb-name </div>
   The metal, ribbon and scalloped edge are drawn in the SVG (gradients are printed once per page by pzg_badge_defs()).
   Upload to the CDN as  css/badges.css  (load it on any page that shows badges).
   ===================================================================== */
.pzb {
    --pzb-s: 60px;
    --pzb-ink: #4b2a11;
    --pzb-eng: rgba(255, 255, 255, .45);
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: calc(var(--pzb-s) + 18px);
    text-align: center;
    vertical-align: top;
    -webkit-tap-highlight-color: transparent;
    cursor: default;
}

.pzb-sm {
    --pzb-s: 38px;
    width: var(--pzb-s);
}

.pzb-md {
    --pzb-s: 60px;
}

.pzb-lg {
    --pzb-s: 88px;
}

.pzb-bronze {
    --pzb-ink: #4b2a11;
    --pzb-eng: rgba(255, 226, 196, .5);
}

.pzb-silver {
    --pzb-ink: #37404d;
    --pzb-eng: rgba(255, 255, 255, .8);
}

.pzb-gold {
    --pzb-ink: #5a3b05;
    --pzb-eng: rgba(255, 244, 196, .65);
}

.pzb-platinum {
    --pzb-ink: #2b4553;
    --pzb-eng: rgba(255, 255, 255, .8);
}

.pzb-emerald {
    --pzb-ink: #eafff4;
    --pzb-eng: rgba(0, 40, 24, .55);
}

.pzb-ruby {
    --pzb-ink: #fff1f3;
    --pzb-eng: rgba(60, 0, 10, .55);
}

/* the medal is 64 x 78 in the SVG; the engraved face sits on the circle at (32, 31) */
.pzb-medal {
    position: relative;
    display: block;
    width: var(--pzb-s);
    height: calc(var(--pzb-s) * 78 / 64);
    filter: drop-shadow(0 1px 1.5px rgba(20, 24, 32, .28));
}

.pzb-svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.pzb-face {
    position: absolute;
    left: 50%;
    top: calc(31 / 78 * 100%);
    width: 62%;
    height: 62%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pzb-ink);
    text-shadow: 0 1px 0 var(--pzb-eng);
    /* engraved: a light edge under the dark mark */
}

.pzb-face i {
    font-size: calc(var(--pzb-s) * .30);
}

.pzb-glyph {
    font: 800 calc(var(--pzb-s) * .30)/1 system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: -.03em;
}

.pzb-glyph-m {
    font-size: calc(var(--pzb-s) * .25);
}

.pzb-glyph-s {
    font-size: calc(var(--pzb-s) * .20);
}

/* Pro / Max medals carry the same emblem that sits beside the member's name */
.pzb-face .pzb-emblem {
    width: 92%;
    height: 92%;
    margin: 0;
    vertical-align: 0;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25));
}

.pzb-name {
    margin-top: 5px;
    max-width: 100%;
    font: 600 11.5px/1.25 system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #2b3038;
    overflow-wrap: anywhere;
}

.pzb-sm .pzb-name {
    display: none;
}

.pzb-locked {
    filter: grayscale(1) opacity(.45);
}