/*
 * strava-brand.css — sizing for Strava's supplied mark and its text fallback.
 *
 * .sr-only is NOT defined here: styles/main.css already ships it and
 * strava-brand.js reuses that class by name. Two definitions would be one too many.
 */

:root {
    --strava-orange: #fc4c02;
}

/* ---- Badge ------------------------------------------------------------- */

.strava-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    vertical-align: middle;
}

.strava-badge__logo {
    display: block;
    width: auto;
    height: 14px;
    max-width: 100%;
}

/*
 * The artwork may not be on disk yet. Hiding the image until 'load' confirms it
 * decoded means a 404 never paints the browser's broken-image glyph next to a
 * route name; the 'error' handler then removes it and reveals the label instead.
 * visibility rather than display so the row's baseline does not shift twice.
 */
.strava-badge--pending .strava-badge__logo {
    visibility: hidden;
}

/*
 * Fallback state: the same box as .route-card__day-badge it sits beside, in
 * Strava orange so the brand still reads when the mark itself is unavailable.
 */
.strava-badge--text .strava-badge__label {
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 4px;
    color: #fff;
    background: var(--strava-orange, #fc4c02);
    font-size: 11px;
    line-height: 1.4;
    white-space: nowrap;
}

/* ---- "Powered by Strava" attribution ----------------------------------- */

.strava-attribution {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 11px;
    line-height: 1.4;
}

.strava-attribution__logo {
    display: block;
    width: auto;
    height: 12px;
    max-width: 100%;
}

.strava-attribution--pending .strava-attribution__logo {
    visibility: hidden;
}

.strava-attribution--text .strava-attribution__label {
    color: var(--strava-orange, #fc4c02);
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
