/* 1SAFETY Course Runtime Language — Release A2 */
.crl-switcher {
    --crl-border: #dfe4ea;
    --crl-bg: #f7f8fa;
    --crl-text: #4c5665;
    --crl-active-bg: #101828;
    --crl-active-text: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.crl-switcher__caption {
    flex: 0 0 auto;
    color: #7b8492;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}
.crl-switcher__options {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding: 3px;
    border: 1px solid var(--crl-border);
    border-radius: 12px;
    background: var(--crl-bg);
}
.crl-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 9px;
    color: var(--crl-text) !important;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.crl-option:hover {
    background: #fff;
    color: #111827 !important;
}
.crl-option.is-active {
    background: var(--crl-active-bg);
    color: var(--crl-active-text) !important;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .16);
}
.crl-option.is-disabled {
    color: #a4abb5 !important;
    cursor: not-allowed;
    opacity: .74;
}
.crl-option.is-disabled small {
    font-size: 9px;
    font-weight: 800;
    opacity: .8;
}
.crl-notice {
    margin-top: 12px;
    padding: 9px 11px;
    border: 1px solid #f2d675;
    border-radius: 10px;
    background: #fff9df;
    color: #7a5b00;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
}

/* Course landing page */
.crl-switcher--course {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #edf0f3;
    flex-wrap: wrap;
}
.crl-switcher--course .crl-switcher__options {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}
.crl-switcher--course .crl-switcher__options::-webkit-scrollbar { display: none; }

/* Lesson player: compact, keeps the current step in place after reload. */
.crl-switcher--player {
    flex: 0 0 auto;
    margin-left: 0;
}
.crl-switcher--player .crl-switcher__options {
    padding: 2px;
    border-radius: 10px;
    background: #f6f7f9;
}
.crl-switcher--player .crl-option {
    min-height: 30px;
    min-width: 36px;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 11px;
}

/* Single-lesson cinematic cover */
.crl-switcher--single {
    position: absolute;
    z-index: 5;
    top: 22px;
    right: 22px;
    --crl-border: rgba(255,255,255,.18);
    --crl-bg: rgba(15,15,18,.50);
    --crl-text: rgba(255,255,255,.78);
    --crl-active-bg: #ffe600;
    --crl-active-text: #111;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
}
.crl-switcher--single .crl-option:hover {
    background: rgba(255,255,255,.10);
    color: #fff !important;
}
.crl-switcher--single .crl-option.is-active {
    color: #111 !important;
}
.crl-switcher--single .crl-option.is-disabled {
    color: rgba(255,255,255,.36) !important;
}

@media (max-width: 700px) {
    .crl-switcher--course {
        display: block;
        margin-top: 14px;
        padding-top: 14px;
    }
    .crl-switcher--course .crl-switcher__caption {
        display: block;
        margin-bottom: 7px;
    }
    .crl-switcher--course .crl-switcher__options {
        display: flex;
        width: 100%;
    }
    .crl-switcher--course .crl-option {
        flex: 1 0 auto;
    }

    .crl-switcher--player {
        order: 2;
        max-width: 46vw;
    }
    .crl-switcher--player .crl-switcher__options {
        max-width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .crl-switcher--player .crl-switcher__options::-webkit-scrollbar { display:none; }
    .crl-switcher--player .crl-option {
        min-width: 34px;
        padding-left: 7px;
        padding-right: 7px;
    }

    .crl-switcher--single {
        top: 14px;
        right: 14px;
    }
}

@media (max-width: 390px) {
    .crl-switcher--player .crl-option { min-width: 31px; padding: 5px 6px; font-size: 10px; }
    .crl-switcher--single { top: 10px; right: 10px; }
}


/* Release A2 cleanup: keep lesson chrome compact and isolate it from legacy badge sizing. */
.ca-topic-bar__badge {
    display: none !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}
.ca-topic-bar {
    gap: 0 !important;
}
.ca-topic-bar__identity {
    min-width: 0 !important;
    width: 100% !important;
}
.ca-topic-bar__title {
    min-width: 0 !important;
}
.crl-switcher--player {
    line-height: 1 !important;
}
