/* Shared calendar browsing row for Progress and the leaderboard. */
.period-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
}

.period-nav__stepper {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: .75rem;
    width: 100%;
    max-width: 26rem;
}

.period-nav__label {
    grid-column: 2;
    text-align: center;
    min-width: 0;
}

.period-nav__range {
    font-size: .8rem;
    color: var(--text-muted);
}

.period-nav__title {
    font-size: 1rem;
    font-weight: 600;
}

.period-nav__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    width: 44px;
    height: 44px;
    color: var(--text);
    background: var(--surface-2);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}

.period-nav__arrow:disabled,
.period-nav__arrow[aria-disabled="true"] {
    opacity: .35;
    cursor: default;
}

.period-nav__back-icon {
    transform: rotate(180deg);
}

.period-nav__current {
    text-decoration: none;
    font: inherit;
    padding: .45rem .8rem;
    min-height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    transition: border-color .15s;
    cursor: pointer;
}

.period-nav__current:hover,
.period-nav__current:focus-visible {
    border-color: var(--text-muted);
}

.period-nav__current:disabled {
    opacity: .35;
    cursor: default;
}

.period-nav [hidden] {
    display: none;
}

@media (min-width: 701px) {
    .period-nav {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        min-height: 60px;
        gap: .75rem;
    }

    .period-nav__stepper {
        grid-column: 2;
        width: 26rem;
        max-width: 100%;
    }

    .period-nav__current {
        grid-column: 3;
        justify-self: end;
    }
}
