/* Legacy max-width syntax keeps these rules working in older Safari versions. */
/* stylelint-disable media-feature-range-notation */

/* Preserve the original grid cell even while its one existing link is docked. */
@media (max-width: 767px) {
    .mobile-bottom-actions > .question-next-slot {
        display: flex;
        min-width: 0;
        min-height: 32px;
    }

    .question-nav-chevron {
        display: block;
        flex: none;
        width: 16px;
        height: 16px;
    }

    .question-next-slot > a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2px;
        box-sizing: border-box;
        min-height: 32px;
        height: 32px;
        padding: 0 0.35rem;
        font-size: 0.8125rem;
        line-height: 1.2;
        font-weight: 600;
        white-space: nowrap;
    }
}

.mobile-grade-short { display: none; }

@media screen and (max-width: 480px) {
    .mobile-bottom-actions.mobile-bottom-actions > button,
    .mobile-bottom-actions.mobile-bottom-actions > a {
        padding-left: 2px;
        padding-right: 2px;
        white-space: nowrap;
    }

    .mobile-grade-full, .mobile-previous-label, .question-next-slot > a:not([data-docked]) .mobile-next-label { display: none; }
    .mobile-grade-short { display: inline; }
}

@media screen and (max-width: 767px) {
    .question-next-slot > a[data-docked] {
        position: fixed;
        right: 16px;
        right: max(16px, env(safe-area-inset-right, 0px));
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
        z-index: 40;
        width: 72px;
        min-height: 44px;
        height: 44px;
    }
}
/* stylelint-enable media-feature-range-notation */
