/* Anchor */
.lesson-block > .block-anchor {
    position: absolute;
    left: 0px;
    color: cornflowerblue;
    margin-top: -10px;
    display: none;
}

.lesson-block {
    scroll-margin-top: 75px;
}

.lesson-block>.block-anchor.active-anchor {
    display: block;
}

.anchor-border {
    border: 1px solid darkgray !important;
    border-left: 7px solid cornflowerblue !important;
}

.lesson-block.block-anchor:hover {
    border: 1pt solid rgb(94, 94, 94);
}

.lesson-block.block-anchor:hover>.block-anchor {
    display: block;
    z-index: 1;
    align-self: right;
}

#content-wrapper {
    scroll-margin-top: 20px;
}

.enlighter-default {
    margin-bottom: 0px !important;
}

.open-try-code-editor:hover, .open-code-vis:hover {
    cursor: pointer;
    border: 1pt solid rgba(0, 0, 0, 0.315);
}

.code-block-bg {
    background-color: #f5f5f5;
}

/* Responsive tables inside lessons */
@media (max-width: 767.98px) {
    /* Make lesson tables horizontally scrollable rather than squashing */
    #lesson-content-display table,
    .lesson table,
    .lesson-block table {
        display: block;
        width: 100% !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-collapse: separate; /* keeps cell spacing readable */
        border-spacing: 0;
    }

    #lesson-content-display table thead,
    .lesson table thead,
    .lesson-block table thead {
        white-space: nowrap;
    }

    #lesson-content-display table th,
    #lesson-content-display table td,
    .lesson table th,
    .lesson table td,
    .lesson-block table th,
    .lesson-block table td {
        white-space: nowrap;            /* keep structure */
        padding: .5rem .75rem;          /* improve tap targets */
    }

    /* Optional wrapper class if used in content */
    .table-responsive-mobile {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}