/* Sous-pages intégrées au rail de navigation des fiches camion. */
.test-vehicle-rail-subviews {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem;
    margin-bottom: 0.7rem;
}

.test-vehicle-rail-subviews button {
    min-width: 0;
    min-height: 44px;
    padding: 0.35rem 0.45rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.test-vehicle-rail-subviews button:hover,
.test-vehicle-rail-subviews button:focus-visible {
    border-color: #93c5fd;
    color: var(--primary);
}

.test-vehicle-rail-subviews button.is-active {
    border-color: var(--primary);
    background: #eff6ff;
    color: var(--primary);
}

.test-vehicle-rail-title [data-test-rail-retry] {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
}

.test-vehicle-rail:has(.test-vehicle-rail-subviews) .test-vehicle-rail-list {
    max-height: calc(100dvh - 19rem);
}

@media (min-width: 981px) {
    .test-vehicle-rail {
        position: sticky;
        top: var(--test-workspace-navbar-bottom);
        align-self: start;
        height: calc(100dvh - var(--test-workspace-navbar-bottom));
        min-height: 0;
        display: flex;
        overflow: hidden;
        flex-direction: column;
    }

    body.test-workspace-ui .test-version-bar + .main-content .test-vehicle-rail {
        top: calc(var(--test-workspace-navbar-bottom) + 38px);
        height: calc(100dvh - var(--test-workspace-navbar-bottom) - 38px);
    }

    .test-vehicle-rail-header {
        flex: 0 0 auto;
    }

    .test-vehicle-rail .test-vehicle-rail-list,
    .test-vehicle-rail:has(.test-vehicle-rail-subviews) .test-vehicle-rail-list {
        min-height: 0;
        max-height: none;
        flex: 1 1 auto;
    }
}
