﻿/* ========= BELT MAP ========= */

.belt-map {
    /* Start at the safe fitted size so the first paint cannot show oversized belts. */
    --belt-map-item-scale: .62;
    --belt-map-min-item-scale: .62;
    --belt-map-max-item-scale: 1;
}

.belt-map > .map-item {
    transform-origin: center;
}

.belt-map.belt-map-fitting > .map-item {
    transition: none;
}

.belt-map > .map-item.current {
    z-index: 4;
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 0 0 5px rgba(59, 130, 246, 0.34),
        0 0 0 12px rgba(250, 204, 21, 0.22),
        0 10px 22px rgba(15, 23, 42, 0.24);
}

.belt-map > .map-item.current .blt-medal::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 999px;
    border: 3px solid rgba(250, 204, 21, 0.9);
    pointer-events: none;
}

/* ---- CHECK, LOCK, IMAGE ---- */
.blt-check {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: clamp(18px, 2.2vw, 40px);
    color: #16a34a;
}

.blt-medal {
    position: relative;
    width: 100%;
    display: grid;
    place-items: center;
}

.blt-img {
    width: clamp(68px, 22vw, 116px);
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.blt-lock {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: clamp(18px, 2.4vw, 22px);
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.08);
    border-radius: 12px;
}

/* ---- INFO ---- */
.blt-info {
    display: grid;
    gap: 6px;
    align-content: start;

    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
}

.blt-name {
    font-size: var(--name-fs);
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
    text-align: center;
}

/* ---- PROGRESS ---- */
.blt-progress {
    width: 100%;
    background: #eef2f7;
    border-radius: 999px;
    height: var(--progress-h);
    margin-bottom: 6px;
    overflow: hidden;
}

.blt-progress-bar {
    background: var(--bar);
    height: 100%;
    transform-origin: left;
    transition: width 0.35s ease;
}

.blt-progress-label {
    font-size: clamp(12px, 1.4vw, 14px);
    color: var(--muted);
}

/* ---- PULSE ---- */
@keyframes pulseRing {
    0%,100% {
        box-shadow: 0 0 0 rgba(2,6,23,0);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(2,6,23,0.05);
    }
}

.blt-card.pulse {
    animation: pulseRing 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .blt-card.pulse {
        animation: none !important;
    }
}

/* ---- COLOR PILL FOR NAMES ---- */
.blt-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;
    color: #111;
    vertical-align: middle;
}

    .blt-tag.white-belt {
        background: #f1f5f9;
        color: #111;
    }

    .blt-tag.yellow-belt {
        background: #fde047;
        color: #111;
    }

    .blt-tag.orange-belt {
        background: #fb923c;
        color: #111;
    }

    .blt-tag.purple-belt {
        background: #a78bfa;
        color: #fff;
    }

    .blt-tag.brown-belt {
        background: #8b5e3c;
        color: #fff;
    }

    .blt-tag.black-belt {
        background: #111827;
        color: #fff;
    }

/* ---- NARROW PHONES ---- */
@media (max-width: 390px) {
    .belt-map {
        --belt-map-max-item-scale: .92;
    }

    .blt-tag {
        padding: 2px 7px;
        font-size: 11px;
    }

    .blt-info {
        bottom: -7px;
        width: 92px;
    }
}

/* ---- VERY SMALL PHONES ---- */
@media (max-width: 360px) {
    :root {
        --gap: 12px;
    }

    .blt-grid {
        padding: 12px max(8px, env(safe-area-inset-left)) 20px;
    }

    .blt-img {
        width: clamp(62px, 21vw, 76px);
    }
}

/* ---- TABLETS / WIDE ---- */
@media (min-width: 1200px) {
    .blt-grid {
        max-width: var(--page-max);
    }
}
