/* C++ programming — Prev / Next topic navigation (top + bottom) */
.cpp-page-nav {
    margin: 1.25rem 0;
}

.cpp-page-nav-top {
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
}

.cpp-page-nav-bottom {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.cpp-page-nav-inner {
    width: 100%;
}

.cpp-page-nav-side {
    flex: 1 1 220px;
    min-width: 0;
    display: flex;
    align-items: center;
}

.cpp-page-nav-side-prev {
    justify-content: flex-start;
}

.cpp-page-nav-side-next {
    justify-content: flex-end;
}

.cpp-page-nav-center {
    flex: 1 1 160px;
    text-align: center;
    padding: 0.35rem 0.5rem;
    align-self: center;
}

.cpp-page-nav-current-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
    color: #6c757d;
}

.cpp-page-nav-current-title {
    font-size: 0.95rem;
    color: #003153;
    font-weight: 700;
}

.cpp-page-nav-link {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    max-width: 100%;
    text-align: left;
    text-decoration: none;
    line-height: 1.35;
    border-color: #00599c;
    color: #00599c;
}

.cpp-page-nav-link:hover {
    background-color: #e6f2ff;
    border-color: #004482;
    color: #004482;
}

.cpp-page-nav-side-next .cpp-page-nav-link {
    text-align: right;
    justify-content: flex-end;
}

.cpp-page-nav-btn-label {
    font-weight: 600;
    white-space: nowrap;
}

.cpp-page-nav-topic {
    font-weight: 500;
    color: inherit;
    opacity: 0.95;
    word-break: break-word;
}

.cpp-page-nav-placeholder {
    pointer-events: none;
    opacity: 0.55;
}

@media (max-width: 768px) {
    .cpp-page-nav-center {
        order: -1;
        flex: 1 1 100%;
        margin-bottom: 0.25rem;
    }

    .cpp-page-nav-side {
        flex: 1 1 100%;
    }

    .cpp-page-nav-side-next {
        justify-content: flex-start;
    }

    .cpp-page-nav-side-next .cpp-page-nav-link {
        text-align: left;
        justify-content: flex-start;
    }
}
