/* ==========================================================================
   skins/band.css — the walking pace band. Horizontal rather than a gauge face,
   colour-coded the way activity guidance codes intensity.
   ========================================================================== */

[data-skin=band] {
    --band-stroll: #8ab4f8;
    --band-average: #5bb974;
    --band-brisk: #f2a63b;
    --band-power: #e8674c;
    --chart-line: #5bb974;
}

.hero--band {
    max-width: 520px;
    align-items: stretch;
}

.band-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.band-label {
    font-size: clamp(1.3rem, 5.5vw, 1.9rem);
    font-weight: 500;
    letter-spacing: -.01em;
}

.band-label[data-band=stroll] {
    color: var(--band-stroll);
}

.band-label[data-band=average] {
    color: var(--band-average);
}

.band-label[data-band=brisk] {
    color: var(--band-brisk);
}

.band-label[data-band=power] {
    color: var(--band-power);
}

.band-speed {
    font-family: var(--font-mono);
    font-size: clamp(1.6rem, 7vw, 2.4rem);
    font-weight: 500;
    font-feature-settings: "tnum";
    white-space: nowrap;
}

.band-speed i {
    font-size: .8rem;
    font-style: normal;
    font-weight: 400;
    color: var(--text-color-secondary);
    margin-left: 4px;
}

/* ---------------- the scale ---------------- */
.band-scale {
    width: 100%;
    padding-top: 4px;
}

.band-zones {
    display: flex;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
}

.band-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .625rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .95);
    white-space: nowrap;
    overflow: hidden;
    padding: 0 4px;
}

/* Widths follow the band edges as a share of the 9 km/h scale in band.js:
   3.8, 5.5 and 7.0 km/h. */
.band-zone--stroll {
    flex: 0 0 42%;
    background: var(--band-stroll);
}

.band-zone--average {
    flex: 0 0 19%;
    background: var(--band-average);
}

.band-zone--brisk {
    flex: 0 0 17%;
    background: var(--band-brisk);
}

.band-zone--power {
    flex: 1 1 auto;
    background: var(--band-power);
}

.band-marker {
    position: absolute;
    top: -6px;
    width: 4px;
    height: 56px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--text-color);
    box-shadow: 0 0 0 2px var(--bg-color);
    transition: left .3s cubic-bezier(.22, 1, .36, 1);
}

.band-marker::after {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid var(--text-color);
}

.band-ticks {
    position: relative;
    height: 20px;
    margin-top: 6px;
}

.band-tick {
    position: absolute;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: .75rem;
    font-weight: 500;
    color: var(--text-color-secondary);
}

/* ---------------- legend ---------------- */
.band-legend {
    display: none;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 12px;
    font-size: .8125rem;
    color: var(--text-color-secondary);
}

.band-legend span {
    display: inline-flex;
    align-items: center;
}

.band-key {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 6px;
    flex-shrink: 0;
}

.band-key--stroll {
    background: var(--band-stroll);
}

.band-key--average {
    background: var(--band-average);
}

.band-key--brisk {
    background: var(--band-brisk);
}

.band-key--power {
    background: var(--band-power);
}

.band-note {
    font-size: .875rem;
    line-height: 1.5;
    color: var(--text-color-secondary);
    margin-top: 12px;
    min-height: 2.6em;
}

/* ---------------- figures ---------------- */
.band-figures {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 4px;
}

.band-fig {
    padding: 10px 8px;
    border-radius: 12px;
    background: var(--surface-raised);
    text-align: center;
}

.band-fig .k {
    display: block;
    font-size: .625rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-color-secondary);
    margin-bottom: 3px;
}

.band-fig .v {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.0625rem;
    font-weight: 500;
    font-feature-settings: "tnum";
}

@media (prefers-reduced-motion: reduce) {
    .band-marker {
        transition: none;
    }
}

@media (max-width:560px) {

    /* The zones become a pure colour scale and the legend below names them,
       rather than squeezing four words into four narrow blocks. */
    .band-zone {
        font-size: 0;
    }

    .band-legend {
        display: flex;
    }

    .band-zones {
        height: 34px;
    }

    .band-marker {
        height: 46px;
    }
}
