﻿/* Learn.Master wrapper â€” explorer layout uses css/ar/QuranExplorer.css (.body-content). */

.qe-learn-root {
    background-color: #F0F0E6;
}

.qe-learn-root .body-content {
    direction: ltr;
    min-width:600px;
}

/* English Learn: match Arabic — no forced min-height (was causing page scrollbar) */
.qe-learn-root.qe-lang-en.qe-section-learn .body-content {
    min-height: 0;
    padding-top: 0;
}


.qe-learn-root .body-content .container-fluid,
.qe-learn-root .header .navbar {
    padding-left: 20px;
    padding-right: 20px;
    margin: 0 auto;
    max-width:1800px;
}

/* Compact Learn popup headers — match Tajweed sample (close + title, ~48px) */
.qe-learn-root .popup .modal-header,
.qe-learn-chrome-modal .modal-header,
#TajweedLessonsPopup .modal-header,
#MasabqatPopup.qe-masabqat-modal .modal-header,
#QotdPopup.qe-masabqat-modal .modal-header,
.clipboard-quiz-modal .modal-header,
.qe-tms-popup .modal-header,
.qe-adhoc-popup .modal-header,
.qe-mic-modal .modal-header,
.qe-speaker-modal .modal-header,
.qe-profile-modal .modal-header,
.qe-settings-style-modal.popup .modal-header,
.qe-panel-expand-modal .modal-header,
#asgnTeacherFeedbackModal .asgn-feedback-header,
#onlineMeetingMaintModal .online-meeting-maint-header,
#asgnUploadPrefsModal .asgn-upload-prefs-header,
.qe-ca-head,
.qe-ca-sheet-toolbar,
.qe-ca-choose-head,
.tajweed-missing-popup-head,
.qe-tasgn-next-head,
.qe-tasgn-noassign-head,
.qe-tasgn-mark-head,
.qe-classroom-lobby-header {
    padding: 8px 16px !important;
    min-height: 0;
}

.qe-learn-root .popup .modal-header .modal-title,
.qe-settings-style-modal .modal-title,
.qe-panel-expand-modal .modal-title,
.qe-mic-modal .modal-header .modal-title,
.qe-speaker-modal .modal-header .modal-title,
.qe-profile-modal .modal-header .modal-title,
.qe-ca-head h5,
.qe-ca-choose-head h5,
#asgnUploadPrefsModal .asgn-upload-prefs-header .modal-title {
    font-size: 16px !important;
    line-height: 20px !important;
    font-weight: 700;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal .modal-header .close,
.qe-learn-root.qe-lang-ar .qe-panel-expand-modal .modal-header .close,
.qe-learn-root.qe-lang-en .qe-panel-expand-modal .modal-header .close {
    margin: 0 !important;
}

.qe-settings-style-modal .modal-header .close,
.qe-panel-expand-modal .modal-header .close,
.qe-mic-modal .modal-header .close,
.qe-speaker-modal .modal-header .close,
.qe-profile-modal .modal-header .close {
    width: 32px !important;
    height: 32px !important;
    line-height: 1 !important;
    font-size: 22px !important;
    overflow: hidden;
}

/* Header — 3 equal sections: brand | center nav | account */
.qe-learn-root .header {
    background-color: #4B3000;
}

.qe-learn-root .header .qe-header-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
}

.qe-learn-root .header .qe-header-nav > div {
    padding-left: 0;
    padding-right: 0;
}

.qe-learn-root .header .qe-header-start {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.qe-learn-root .header .qe-header-main {
    align-items: center;
}

.qe-learn-root .header .qe-section-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.15rem;
    margin: 0;
}

.qe-learn-root .header .qe-section-nav > .nav-item {
    display: flex;
    align-items: center;
}

.qe-learn-root .header .navbar-light .navbar-nav .nav-link {
    color: #fff;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 15px;
    font-weight: normal;
    letter-spacing: 0.3px;
    padding: 0.25rem 2rem;
    border: 1px solid transparent;
    border-radius: 20px;
}

.qe-learn-root.qe-lang-en .header .navbar-light .navbar-nav .nav-link {
    font-family: 'Vazirmatn', sans-serif;
    letter-spacing: 0;
}

.qe-learn-root .header .navbar-light .navbar-nav .nav-link.active {
    color: #4B3000;
    background: #FFFBF3;
}

.qe-learn-root .header .navbar-light .navbar-nav .nav-link:hover {
    border: 1px solid #fff;
}

.qe-learn-root .header .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.45);
    margin-left: auto;
}

.qe-learn-root.qe-lang-ar .header .navbar-toggler {
    margin-left: 0;
    margin-right: auto;
}

.qe-learn-root .header .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

.qe-learn-root .header .home-link {
    color: #fff;
    white-space: nowrap;
    margin-right: 10px !important;
}

.qe-learn-root.qe-lang-en .header .home-link {
    margin-right: 0 !important;
    margin-left: 10px !important;
}

.qe-learn-root .header .qe-account-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
    gap: 0.5rem;
    margin: 0;
}

.qe-learn-root.qe-lang-ar .header .qe-header-user {
    flex-direction: row-reverse;
}

/* English: Search → Notification → User (left to right) */
.qe-learn-root.qe-lang-en .header .qe-header-user {
    flex-direction: row-reverse;
}

.qe-learn-root .header .qe-account-nav > .nav-item {
    display: flex;
    align-items: center;
}

/* Desktop: true 3-column layout — center stays centered (no absolute) */
@media screen and (min-width: 992px) {
    .qe-learn-root .header .qe-header-nav {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: 0.75rem;
    }

    .qe-learn-root .header .qe-header-start {
        grid-column: 1;
        justify-self: start;
        flex: none;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .qe-learn-root .header .navbar-toggler {
        display: none;
    }

    .qe-learn-root .header .qe-header-main.navbar-collapse {
        display: contents !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .qe-learn-root .header .qe-section-nav {
        grid-column: 2;
        justify-self: center;
        margin: 0 !important;
        position: static !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
    }

    .qe-learn-root .header .qe-account-nav {
        grid-column: 3;
        justify-self: end;
        margin: 0 !important;
    }
}

/* Language trigger — matches header brown */
.qe-learn-root .header .qe-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.8rem;
    background: #4B3000;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    border-radius: 6px;
    color: #fff;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, color 0.18s;
    outline: none;
    white-space: nowrap;
}
.qe-learn-root .header .qe-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.95rem;
    background: #fff;
    border: 1.5px solid rgba(75, 48, 0, 0.28);
    border-radius: 6px;
    color: #4B3000;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, color 0.18s;
}

.qe-learn-root .header .qe-login-btn:hover,
.qe-learn-root .header .qe-login-btn:focus {
    background: #FFF8EE;
    border-color: #4B3000;
    color: #4B3000;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(75, 48, 0, 0.12);
}

/* Logged-in header user block (replaces login button) */
.qe-learn-root .header .qe-header-user-item {
    display: flex;
    align-items: center;
}

.qe-learn-root .header .qe-header-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.qe-learn-root .header .qe-header-search-wrap {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    position: relative;
}

.qe-learn-root .header .qe-header-search-wrap .qe-header-search {
    order: 1;
}

/* Open the field to the left of the icon without shifting the icon */
.qe-learn-root .header .qe-header-search-wrap .qe-header-search-input:not(.d-none) {
    position: absolute;
    right: calc(100% + 0.4rem);
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1061;
}

.qe-learn-root .header .qe-header-search,
.qe-learn-root .header .qe-header-notify {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    opacity: 0.95;
    text-decoration: none;
    flex-shrink: 0;
}

.qe-learn-root .header .qe-header-search img,
.qe-learn-root .header .qe-header-notify img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.qe-learn-root .header .qe-header-search-input {
    width: 180px;
    max-width: min(180px, 28vw);
    height: 32px;
    margin: 0;
    padding: 0.2rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 6px;
    background: #fff;
    color: #4B3000;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.85rem;
    box-shadow: none;
    outline: none;
}

.qe-learn-root .header .qe-header-search-input::placeholder {
    color: #8a8178;
}

.qe-learn-root .header .qe-header-search-input:focus {
    background: #fff;
    border-color: #fff;
    color: #4B3000;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.qe-learn-root.qe-lang-ar .header .qe-header-search-input {
    text-align: right;
}

.qe-learn-root .header .qe-header-notify {
    position: relative;
}

/* Mid widths: open search field under the icon (avoids squeezing the header) */
@media screen and (max-width: 1330px) and (min-width: 991px) {
    .qe-learn-root .header,
    .qe-learn-root .header .qe-header-nav,
    .qe-learn-root .header .qe-account-nav,
    .qe-learn-root .header .qe-header-user,
    .qe-learn-root .header .qe-header-user-item {
        overflow: visible;
    }

    .qe-learn-root .header .qe-header-search-wrap {
        position: relative;
        z-index: 1060;
    }

    .qe-learn-root .header .qe-header-search-wrap .qe-header-search-input,
    .qe-learn-root .header .qe-header-search-input:not(.d-none) {
        position: absolute;
        top: calc(100% + 8px);
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 210px;
        max-width: min(210px, 70vw);
        z-index: 1061;
        border: 1px solid rgba(75, 48, 0, 0.18);
        box-shadow:
            0 10px 28px rgba(0, 0, 0, 0.32),
            0 2px 8px rgba(75, 48, 0, 0.18);
    }

    .qe-learn-root .header .qe-header-search-input:focus {
        border-color: rgba(75, 48, 0, 0.35);
        box-shadow:
            0 12px 32px rgba(0, 0, 0, 0.36),
            0 2px 10px rgba(75, 48, 0, 0.22);
    }
}

.qe-learn-root .header .qe-notify-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    z-index: 1;
}

.qe-learn-root .header .qe-user-dropdown {
    position: relative;
}

.qe-learn-root .header .qe-user-info {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #fff;
}

.qe-learn-root .header .qe-user-info.dropdown-toggle::after {
    display: none;
}

.qe-learn-root .header .qe-user-avatar-wrap {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.qe-learn-root .header .qe-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: #fff;
}

.qe-learn-root .header .qe-user-online-dot {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #9AA0A6;
    border: 2px solid var(--primary-color, #4B3000);
    box-sizing: border-box;
}

.qe-learn-root .header .qe-user-online-dot.qe-presence-connected {
    background: #27B251;
}

.qe-learn-root .header .qe-user-text {
    text-align: right;
    line-height: 1.15;
}

.qe-learn-root.qe-lang-en .header .qe-user-text {
    text-align: left;
}

.qe-learn-root .header .qe-user-name {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    font-size: 15px;
    color: #fff;
    margin: 0;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qe-learn-root .header .qe-user-status {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: #27B251;
}

.qe-learn-root .header .qe-user-dropdown {
    position: relative;
}

.qe-learn-root .header .qe-user-menu {
    min-width: 240px;
    max-width: calc(100vw - 24px);
    padding: 6px 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    /* The profile button sits at the far-left of the RTL header. Popper can
       resolve "start" as the right side on RTL pages, which right-anchors
       the menu and pushes it off the left edge of the viewport, forcing a
       horizontal scrollbar. Force plain CSS positioning — directly under
       the toggle, expanding rightward — instead of trusting Popper's
       computed transform/left/right for this specific menu. */
    position: absolute !important;
    inset: auto !important;
    transform: none !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    margin-top: 0.5rem !important;
}

/* English: profile sits on the far right — right-anchor the menu so it opens
   leftward and does not overflow the viewport / create a horizontal scrollbar. */
.qe-learn-root.qe-lang-en .header .qe-user-menu {
    left: auto !important;
    right: 0 !important;
}

/* Profile dropdown — menu rows. Icon + label are grouped together as a
   single unit on the row's leading side (right in RTL, left in LTR),
   following normal DOM order (icon markup comes first) — the browser's
   own bidi handling of "display: flex" already places the first child on
   the leading edge, so this follows the page's "dir" automatically instead
   of needing manual left/right overrides. */
.qe-learn-root .header .qe-user-menu-item,
.qe-learn-root .header .qe-user-menu-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 18px;
    background: transparent;
    border: 0;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: #383433;
    cursor: pointer;
    white-space: nowrap;
    text-align: right;
}

.qe-learn-root .header .qe-user-menu-item + .qe-user-menu-item,
.qe-learn-root .header .qe-user-status-toggle + .qe-user-menu-item {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.qe-learn-root .header .qe-user-menu-item:hover,
.qe-learn-root .header .qe-user-menu-item:focus,
.qe-learn-root .header .qe-user-menu-row:hover,
.qe-learn-root .header .qe-user-menu-row:focus,
.qe-learn-root .header .qe-user-status-toggle.show .qe-user-menu-row {
    background-color: #F9F4EB;
    color: #5C4010;
    outline: none;
}

.qe-learn-root .header .qe-user-menu-icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    line-height: 1;
    color: inherit;
    pointer-events: none;
}

.qe-learn-root .header .qe-user-menu-label {
    flex: 0 0 auto;
    display: inline;
    pointer-events: none;
}

.qe-learn-root .header .qe-user-menu-status {
    flex: 0 0 auto;
    margin-inline-start: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 0.85rem;
    line-height: 1;
    pointer-events: none;
}

.qe-learn-root .header .qe-mic-status-ok {
    color: #28a745;
}

.qe-learn-root .header .qe-mic-status-denied {
    color: #dc3545;
}

/* Microphone settings modal */
.qe-mic-modal .modal-content {
    border-radius: 10px;
    border: 1px solid rgba(75, 48, 0, 0.12);
    overflow: hidden;
}

.qe-mic-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #4b3000;
    color: #fff;
    border-bottom: 0;
    padding: 8px 16px;
}

.qe-mic-modal .modal-header .modal-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.qe-mic-modal .modal-header .close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #fff;
    opacity: 0.9;
    text-shadow: none;
    padding: 0;
    margin: 0;
    float: none;
    position: static;
    flex-shrink: 0;
    line-height: 1;
    font-size: 1.5rem;
}

.qe-mic-modal .modal-header .close span {
    display: block;
    line-height: 1;
}

.qe-mic-modal .modal-header .close:hover,
.qe-mic-modal .modal-header .close:focus {
    color: #fff;
    opacity: 1;
}

/* Arabic: title on the right, close (×) on the far left */
.qe-learn-root.qe-lang-ar .qe-mic-modal .modal-header,
.qe-learn-root.qe-lang-ar .qe-speaker-modal .modal-header,
.qe-learn-root.qe-lang-ar .qe-profile-modal .modal-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    direction: ltr !important;
}

.qe-learn-root.qe-lang-ar .qe-mic-modal .modal-header .close,
.qe-learn-root.qe-lang-ar .qe-speaker-modal .modal-header .close,
.qe-learn-root.qe-lang-ar .qe-profile-modal .modal-header .close {
    order: 1 !important;
    margin: 0 !important;
    float: none !important;
    position: static !important;
}

.qe-learn-root.qe-lang-ar .qe-mic-modal .modal-header .modal-title,
.qe-learn-root.qe-lang-ar .qe-speaker-modal .modal-header .modal-title,
.qe-learn-root.qe-lang-ar .qe-profile-modal .modal-header .modal-title {
    order: 2 !important;
    flex: 1 1 auto !important;
    text-align: right !important;
}

/* English: title left, close right */
.qe-learn-root.qe-lang-en .qe-mic-modal .modal-header,
.qe-learn-root.qe-lang-en .qe-speaker-modal .modal-header,
.qe-learn-root.qe-lang-en .qe-profile-modal .modal-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    direction: ltr !important;
}

.qe-learn-root.qe-lang-en .qe-mic-modal .modal-header .modal-title,
.qe-learn-root.qe-lang-en .qe-speaker-modal .modal-header .modal-title,
.qe-learn-root.qe-lang-en .qe-profile-modal .modal-header .modal-title {
    order: 1;
    flex: 1 1 auto;
    text-align: left;
}

.qe-learn-root.qe-lang-en .qe-mic-modal .modal-header .close,
.qe-learn-root.qe-lang-en .qe-speaker-modal .modal-header .close,
.qe-learn-root.qe-lang-en .qe-profile-modal .modal-header .close {
    order: 2;
    margin: 0 0 0 auto !important;
    float: none !important;
    position: static !important;
}

.qe-mic-modal .modal-header,
.qe-mic-modal .modal-body,
.qe-mic-modal .modal-footer {
    font-family: 'Vazirmatn', sans-serif;
}

.qe-learn-root.qe-lang-ar .qe-mic-modal .modal-body,
.qe-learn-root.qe-lang-ar .qe-speaker-modal .modal-body,
.qe-learn-root.qe-lang-ar .qe-mic-modal .modal-footer,
.qe-learn-root.qe-lang-ar .qe-speaker-modal .modal-footer {
    direction: rtl;
    text-align: right;
}

.qe-learn-root.qe-lang-en .qe-mic-modal .modal-body,
.qe-learn-root.qe-lang-en .qe-speaker-modal .modal-body,
.qe-learn-root.qe-lang-en .qe-mic-modal .modal-footer,
.qe-learn-root.qe-lang-en .qe-speaker-modal .modal-footer {
    direction: ltr;
    text-align: left;
}

.qe-mic-modal .qe-mic-permission-text {
    margin: 0 0 0.85rem;
    color: #5c4a3a;
    line-height: 1.5;
}

.qe-mic-modal .qe-mic-allow-btn {
    margin-bottom: 0.85rem;
}

.qe-mic-modal .qe-mic-alert {
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    font-size: 0.88rem;
    line-height: 1.4;
}

.qe-mic-modal .qe-mic-alert-error {
    background: #fdecea;
    border: 1px solid #f5c2c0;
    color: #8a1f1b;
}

.qe-mic-modal .qe-mic-alert-success {
    background: #eaf6ea;
    border: 1px solid #b7dfb9;
    color: #1e6b24;
}

.qe-mic-modal .qe-mic-device-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.qe-mic-modal .qe-mic-device-header .qe-mic-device-label {
    margin: 0;
}

.qe-mic-modal .qe-mic-refresh-btn {
    flex: 0 0 auto;
    padding: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: #4B3000;
    text-decoration: none;
}

.qe-mic-modal .qe-mic-refresh-btn:hover,
.qe-mic-modal .qe-mic-refresh-btn:focus {
    color: #2f1f00;
    text-decoration: underline;
}

.qe-mic-modal .qe-mic-device-hint {
    margin: 0 0 0.65rem;
    font-size: 0.86rem;
    line-height: 1.45;
    color: #6b5a48;
}

.qe-mic-modal .qe-mic-device-label {
    display: block;
    margin: 0 0 0.5rem;
    font-weight: 600;
    color: #383433;
}

.qe-mic-modal .qe-mic-device-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 220px;
    overflow-y: auto;
}

.qe-mic-modal .qe-mic-device-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(75, 48, 0, 0.12);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.qe-mic-modal .qe-mic-device-option:hover {
    background: #f9f4eb;
}

.qe-mic-modal .qe-mic-device-empty {
    margin: 0;
    color: #6b5a48;
    font-size: 0.92rem;
}

/* Pushed away from the icon+label group to the row's far (trailing) edge —
   "margin-inline-start: auto" absorbs the row's free space right after the
   label, regardless of the page's "dir". */
.qe-learn-root .header .qe-user-menu-caret {
    flex: 0 0 auto;
    margin-inline-start: auto;
    display: inline-flex;
    font-size: 0.7rem;
    line-height: 1;
    color: inherit;
    opacity: 0.55;
}

.qe-learn-root .header .qe-logout-btn {
    color: #4B3000;
}

/* The status row is a plain positioning wrapper; the button inside it carries
   all the visual row styling (avoids nesting two flex rows on top of each other). */
.qe-learn-root .header .qe-user-status-toggle {
    position: relative;
}

/* Status flyout — opens to the physical right of the row. */
.qe-learn-root .header .qe-user-status-submenu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 8px;
    min-width: 170px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    padding: 6px 0;
    z-index: 1071;
}

.qe-learn-root .header .qe-user-status-toggle.show .qe-user-status-submenu {
    display: block;
}

.qe-learn-root .header .qe-status-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 16px;
    background: transparent;
    border: 0;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
    color: #383433;
    cursor: pointer;
    white-space: nowrap;
    text-align: right;
}

.qe-learn-root .header .qe-status-option:hover,
.qe-learn-root .header .qe-status-option:focus,
.qe-learn-root .header .qe-status-option.is-active {
    background-color: #F9F4EB;
    color: #5C4010;
    outline: none;
}

.qe-learn-root .header .qe-status-label {
    flex: 0 0 auto;
    display: inline;
}

/* Presence dots are drawn with plain CSS shapes (no icon-font glyphs) —
   at 18px, tiny icon-font glyphs (moon, minus, ...) render as blurry,
   jagged blobs, so each state's mark is built from simple borders/shadows
   that stay crisp at any size. */
.qe-learn-root .header .qe-status-icon {
    position: relative;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    box-sizing: border-box;
    overflow: hidden;
}

.qe-learn-root .header .qe-status-icon.qe-status-active {
    background: #27B251;
}

/* Checkmark: the bottom-left corner of a small box, rotated. */
.qe-learn-root .header .qe-status-icon.qe-status-active::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 6px;
    width: 7px;
    height: 4px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
}

.qe-learn-root .header .qe-status-icon.qe-status-away {
    background: #F5A623;
}

/* Crescent moon: an off-center white circle "bites into" the orange dot,
   clipped back to a circle by the parent's own border-radius+overflow. */
.qe-learn-root .header .qe-status-icon.qe-status-away::after {
    content: '';
    position: absolute;
    left: -2px;
    top: -4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
}

.qe-learn-root .header .qe-status-icon.qe-status-busy {
    background: #E5484D;
}

/* Dash. */
.qe-learn-root .header .qe-status-icon.qe-status-busy::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 8px;
    width: 10px;
    height: 2px;
    border-radius: 1px;
    background: #fff;
}

.qe-learn-root .header .qe-status-icon.qe-status-offline {
    background: #fff;
    border: 2px solid #d8d0c0;
}

/* Avatar dot is the WebSocket presence connection indicator (gray / green).
   Chosen Active/Away/Busy/Inactive status is shown in the submenu icons only. */

.qe-auth-error {
    margin: 0;
    padding: 8px 12px;
    border-radius: 5px;
    background: #fdecea;
    color: #c62828;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 12px;
    line-height: 1.4;
    text-align: right;
}

.qe-learn-root.qe-lang-en .qe-auth-error {
    text-align: left;
}

.qe-auth-error.is-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.qe-auth-field.is-invalid .qe-auth-input {
    border-color: #c62828;
}

.qe-auth-field-error {
    margin: 4px 0 0;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 11px;
    line-height: 1.35;
    color: #c62828;
    text-align: right;
}

.qe-learn-root.qe-lang-en .qe-auth-field-error {
    text-align: left;
}

.qe-auth-form.is-busy .qe-auth-submit {
    opacity: 0.75;
    cursor: wait;
}

@media screen and (max-width: 575px) {
    .qe-learn-root .header .qe-user-name {
        max-width: 96px;
        font-size: 13px;
    }

    .qe-learn-root .header .qe-header-user {
        gap: 0.4rem;
    }
}

/* ── Auth modal — Figma Login Screen 7:80 (card 7:84 white, art 7:86) ── */
.qe-auth-modal .modal-dialog.qe-auth-dialog {
    /* Scale with viewport while keeping Figma 1190×749 proportion */
    width: min(1190px, calc(100vw - 24px), calc((100vh - 24px) * 1190 / 749));
    max-width: min(1190px, calc(100vw - 24px));
    margin: 0.75rem auto;
}

.qe-auth-modal .qe-auth-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff; /* Figma 7:84 */
    box-shadow: 0 16px 48px rgba(75, 48, 0, 0.18);
    position: relative;
    width: 100%;
    max-height: calc(100vh - 24px);
    height: auto;
    display: flex;
    flex-direction: column;
}

.qe-auth-modal .qe-auth-close {
    position: absolute;
    top: 14px;
    left: 16px;
    z-index: 5;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #9a9a9a;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
}

.qe-learn-root.qe-lang-en .qe-auth-modal .qe-auth-close {
    left: auto;
    right: 16px;
}

.qe-auth-modal .qe-auth-close:hover,
.qe-auth-modal .qe-auth-close:focus {
    opacity: 1;
    color: #4B3000;
    outline: none;
}

.qe-auth-layout {
    display: flex;
    flex-direction: row;
    direction: ltr;
    align-items: stretch;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100vh - 24px);
    background: #ffffff;
    overflow: hidden;
}

/* Illustration column — Figma 7:86 is 500×500 inside white card */
.qe-auth-visual {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 30px; /* ~80px sides on 1190 card */
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.qe-auth-illustration {
    width: min(500px, 100%);
    height: auto;
    aspect-ratio: 1 / 1;
    max-height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}

/* Form column — Figma Frame 45806: 452×561 */
.qe-auth-panel {
    flex: 0 0 auto;
    width: min(550px, 45%);
    max-width: 550px;
    padding: 30px; /* ~47 top / 60 right / 34 bottom on 749h */
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    direction: rtl;
    background: #ffffff;
    min-height: 0;
    max-height: 100%;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.qe-learn-root.qe-lang-en .qe-auth-panel {
    direction: ltr;
    /* Balanced L/R inset so labels/inputs/button share one vertical axis */
    padding: 48px 60px 34px 60px;
}

.qe-auth-logo {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    object-fit: contain;
    z-index: 1;
    pointer-events: none;
}

.qe-learn-root.qe-lang-en .qe-auth-logo {
    right: auto;
    left: 5%;
    top: 6.3%;
}

.qe-auth-view {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    padding-top: 80px; /* clear 60px logo + gap */
}

.qe-auth-view.d-none {
    display: none !important;
}

.qe-auth-titles {
    text-align: right;
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.qe-learn-root.qe-lang-en .qe-auth-titles {
    text-align: left;
}

.qe-auth-title {
    margin: 0;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 24px;
    color: #383433;
}

.qe-auth-subtitle {
    margin: 0;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #615e5e;
}

.qe-auth-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 16px;
    width: 100%;
    min-height: 0;
}

/* Login: Figma gap 151px between fields block and sign-in — shrinks with viewport */
.qe-auth-form-login {
    gap: clamp(28px, 14vh, 151px);
    justify-content: space-between;
}

.qe-auth-fields {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
}

.qe-auth-actions {
    margin-top: 0;
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    width: 100%;
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    z-index: 3;
    background: #ffffff;
    pointer-events: auto;
}

.qe-auth-form-login .qe-auth-actions {
    margin-top: 0;
}

.qe-auth-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}

.qe-auth-field label {
    margin: 0;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 32px;
    color: #383433;
    text-align: right;
}

.qe-learn-root.qe-lang-en .qe-auth-field label {
    text-align: left;
}

.qe-auth-input {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 48px;
    border: none;
    border-radius: 5px;
    background: #f6f6f6;
    padding: 0 14px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: #383433;
    outline: none;
    box-shadow: none;
    box-sizing: border-box;
    /* Keep field RTL; plaintext lets cursor/bidi follow Arabic vs English while typing */
    direction: rtl;
    text-align: right;
    unicode-bidi: plaintext;
}

.qe-learn-root.qe-lang-en .qe-auth-input {
    direction: ltr;
    text-align: left;
    unicode-bidi: plaintext;
}

.qe-auth-input::placeholder {
    color: #808080;
}

.qe-auth-input:focus {
    background: #f0f0f0;
    box-shadow: 0 0 0 1px rgba(75, 48, 0, 0.25);
}

/* Hide native password chrome so custom eye doesn't fight layout */
.qe-auth-input::-ms-reveal,
.qe-auth-input::-ms-clear {
    display: none;
}

.qe-auth-input-wrap {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
}

.qe-auth-input-wrap .qe-auth-input {
    padding-left: 44px;
}

.qe-learn-root.qe-lang-en .qe-auth-input-wrap .qe-auth-input {
    padding-left: 14px;
    padding-right: 44px;
}

.qe-auth-eye {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    z-index: 1;
}

.qe-learn-root.qe-lang-en .qe-auth-eye {
    left: auto;
    right: 14px;
}

.qe-auth-eye img {
    width: 18px;
    height: 18px;
    display: block;
    object-fit: contain;
}

.qe-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    min-height: 34px;
    width: 100%;
    direction: ltr;
}

.qe-auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 12px;
    line-height: 34px;
    color: #383433;
    cursor: pointer;
    user-select: none;
    flex-direction: row;
}

.qe-learn-root.qe-lang-en .qe-auth-remember {
    flex-direction: row-reverse;
}

.qe-auth-forgot {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 12px;
    line-height: 34px;
    color: #df4a3e;
    text-decoration: none;
    white-space: nowrap;
}

.qe-auth-forgot:hover {
    color: #c43b30;
    text-decoration: underline;
}

.qe-auth-remember input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.qe-auth-check {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 0.812px solid #4B3000;
    background: #fff;
    flex-shrink: 0;
    position: relative;
    box-sizing: border-box;
}

.qe-auth-remember input:checked + .qe-auth-check {
    background: #4B3000;
}

.qe-auth-remember input:checked + .qe-auth-check::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.qe-auth-submit {
    width: 100%;
    height: 48px;
    margin-top: 0;
    border: none;
    border-radius: 5px;
    background: #4B3000;
    color: #fff;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s;
    position: relative;
    z-index: 4;
    pointer-events: auto;
}

.qe-auth-submit:disabled {
    opacity: 0.75;
    cursor: wait;
}

.qe-auth-submit:hover,
.qe-auth-submit:focus {
    background: #3a2500;
    outline: none;
    box-shadow: 0 4px 14px rgba(75, 48, 0, 0.28);
}

.qe-auth-switch {
    margin: 0;
    text-align: center;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 12px;
    line-height: 34px;
}

.qe-auth-switch-muted {
    color: #615e5e;
    font-weight: 400;
}

.qe-auth-switch-link {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0 2px;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 34px;
    color: #383433;
    cursor: pointer;
    text-decoration: none;
}

.qe-auth-switch-link:hover {
    text-decoration: underline;
    color: #4B3000;
}

.qe-auth-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    width: 100%;
}

@media screen and (max-width: 991px) {
    .qe-auth-modal .modal-dialog.qe-auth-dialog {
        width: min(520px, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
    }

    .qe-auth-modal .qe-auth-card {
        aspect-ratio: auto;
        height: auto;
        max-height: calc(100vh - 24px);
    }

    .qe-auth-visual {
        display: none;
    }

    .qe-auth-layout {
        display: block;
        height: auto;
    }

    .qe-auth-panel {
        width: 100%;
        max-width: none;
        padding: 28px 20px 24px;
        overflow-y: auto;
        max-height: calc(100vh - 24px);
    }

    .qe-learn-root.qe-lang-en .qe-auth-panel {
        padding: 28px 20px 24px;
    }

    .qe-auth-logo {
        right: 20px;
        top: 16px;
        width: 48px;
        height: 48px;
    }

    .qe-learn-root.qe-lang-en .qe-auth-logo {
        left: 20px;
        right: auto;
    }

    .qe-auth-view {
        padding-top: 56px;
    }

    .qe-auth-title {
        font-size: 24px;
        line-height: 1.3;
    }

    .qe-auth-subtitle {
        line-height: 1.45;
    }

    .qe-auth-form-login {
        gap: 28px;
        justify-content: flex-start;
    }
}

@media screen and (max-width: 575px) {
    .qe-auth-modal .modal-dialog.qe-auth-dialog {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        margin: 0.5rem auto;
    }

    .qe-auth-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .qe-auth-panel {
        padding: 28px 16px 20px;
    }

    .qe-auth-row {
        flex-wrap: wrap;
        gap: 8px;
    }
}


.qe-learn-root .header .qe-lang-btn:hover,
.qe-learn-root .header .qe-lang-btn:focus {
    background: #5c3d0a;
    border-color: #fff;
    color: #fff;
    box-shadow: none;
}

/* suppress Bootstrap's default dropdown-toggle caret; we use a custom one below */
.qe-learn-root .header .qe-lang-btn.dropdown-toggle::after {
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 4px solid #fff;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    border-bottom: none;
    vertical-align: middle;
    margin-left: 2px;
    content: '';
}

.qe-learn-root .header .qe-lang-btn.show,
.qe-learn-root .header .qe-lang-btn[aria-expanded="true"] {
    background: #3a2500;
    border-color: #fff;
    color: #fff;
}

.qe-learn-root .header .qe-lang-flag-icon {
    display: inline-block;
    vertical-align: middle;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}

/* Dropdown menu */
.qe-learn-root .header .qe-lang-menu {
    min-width: 155px;
    padding: 6px 0;
    border: 1px solid rgba(75, 48, 0, 0.15);
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.13);
    background: #fff;
    left: 0 !important;
    right: auto !important;
}

.qe-learn-root.qe-lang-ar .header .qe-section-nav .qe-lang-menu {
    left: auto !important;
    right: 0 !important;
}

.qe-learn-root .header .qe-lang-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    transition: background 0.15s;
}

.qe-learn-root .header .qe-lang-item:hover {
    background: #FFF8F0;
    color: #4B3000;
    text-decoration: none;
}

.qe-learn-root .header .qe-lang-item.active {
    background: #FFF3DE;
    color: #4B3000;
    font-weight: 700;
}

.qe-learn-root .header .qe-lang-check {
    margin-left: auto;
    color: #27a347;
    font-weight: 700;
    font-size: 1rem;
}

/* â”€â”€ English only: LTR panel text/layout (Arabic uses shared + ar/QuranExplorer.css as before) â”€â”€ */
.qe-learn-root.qe-lang-en {
    direction: ltr;
}

.qe-learn-root.qe-lang-en .sidebar-content,
.qe-learn-root.qe-lang-en #sidebar-tabs,
.qe-learn-root.qe-lang-en #evenDiv,
.qe-learn-root.qe-lang-en .tabtable,
.qe-learn-root.qe-lang-en .tab-pane,
.qe-learn-root.qe-lang-en .card-body,
.qe-learn-root.qe-lang-en .popup .modal-body,
.qe-learn-root.qe-lang-en #TajweedLessonsPopup .qe-tajweed-lessons-error {
    direction: ltr;
    text-align: left;
}

.qe-learn-root #TajweedLessonsPopup .qe-tajweed-lessons-loading {
    color: #5c3317;
    font-size: 14px;
}

/* â”€â”€ Tajweed lessons modal â€” match Figma card exactly â”€â”€ */
#TajweedLessonsPopup.qe-tajweed-lessons-modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

#TajweedLessonsPopup.qe-tajweed-lessons-modal .modal-dialog,
#TajweedLessonsPopup.qe-tajweed-lessons-modal .modal-dialog.modal-dialog-centered {
    max-width: 480px;
    width: calc(100% - 32px);
    margin: auto !important;
    display: flex;
    align-items: center;
    min-height: auto;
}

#TajweedLessonsPopup.qe-tajweed-lessons-modal .modal-content {
    background: #fdfaf5;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
}

#TajweedLessonsPopup .modal-header,
#TajweedLessonsPopup.qe-tajweed-lessons-modal .modal-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    direction: ltr !important;
    margin: 0 !important;
    padding: 8px 16px !important;
    border-bottom: none !important;
    background-color: #1e1007 !important;
    background-image: linear-gradient(172deg, #1e1007 0%, #5c3317 100%) !important;
}

#TajweedLessonsPopup.popup .modal-header .close,
#TajweedLessonsPopup .modal-header .close {
    order: 1 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: static !important;
    opacity: 1 !important;
    color: #fff !important;
    text-shadow: none;
    background: rgba(255, 255, 255, 0.12) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer;
}

#TajweedLessonsPopup .modal-header .close:hover,
#TajweedLessonsPopup .modal-header .close:focus {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.22) !important;
    outline: none;
}

#TajweedLessonsPopup .qe-tajweed-modal-close-icon {
    display: block;
    width: 15px;
    height: 15px;
}

#TajweedLessonsPopup .qe-tajweed-modal-heading {
    order: 2 !important;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin: 0;
    padding: 0;
    text-align: right !important;
}

#TajweedLessonsPopup .modal-header .modal-title,
#TajweedLessonsPopup .qe-tajweed-modal-heading .modal-title {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    color: #fff !important;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 20px;
    text-align: right !important;
}

#TajweedLessonsPopup .qe-tajweed-lessons-count {
    display: block;
    margin: 2px 0 0;
    color: #e5b55a;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    opacity: 0.85;
    text-align: right !important;
}

#TajweedLessonsPopup .qe-tajweed-lessons-count:empty {
    display: none;
}

#TajweedLessonsPopup .qe-tajweed-modal-gold-line {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, #c8922a 0%, #e5b55a 50%, #c8922a 100%);
}

#TajweedLessonsPopup .modal-body {
    background-color: #fdfaf5 !important;
    max-height: min(520px, calc(100vh - 160px));
    overflow: auto;
    padding: 0 !important;
    direction: ltr !important;
    text-align: left !important;
    border-radius: 0 !important;
}

#TajweedLessonsPopup .qe-tajweed-lessons-list-wrap {
    padding: 8px;
}

#TajweedLessonsPopup .qe-tajweed-lessons-list {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/*
 * Figma 3-column row (visual LTR):
 *   [ number | Arabic+English text | play ]
 * User RTL column order: 1=play, 2=text, 3=number(last)
 * CSS grid-areas lock positions regardless of DOM/RTL inheritance.
 */
#TajweedLessonsPopup .qe-tajweed-lesson-row {
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr) 36px !important;
    grid-template-areas: "num text play" !important;
    align-items: center !important;
    column-gap: 12px !important;
    row-gap: 0 !important;
    direction: ltr !important;
    width: 100%;
    min-height: 56px;
    padding: 12px !important;
    margin: 0 !important;
    text-decoration: none !important;
    color: #1e1007 !important;
    border: none !important;
    border-radius: 14px;
    background: transparent;
    box-sizing: border-box;
    transition: background-color 0.15s ease;
}

#TajweedLessonsPopup .qe-tajweed-lesson-row:hover,
#TajweedLessonsPopup .qe-tajweed-lesson-row:focus,
#TajweedLessonsPopup .qe-tajweed-lesson-row.is-active {
    text-decoration: none !important;
    color: #1e1007 !important;
    background-color: #f0e8de !important;
    outline: none;
}

#TajweedLessonsPopup .qe-tajweed-lesson-num {
    grid-area: num !important;
    width: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: rgba(0, 0, 0, 0.25) !important;
    font-family: 'Vazirmatn', Inter, sans-serif;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 16px;
    text-align: center !important;
    justify-self: center;
}

#TajweedLessonsPopup .qe-tajweed-lesson-text {
    grid-area: text !important;
    min-width: 0;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center;
    text-align: right !important;
}

#TajweedLessonsPopup .qe-tajweed-lesson-title {
    display: block;
    width: 100%;
    margin: 0;
    color: #1e1007 !important;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 19.25px;
    text-align: right !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#TajweedLessonsPopup .qe-tajweed-lesson-sub {
    display: block;
    width: 100%;
    margin: 2px 0 0;
    color: #5c3317 !important;
    font-family: 'Vazirmatn', Inter, sans-serif;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 16px;
    text-align: right !important;
    opacity: 0.65;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#TajweedLessonsPopup .qe-tajweed-lesson-play {
    grid-area: play !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    justify-self: end;
    width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #cc2200 !important;
    box-shadow: 0 2px 4px rgba(204, 34, 0, 0.35);
    overflow: hidden;
}

#TajweedLessonsPopup .qe-tajweed-lesson-play img {
    display: block;
    width: 13px;
    height: 13px;
    margin-left: 1px;
}

#TajweedLessonsPopup .qe-tajweed-lesson-row.is-active .qe-tajweed-lesson-play,
#TajweedLessonsPopup .qe-tajweed-lesson-row:hover .qe-tajweed-lesson-play {
    background: linear-gradient(180deg, #b8870a 0%, #ffd600 100%) !important;
    box-shadow: 0 2px 4px rgba(137, 84, 3, 0.35);
}

#TajweedLessonsPopup .qe-tajweed-lessons-empty {
    color: #5c3317;
    font-size: 14px;
    opacity: 0.75;
}

/* University Competitions modal â€” matches Test Understanding / Tajweed shell */
#MasabqatPopup.qe-masabqat-modal.show, #QotdPopup.qe-masabqat-modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

#MasabqatPopup.qe-masabqat-modal .modal-dialog, #QotdPopup.qe-masabqat-modal .modal-dialog,
#MasabqatPopup.qe-masabqat-modal .modal-dialog.modal-dialog-centered, #QotdPopup.qe-masabqat-modal .modal-dialog.modal-dialog-centered {
    max-width: 720px;
    width: calc(100% - 32px);
    margin: auto !important;
    display: flex;
    align-items: center;
    min-height: auto;
}

#MasabqatPopup.qe-masabqat-modal .modal-content, #QotdPopup.qe-masabqat-modal .modal-content {
    background: #fdfaf5;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
}

#MasabqatPopup.qe-masabqat-modal .modal-header, #QotdPopup.qe-masabqat-modal .modal-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    direction: ltr !important;
    gap: 0.75rem;
    margin: 0 !important;
    padding: 8px 16px !important;
    border-bottom: none !important;
    background-color: #1e1007 !important;
    background-image: linear-gradient(172deg, #1e1007 0%, #5c3317 100%) !important;
}

#MasabqatPopup.qe-masabqat-modal .modal-header .close, #QotdPopup.qe-masabqat-modal .modal-header .close {
    order: 1 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: static !important;
    opacity: 1 !important;
    color: #fff !important;
    text-shadow: none;
    background: rgba(255, 255, 255, 0.12) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer;
    flex-shrink: 0;
}

#MasabqatPopup.qe-masabqat-modal .modal-header .close:hover, #QotdPopup.qe-masabqat-modal .modal-header .close:hover,
#MasabqatPopup.qe-masabqat-modal .modal-header .close:focus, #QotdPopup.qe-masabqat-modal .modal-header .close:focus {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.22) !important;
    outline: none;
}

#MasabqatPopup .qe-masabqat-modal-close-icon, #QotdPopup .qe-masabqat-modal-close-icon {
    display: block;
    width: 15px;
    height: 15px;
}

#MasabqatPopup .qe-masabqat-modal-heading, #QotdPopup .qe-masabqat-modal-heading {
    order: 2 !important;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin: 0;
    padding: 0;
    min-width: 0;
    text-align: right !important;
    direction: rtl !important;
}

#MasabqatPopup.qe-masabqat-modal .modal-header .modal-title, #QotdPopup.qe-masabqat-modal .modal-header .modal-title,
#MasabqatPopup .qe-masabqat-modal-heading .modal-title, #QotdPopup .qe-masabqat-modal-heading .modal-title {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    color: #fff !important;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 20px;
    text-align: right !important;
}

#MasabqatPopup .qe-masabqat-subtitle, #QotdPopup .qe-masabqat-subtitle {
    display: block;
    margin: 2px 0 0;
    width: 100%;
    color: #e5b55a;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    opacity: 0.85;
    text-align: right !important;
}

#MasabqatPopup .qe-masabqat-modal-gold-line, #QotdPopup .qe-masabqat-modal-gold-line {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, #c8922a 0%, #e5b55a 50%, #c8922a 100%);
}

#MasabqatPopup.qe-masabqat-modal .modal-body, #QotdPopup.qe-masabqat-modal .modal-body {
    background-color: #fdfaf5 !important;
    max-height: min(520px, calc(100vh - 200px));
    overflow: auto;
    padding: 14px 16px 18px !important;
}

#MasabqatPopup .qe-masabqat-months, #QotdPopup .qe-masabqat-months {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 14px;
    -webkit-overflow-scrolling: touch;
}

#MasabqatPopup .qe-masabqat-month, #QotdPopup .qe-masabqat-month {
    flex: 0 0 auto;
    min-width: 96px;
    height: 58px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid #eadfce;
    border-radius: 12px;
    background: #fff;
    color: #1e1007;
    font-family: 'Vazirmatn', sans-serif;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#MasabqatPopup .qe-masabqat-month:hover, #QotdPopup .qe-masabqat-month:hover,
#MasabqatPopup .qe-masabqat-month:focus, #QotdPopup .qe-masabqat-month:focus {
    background: #f0e8de;
    border-color: #e4dccf;
    outline: none;
}

#MasabqatPopup .qe-masabqat-month.is-active, #QotdPopup .qe-masabqat-month.is-active {
    background: #5c3317;
    border-color: #5c3317;
    color: #fff;
}

#MasabqatPopup .qe-masabqat-month-name, #QotdPopup .qe-masabqat-month-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 18px;
}

#MasabqatPopup .qe-masabqat-month-date, #QotdPopup .qe-masabqat-month-date {
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    opacity: 0.75;
}

#MasabqatPopup .qe-masabqat-month.is-active .qe-masabqat-month-date, #QotdPopup .qe-masabqat-month.is-active .qe-masabqat-month-date {
    color: #e5b55a;
    opacity: 0.95;
}

#MasabqatPopup .qe-masabqat-table-wrap, #QotdPopup .qe-masabqat-table-wrap {
    border: 1px solid #eadfce;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

#MasabqatPopup .qe-masabqat-table, #QotdPopup .qe-masabqat-table {
    margin: 0;
    width: 100%;
    background: transparent;
}

#MasabqatPopup .qe-masabqat-table thead th, #QotdPopup .qe-masabqat-table thead th {
    background: #5c3317 !important;
    color: #fff !important;
    border: none !important;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 18px;
    padding: 10px 12px !important;
    white-space: nowrap;
    text-align: right;
}

#MasabqatPopup .qe-masabqat-table tbody td, #QotdPopup .qe-masabqat-table tbody td {
    border-color: #eadfce !important;
    color: #1e1007;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13px !important;
    font-weight: 400;
    line-height: 20px;
    padding: 12px !important;
    vertical-align: middle;
    background: #fff;
}

#MasabqatPopup .qe-masabqat-table tbody tr:last-child td, #QotdPopup .qe-masabqat-table tbody tr:last-child td {
    border-bottom: none !important;
}

#MasabqatPopup .qe-masabqat-table tbody td:first-child, #QotdPopup .qe-masabqat-table tbody td:first-child {
    width: 40px;
    text-align: center;
    color: rgba(30, 16, 7, 0.45);
    font-weight: 700;
}

#MasabqatPopup .qe-masabqat-table tbody td:nth-child(3), #QotdPopup .qe-masabqat-table tbody td:nth-child(3),
#MasabqatPopup .qe-masabqat-table tbody td:last-child, #QotdPopup .qe-masabqat-table tbody td:last-child {
    width: 72px;
    text-align: center;
    white-space: nowrap;
}

#MasabqatPopup .qe-masabqat-table tbody td img, #QotdPopup .qe-masabqat-table tbody td img {
    width: 28px;
    height: auto;
}

#MasabqatPopup .qe-masabqat-status, #QotdPopup .qe-masabqat-status {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f7f1e8;
    color: #1e1007;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13px;
    line-height: 18px;
}

#MasabqatPopup .qe-masabqat-status.is-error, #QotdPopup .qe-masabqat-status.is-error {
    background: #fdecea;
    color: #8a1f11;
}

#MasabqatPopup .qe-masabqat-question-row, #QotdPopup .qe-masabqat-question-row {
    cursor: pointer;
}

#MasabqatPopup .qe-masabqat-question-row:hover td, #QotdPopup .qe-masabqat-question-row:hover td {
    background: #faf6f0;
}

#MasabqatPopup .qe-masabqat-question-row.is-conducted, #QotdPopup .qe-masabqat-question-row.is-conducted {
    cursor: default;
    opacity: 0.85;
}

#MasabqatPopup .qe-masabqat-question-row.is-conducted:hover td, #QotdPopup .qe-masabqat-question-row.is-conducted:hover td {
    background: #f3f8f3;
}

#MasabqatPopup .qe-masabqat-question-row.is-conducted td, #QotdPopup .qe-masabqat-question-row.is-conducted td {
    background: #f3f8f3;
}

#MasabqatPopup .qe-masabqat-question-row.is-conducted .qe-masabqat-result, #QotdPopup .qe-masabqat-question-row.is-conducted .qe-masabqat-result {
    color: #2e7d32;
    font-weight: 700;
}

#MasabqatPopup .qe-masabqat-qtext, #QotdPopup .qe-masabqat-qtext {
    direction: rtl;
    text-align: right;
}

#MasabqatPopup .qe-masabqat-empty-row td, #QotdPopup .qe-masabqat-empty-row td {
    text-align: center !important;
    color: rgba(30, 16, 7, 0.55);
}

#MasabqatPopup .qe-masabqat-yt, #QotdPopup .qe-masabqat-yt {
    display: inline-block;
    line-height: 0;
}

.qe-learn-root.qe-lang-en #MasabqatPopup.qe-masabqat-modal .modal-header .close, .qe-learn-root.qe-lang-en #QotdPopup.qe-masabqat-modal .modal-header .close {
    order: 2 !important;
    margin-left: auto !important;
}

.qe-learn-root.qe-lang-en #MasabqatPopup .qe-masabqat-modal-heading, .qe-learn-root.qe-lang-en #QotdPopup .qe-masabqat-modal-heading {
    order: 1 !important;
    align-items: flex-start !important;
    text-align: left !important;
    direction: ltr !important;
}

.qe-learn-root.qe-lang-en #MasabqatPopup.qe-masabqat-modal .modal-header .modal-title, .qe-learn-root.qe-lang-en #QotdPopup.qe-masabqat-modal .modal-header .modal-title,
.qe-learn-root.qe-lang-en #MasabqatPopup .qe-masabqat-modal-heading .modal-title, .qe-learn-root.qe-lang-en #QotdPopup .qe-masabqat-modal-heading .modal-title,
.qe-learn-root.qe-lang-en #MasabqatPopup .qe-masabqat-subtitle, .qe-learn-root.qe-lang-en #QotdPopup .qe-masabqat-subtitle {
    text-align: left !important;
}

.qe-learn-root.qe-lang-en #MasabqatPopup .qe-masabqat-months, .qe-learn-root.qe-lang-en #QotdPopup .qe-masabqat-months {
    justify-content: flex-start;
}

.qe-learn-root.qe-lang-en #MasabqatPopup .qe-masabqat-table, .qe-learn-root.qe-lang-en #QotdPopup .qe-masabqat-table,
.qe-learn-root.qe-lang-en #MasabqatPopup .qe-masabqat-table thead th, .qe-learn-root.qe-lang-en #QotdPopup .qe-masabqat-table thead th,
.qe-learn-root.qe-lang-en #MasabqatPopup .qe-masabqat-table tbody td, .qe-learn-root.qe-lang-en #QotdPopup .qe-masabqat-table tbody td {
    text-align: left;
    direction: ltr;
}

.qe-learn-root.qe-lang-en #MasabqatPopup .qe-masabqat-table tbody td:first-child, .qe-learn-root.qe-lang-en #QotdPopup .qe-masabqat-table tbody td:first-child,
.qe-learn-root.qe-lang-en #MasabqatPopup .qe-masabqat-table tbody td:nth-child(3), .qe-learn-root.qe-lang-en #QotdPopup .qe-masabqat-table tbody td:nth-child(3),
.qe-learn-root.qe-lang-en #MasabqatPopup .qe-masabqat-table tbody td:last-child, .qe-learn-root.qe-lang-en #QotdPopup .qe-masabqat-table tbody td:last-child {
    text-align: center;
}

.qe-learn-root.qe-lang-en #MasabqatPopup .qe-masabqat-qtext, .qe-learn-root.qe-lang-en #QotdPopup .qe-masabqat-qtext {
    direction: rtl;
    text-align: right;
}

.qe-learn-root.qe-lang-en #TajweedLessonsPopup .qe-tajweed-lesson-row {
    direction: ltr !important;
    grid-template-areas: "num text play" !important;
}

.qe-learn-root.qe-lang-en #TajweedLessonsPopup .qe-tajweed-modal-heading,
.qe-learn-root.qe-lang-en #TajweedLessonsPopup .modal-header .modal-title,
.qe-learn-root.qe-lang-en #TajweedLessonsPopup .qe-tajweed-lessons-count,
.qe-learn-root.qe-lang-en #TajweedLessonsPopup .qe-tajweed-lesson-text,
.qe-learn-root.qe-lang-en #TajweedLessonsPopup .qe-tajweed-lesson-title {
    align-items: flex-start !important;
    text-align: left !important;
}

.qe-learn-root.qe-lang-en .radio-selections {
    direction: ltr;
    text-align: left;
}

.qe-learn-root.qe-lang-en .qe-mushaf-col .heading,
.qe-learn-root.qe-lang-en .qe-mushaf-col .heading > span {
    direction: ltr;
}

.qe-learn-root.qe-lang-en .qe-mushaf-col .heading > span.ml-auto {
    margin-left: 0 !important;
    margin-right: 0 !important;
}


.qe-learn-root.qe-lang-en #sidebar-tabs .tab-content .card-header .btn-link {
    flex-direction: row;
}

.qe-learn-root.qe-lang-en #sidebar-tabs .tab-content .card-header .btn-link span {
    text-align: left;
    flex-grow: 1;
}

.qe-learn-root.qe-lang-en #AsbaabMaaniTabs .nav-pills {
    flex-direction: row;
}

.qe-learn-root.qe-lang-en #AsbaabMaaniTabs .nav-link {
    text-align: left;
}

.qe-learn-root.qe-lang-en .surah,
.qe-learn-root.qe-lang-en .juz {
    direction: ltr;
    text-align: left;
}

.qe-learn-root.qe-lang-en .bottom-bar {
    direction: ltr;
}

.qe-learn-root.qe-lang-en .popup .nav-pills,
.qe-learn-root.qe-lang-en .popup .settingcontent,
.qe-learn-root.qe-lang-en .popup .settingsidebar {
    direction: ltr;
    text-align: left;
}

.qe-learn-root.qe-lang-en .modal-header .close {
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* English: Sajjal session panel — close on the right, title left */
.qe-learn-root.qe-lang-en .sajjal-panel-header .samaa-repeat-tooltip-close {
    order: 2;
}

.qe-learn-root.qe-lang-en .sajjal-panel-header-content {
    order: 1;
    align-items: flex-start;
    text-align: left;
}

.qe-learn-root.qe-lang-en .sajjal-panel-live {
    justify-content: flex-start;
}

/* English: default tooltip close sits on the right */
.qe-learn-root.qe-lang-en .samaa-repeat-tooltip-close {
    left: auto;
    right: 6px;
}

/* Override en/QuranExplorer.css RTL rules on English Learn only */
.qe-learn-root.qe-lang-en .samawork .thead-dark th,
.qe-learn-root.qe-lang-en .samawork tbody tr td,
.qe-learn-root.qe-lang-en #VideosPopup .tabtable .thead-dark th,
.qe-learn-root.qe-lang-en #VideosPopup .tabtable tbody tr td,
.qe-learn-root.qe-lang-en #AssignmentsPopup .tabtable .thead-dark th,
.qe-learn-root.qe-lang-en #AssignmentsPopup .tabtable tbody tr td,
.qe-learn-root.qe-lang-en #MasabqatPopup .tabtable .thead-dark th, .qe-learn-root.qe-lang-en #QotdPopup .tabtable .thead-dark th,
.qe-learn-root.qe-lang-en #MasabqatPopup .tabtable tbody tr td, .qe-learn-root.qe-lang-en #QotdPopup .tabtable tbody tr td {
    text-align: left;
}

.qe-learn-root.qe-lang-en .samawork tbody tr td .form-group {
    justify-content: flex-start;
}

.qe-learn-root.qe-lang-en .samawork tbody tr td .form-group .form-control {
    text-align: left;
}

/* Translator display input: non-editable appearance */
#translatorLstEven[readonly],
#translatorLst[readonly] {
    cursor: default;
    caret-color: transparent;
    outline: none;
    user-select: none;
}

#translatorLstEven[readonly]:focus,
#translatorLst[readonly]:focus {
    box-shadow: none;
    border-color: inherit;
}

.qe-learn-root.qe-lang-en #tafseerListEven.form-control,
.qe-learn-root.qe-lang-en #translatorLstEven.custom-select,
.qe-learn-root.qe-lang-en #tafseerList.form-control,
.qe-learn-root.qe-lang-en #translatorLst.custom-select {
    text-align: left;
}

.qe-learn-root.qe-lang-en .tabs-menu {
    text-align: left;
    left: auto;
    right: 5px;
}

.qe-learn-root.qe-lang-en .btn-tabs-menu {
    padding-left: 0;
    padding-right: 10px;
}

.qe-learn-root.qe-lang-en .row.pgDivSelect > span,
.qe-learn-root.qe-lang-en .row.pgDivSelectEven > span {
    text-align: left !important;
    background-position: calc(100% - 7px) center !important;
    background-size: 20px;
}

.qe-learn-root.qe-lang-en .popup .nav-pills .nav-link {
    text-align: left;
}

.qe-learn-root.qe-lang-en .popup .nav-pills .nav-link span {
    padding-right: 0;
    padding-left: 10px;
}

.qe-learn-root.qe-lang-en .body-content .form-row .col:nth-child(1) .heading {
    border-radius: 6px 0 0;
}

.qe-learn-root.qe-lang-en .body-content .form-row .col:nth-child(2) .heading {
    border-radius: 0 6px 0 0;
}

.qe-learn-root.qe-lang-en .colorCircle {
    text-align: left;
}

.qe-learn-root.qe-lang-en select.custom-select {
    background-position: calc(100% - 7px) center;
}

.qe-ayah-header.custom-select {
    background-color: #FFF8F1;
    height: 47px;
    border-radius: 5px;
    padding: 10px 10px 10px 1.75rem;
    text-align: right;
    border: 1px solid #FFF8F1;
    line-height: 27px;
    font-weight: 600;
    pointer-events: none;
    background-position: left .75rem center;
}

.qe-learn-root.qe-lang-en .qe-ayah-header.custom-select {
    text-align: left;
    padding: 10px 1.75rem 10px 10px;
    background-position: right .75rem center;
}

.qe-selected-ayah-verse {
    margin: 0 0 12px;
    padding: 12px 14px;
    border-radius: 5px;
    background: #faf6f0;
    border: 1px solid #f0e6d8;
    direction: rtl;
    text-align: right;
}

.qe-selected-ayah-verse-text {
    margin: 0;
    font-family: 'Amiri', 'Traditional Arabic', 'Scheherazade New', serif;
    font-size: 1.35rem;
    line-height: 2;
    color: #2a1a00;
    unicode-bidi: plaintext;
}

.qe-ayah-meaning-header td {
    background-color: #FFF8F1;
    font-weight: 600;
}

#divErrorSearch.alert {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1060;
    max-width: 90%;
    min-width: 280px;
    margin: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#divErrorSearch .qe-alert-close {
    padding: 0.75rem 1rem;
}

.qe-learn-root.qe-lang-en .radio-selections input + span {
    border-radius: 6px 0 0 0;
}

/* English internal mirror: settings/downloads sidebar left, content right */
/* Settings â†’ Font tab preview (page content fonts come from dynamic #qe-content-font-style) */
.qe-font-preview {
    min-height: 72px;
    padding: 0.75rem 0.9rem;
    border: 1px solid #e0c9a0;
    border-radius: 6px;
    background: #fffdf8;
    color: #383433;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Settings â†’ Color tab pickers */
.qe-color-field .qe-color-input-wrap {
    position: relative;
}

.qe-color-field .qe-color-picker {
    height: 42px;
    padding: 4px 40px 4px 8px;
    cursor: pointer;
}

.qe-learn-root.qe-lang-en .qe-color-field .qe-color-picker {
    padding: 4px 8px 4px 40px;
}

.qe-color-field .qe-color-swatch {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: #383433;
    pointer-events: none;
}

.qe-learn-root.qe-lang-en .qe-color-field .qe-color-swatch {
    right: auto;
    left: 10px;
}

.qe-color-field .qe-color-hint {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #816225;
    opacity: 0.85;
}

/* Arabic: header title on the right, close (Ã—) on the left */
.qe-learn-root.qe-lang-ar .qe-settings-style-modal .modal-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    direction: ltr !important;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal .modal-header .close {
    order: 1 !important;
    position: static !important;
    float: none !important;
    margin: 0 !important;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal .modal-header .modal-title {
    order: 2 !important;
    flex: 1 1 auto !important;
    width: auto !important;
    margin: 0 !important;
    text-align: right !important;
}

/* Arabic: same title-right/close-left header layout for the panel expand modals. */
.qe-learn-root.qe-lang-ar .qe-panel-expand-modal .modal-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    direction: ltr !important;
}

.qe-learn-root.qe-lang-ar .qe-panel-expand-modal .modal-header .close {
    order: 1 !important;
    position: static !important;
    float: none !important;
    margin: 0 !important;
}

.qe-learn-root.qe-lang-ar .qe-panel-expand-modal .modal-header .modal-title {
    order: 2 !important;
    flex: 1 1 auto !important;
    width: auto !important;
    margin: 0 !important;
    text-align: right !important;
}

/* English: title on the left, close on the right */
.qe-learn-root.qe-lang-en .qe-panel-expand-modal .modal-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    direction: ltr !important;
}

.qe-learn-root.qe-lang-en .qe-panel-expand-modal .modal-header .modal-title {
    order: 1 !important;
    flex: 1 1 auto !important;
    width: auto !important;
    margin: 0 !important;
    text-align: left !important;
}

.qe-learn-root.qe-lang-en .qe-panel-expand-modal .modal-header .close {
    order: 2 !important;
    position: static !important;
    float: none !important;
    margin: 0 !important;
}

/* Sidebar "Settings" pill button — opens the full Settings modal (all tabs), same
   look as the Tafseer page's ".tafseer-settings-btn". */
.qe-full-settings-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    direction: rtl;
    padding: 6px 18px;
    border-radius: 50px;
    background: #F4F4F4;
    border: 2px solid #5C4010;
    color: #5C4010;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all .3s ease;
}

.qe-full-settings-btn:hover,
.qe-full-settings-btn:focus {
    background: #5C4010;
    color: #FFF;
}

.qe-full-settings-btn-wrap {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 0.75rem;
}

/* Bootstrap's dropdown-toggle caret isn't part of this pill's design. */
.qe-full-settings-btn.dropdown-toggle::after {
    display: none;
}

.qe-full-settings-menu {
    min-width: 190px;
    padding: 4px 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.qe-full-settings-menu .dropdown-item {
    padding: 10px 16px;
    text-align: right;
    color: #383433;
    font-size: 0.95rem;
}

.qe-full-settings-menu .dropdown-item + .dropdown-item {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.qe-full-settings-menu .dropdown-item:hover,
.qe-full-settings-menu .dropdown-item:focus {
    background-color: #F9F4EB;
    color: #5C4010;
}

.qe-learn-root.qe-lang-en .qe-full-settings-btn {
    direction: ltr;
}

.qe-learn-root.qe-lang-en .qe-full-settings-btn-wrap {
    justify-content: flex-end;
}

.qe-learn-root.qe-lang-en .qe-full-settings-menu .dropdown-item {
    text-align: left;
}

/* Arabic RTL: keep settings sidebar on the visual right */
.qe-learn-root.qe-lang-ar .qe-settings-style-modal .modal-body > .row.m-0 {
    flex-direction: row-reverse;
}

.qe-learn-root.qe-lang-en .qe-settings-style-modal .modal-body > .row.m-0 {
    flex-direction: row-reverse;
}

/* Settings pane section title — same chrome as .form-control so it does not look like an empty box */
.qe-settings-style-modal .qe-settings-pane-heading {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    direction: rtl;
    height: 42px;
    margin: 0 0 1rem;
    padding: 0 0.75rem;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #383433;
    background: #fff;
    border: 1px solid #e6dcc8;
    border-radius: 0.25rem;
    box-shadow: 0 0 2px 0 #0000001a;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal .qe-settings-pane-heading {
    direction: rtl;
    text-align: right;
    justify-content: flex-start;
}

.qe-learn-root.qe-lang-en .qe-settings-style-modal .qe-settings-pane-heading {
    direction: ltr;
    text-align: left;
    justify-content: flex-start;
}

/* Context settings: show only the requested content tab (applied before show = no flicker) */
.qe-settings-style-modal.qe-settings-context-focus .settingsidebar .nav-link:not(.qe-settings-context-active) {
    display: none !important;
}

.qe-settings-style-modal.qe-settings-context-focus .settingsidebar .nav-link.qe-settings-context-active {
    display: flex !important;
}

.qe-settings-style-modal.qe-settings-context-focus .settingcontent > .tab-pane:not(.active) {
    display: none !important;
}

/* Panel settings icon — match meanings bar; exclude from radio-tab beige styling */
.sidebar-content .radio-selections > .qe-panel-settings-wrap {
    background: transparent !important;
    width: auto !important;
    flex: 0 0 auto !important;
    flex-grow: 0 !important;
    text-align: start;
}

/* Arabic desktop: settings gear on the left; tabs pack to the right */
@media screen and (min-width: 1200px) {
    .qe-learn-root.qe-lang-ar .sidebar-content .radio-selections {
        padding: 0;
        gap: 0;
    }

    .qe-learn-root.qe-lang-ar .sidebar-content .radio-selections > .qe-panel-settings-wrap {
        order: 1;
        margin-left: 4px;
        margin-right: 0 !important;
        flex-grow: 0 !important;
    }

    .qe-learn-root.qe-lang-ar .sidebar-content .radio-selections > .qe-tt-tabs-scroll {
        order: 2;
        flex: 1 1 0;
        min-width: 0;
    }

    .qe-learn-root.qe-lang-ar .sidebar-content .radio-selections > .qe-tt-tabs-scroll > .qe-tt-tab {
        order: 0;
        width: auto !important;
        flex: 0 0 auto;
        min-width: 0;
    }

    .qe-learn-root.qe-lang-ar .sidebar-content .radio-selections > .qe-panel-collapse-toggle {
        order: 0;
    }

    .qe-learn-root.qe-lang-ar .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar.nav-pills {
        padding: 0;
    }

    .qe-learn-root.qe-lang-ar .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar > .qe-panel-settings-wrap {
        order: 0;
        margin-left: 4px;
        margin-right: auto !important;
    }

    .qe-learn-root.qe-lang-ar .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar > .nav-item {
        order: 1;
        flex: 0 0 auto;
    }

    .qe-learn-root.qe-lang-ar .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar > .qe-panel-collapse-toggle {
        order: 0;
        margin-left: 6px;
        margin-right: 0;
    }

    /* Taleem panel: RTL tab sequence — التفاسير → الترجمة → إعراب → صرف → بلاغة (right to left) */
    .qe-learn-root.qe-lang-ar #tafseerTranslationPanel .qe-tt-tabs-scroll > .qe-tt-tab:nth-child(1) { order: 5; }
    .qe-learn-root.qe-lang-ar #tafseerTranslationPanel .qe-tt-tabs-scroll > .qe-tt-tab:nth-child(2) { order: 4; }
    .qe-learn-root.qe-lang-ar #tafseerTranslationPanel .qe-tt-tabs-scroll > .qe-tt-tab:nth-child(3) { order: 3; }
    .qe-learn-root.qe-lang-ar #tafseerTranslationPanel .qe-tt-tabs-scroll > .qe-tt-tab:nth-child(4) { order: 2; }
    .qe-learn-root.qe-lang-ar #tafseerTranslationPanel .qe-tt-tabs-scroll > .qe-tt-tab:nth-child(5) { order: 1; }
    .qe-learn-root.qe-lang-ar #tafseerTranslationPanel .radio-selections > .qe-panel-collapse-toggle {
        order: 0;
        margin-left: 6px;
        margin-right: 0;
    }

    /* English desktop: tabs on the left; gear then collapse on the right */
    .qe-learn-root.qe-lang-en .sidebar-content .radio-selections {
        padding: 0;
        gap: 0;
        flex-direction: row;
    }

    .qe-learn-root.qe-lang-en .sidebar-content .radio-selections > .qe-tt-tabs-scroll {
        order: 0;
        flex: 1 1 0;
        min-width: 0;
    }

    .qe-learn-root.qe-lang-en .sidebar-content .radio-selections > .qe-tt-tabs-scroll > .qe-tt-tab {
        order: 0;
        width: auto !important;
        flex: 0 0 auto;
        min-width: 0;
    }

    .qe-learn-root.qe-lang-en .sidebar-content .radio-selections > .qe-panel-settings-wrap {
        order: 1;
        margin-left: 4px;
        margin-right: 0 !important;
        flex-grow: 0 !important;
    }

    .qe-learn-root.qe-lang-en .sidebar-content .radio-selections > .qe-panel-collapse-toggle {
        order: 2;
        margin-left: 6px;
        margin-right: 0;
    }

    .qe-learn-root.qe-lang-en .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar.nav-pills {
        padding: 0;
    }

    .qe-learn-root.qe-lang-en .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar > .nav-item {
        order: 0;
        flex: 0 0 auto;
    }

    .qe-learn-root.qe-lang-en .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar > .qe-panel-settings-wrap {
        order: 1;
        margin-left: 4px;
        margin-right: 0 !important;
        flex-grow: 0 !important;
    }

    .qe-learn-root.qe-lang-en .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar > .qe-panel-collapse-toggle {
        order: 2;
        margin-left: 6px;
        margin-right: 0;
    }
}

/* Arabic study panel placeholders — always RTL-aligned */
.qe-learn-root.qe-lang-ar #asbabNuzul,
.qe-learn-root.qe-lang-ar #asbabNuzul p,
.qe-learn-root.qe-lang-ar #pills-profile,
.qe-learn-root.qe-lang-ar .sidebar-content #asbabNuzul .qe-no-ayah-selected,
.qe-learn-root.qe-lang-ar .sidebar-content .qe-no-ayah-selected {
    text-align: right !important;
    direction: rtl;
}

/* English study panel placeholders */
.qe-learn-root.qe-lang-en .sidebar-content .qe-no-ayah-selected {
    text-align: left !important;
    direction: ltr;
}

.sidebar-content .btn-tabs-menu.js-qe-open-panel-settings {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #4B3000;
    font-size: 1.05rem;
    line-height: 1;
    padding: 0.35rem 0.55rem;
    background: transparent;
    border: none;
    box-shadow: none;
}

.sidebar-content .btn-tabs-menu.js-qe-open-panel-settings:hover,
.sidebar-content .btn-tabs-menu.js-qe-open-panel-settings:focus {
    color: #2f1d00;
    text-decoration: none;
    background: transparent;
}

.sidebar-content .btn-tabs-menu.js-qe-open-panel-settings::after {
    display: none !important;
}

/*
 * Content tabs (meanings/tafseer/asbab/dictionary/translation):
 * English: configure/selection on the left, select-range on the right.
 * Arabic: original column order (select-range left, configure right).
 */
.qe-learn-root.qe-lang-ar .qe-settings-style-modal .qe-settings-content-tab {
    direction: ltr;
    text-align: right;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal .qe-settings-content-tab .form-group,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal .qe-settings-content-tab label,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal .qe-settings-content-tab select.form-control,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal .qe-settings-content-tab .qe-settings-pane-heading {
    direction: rtl;
    text-align: right;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal .qe-settings-content-tab .text-right {
    text-align: right !important;
}

/* Arabic Script tab: align dropdown block to the right */
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #v-pills-script .qe-tafseer-download-col > .row {
    justify-content: flex-end;
}

/* Option rows: label then + / x, packed to the right (same as original) */
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #tafseerOptions > div,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #translationOptions > div,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #AsbaabNuzool > div,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #meaningsOptions > div,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #selectedBooks > div,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #meaningsLanguages > div,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal .qe-tafseer-lang-col-writers > div {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    direction: ltr;
    gap: 0.35rem;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal #tafseerOptions > div label,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #translationOptions > div label,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #AsbaabNuzool > div label,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #meaningsOptions > div label,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #selectedBooks > div label,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #meaningsLanguages > div label,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal .qe-tafseer-lang-col-writers > div label {
    margin: 0;
    direction: rtl;
}

.qe-learn-root.qe-lang-en .qe-settings-style-modal .qe-settings-content-tab {
    direction: ltr;
    text-align: left;
}

/* Override legacy .popup .form-control { text-align: right } for EN selects */
.qe-learn-root.qe-lang-en .qe-settings-style-modal .qe-settings-content-tab .form-group,
.qe-learn-root.qe-lang-en .qe-settings-style-modal .qe-settings-content-tab select.form-control,
.qe-learn-root.qe-lang-en .qe-settings-style-modal .qe-settings-content-tab .form-control {
    direction: ltr;
    text-align: left !important;
}

.qe-learn-root.qe-lang-en .qe-settings-style-modal #tafseerOptions > div,
.qe-learn-root.qe-lang-en .qe-settings-style-modal #translationOptions > div,
.qe-learn-root.qe-lang-en .qe-settings-style-modal #AsbaabNuzool > div,
.qe-learn-root.qe-lang-en .qe-settings-style-modal #meaningsOptions > div,
.qe-learn-root.qe-lang-en .qe-settings-style-modal #selectedBooks > div,
.qe-learn-root.qe-lang-en .qe-settings-style-modal #meaningsLanguages > div,
.qe-learn-root.qe-lang-en .qe-settings-style-modal .qe-tafseer-lang-col-writers > div {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    direction: ltr;
    gap: 0.35rem;
}

/* Settings popup: height follows screen (viewport), no fixed px height */
.qe-settings-style-modal.popup .modal-dialog {
    height: calc(100vh - 2rem);
    max-height: calc(100vh - 2rem);
    max-width: 1000px;
    width: calc(100% - 2rem);
    margin: 1rem auto;
    display: flex;
}

.qe-settings-style-modal.popup .modal-content {
    height: 100%;
    max-height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: none;
    border-radius: 6px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    color: #383433;
}

.qe-settings-style-modal.popup .modal-header {
    flex: 0 0 auto;
    background-color: #4B3000;
    border-bottom: none;
}

.qe-settings-style-modal .modal-title {
    color: #fff;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 20px;
}

.qe-settings-style-modal .modal-header .close,
.qe-settings-style-modal .modal-header button.close {
    color: #fff;
    opacity: 1;
    text-shadow: none;
}

.qe-settings-style-modal .modal-header .close span {
    font-size: 24px;
    color: #fff;
}

.qe-settings-style-modal .modal-header .close:hover,
.qe-settings-style-modal .modal-header .close:focus {
    color: #fff;
    opacity: 0.85;
}

.qe-settings-style-modal .modal-body {
    background-color: #F3F3F3;
}

.qe-settings-style-modal .btn-primary {
    background-color: #4B3000 !important;
    border: 1px solid #4B3000;
    padding: 0.375rem 2.1rem;
    color: #fff;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    font-weight: 400;
}

.qe-settings-style-modal .btn-primary:hover,
.qe-settings-style-modal .btn-primary:focus {
    background-color: #3a2500 !important;
    border-color: #3a2500;
    color: #fff;
}

.qe-settings-style-modal .nav-pills .nav-link {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 400;
    padding: 0.75rem 1rem;
    font-size: 14px;
    line-height: 1.4;
    color: #4B3000;
    background-color: transparent;
}

.qe-settings-style-modal .nav-pills .nav-link.active,
.qe-settings-style-modal .nav-pills .show > .nav-link {
    color: #4B3000 !important;
    background-color: transparent !important;
    font-weight: 700;
}

.qe-settings-style-modal .settingsidebar {
    background-color: #fff;
    border-radius: 4px;
    padding: 12px 0;
    box-shadow: 0 0 3px 0 #00000026;
}

.qe-settings-style-modal .form-group {
    text-align: right;
}

.qe-learn-root.qe-lang-en .qe-settings-style-modal .form-group {
    text-align: left;
}

.qe-settings-style-modal .form-control {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    color: #383433;
    background-color: #fff;
    border: 1px solid #e6dcc8;
    box-shadow: 0 0 2px 0 #0000001a;
    height: 42px !important;
    text-align: right;
}

.qe-learn-root.qe-lang-en .qe-settings-style-modal .form-control {
    text-align: left;
}

.qe-settings-style-modal select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
}

.qe-settings-style-modal select.form-control::-ms-expand {
    display: none;
}

/* Keep "14 px" in reading order instead of RTL "px 14" */
.qe-settings-style-modal #qeFontSizeSelect {
    direction: ltr;
    unicode-bidi: isolate;
    text-align: right;
}

.qe-learn-root.qe-lang-en .qe-settings-style-modal #qeFontSizeSelect {
    text-align: left;
}

.qe-settings-style-modal .form-group label {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #383433;
}

.qe-settings-style-modal .qe-font-preview {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    line-height: 1.7;
}

.qe-settings-style-modal.popup .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden !important;
    max-height: none !important;
    display: flex;
    flex-direction: column;
}

.qe-settings-style-modal .modal-body > .row.m-0 {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.qe-settings-style-modal .modal-body > .row.m-0 > [class*="col-"] {
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}

.qe-settings-style-modal .modal-body > .row.m-0 > .col-9 {
    display: flex;
    flex-direction: column;
}

.qe-settings-style-modal .settingcontent {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.qe-settings-style-modal .settingcontent > .tab-pane {
    height: 100%;
    min-height: 0;
}

.qe-settings-style-modal .settingcontent > .tab-pane:not(.qe-tafseer-settings-pane) {
    overflow-x: hidden;
    overflow-y: auto;
    padding: 4px 8px 16px 4px;
}

.qe-settings-style-modal .popup .settingsidebar,
.qe-settings-style-modal .settingsidebar {
    min-height: 0 !important;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Tafseer settings pane: fill height, pin Save, scroll only inner lists */
.qe-settings-style-modal .qe-tafseer-settings-pane {
    display: none;
    overflow: hidden !important;
}

.qe-settings-style-modal .qe-tafseer-settings-pane.active,
.qe-settings-style-modal .qe-tafseer-settings-pane.show.active {
    display: flex !important;
    flex-direction: column;
}

.qe-settings-style-modal .qe-tafseer-settings-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.qe-settings-style-modal .qe-tafseer-settings-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.qe-settings-style-modal .qe-tafseer-settings-body > .qe-settings-pane-heading {
    flex: 0 0 auto;
}

.qe-settings-style-modal .qe-tafseer-settings-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    align-items: stretch;
}

/* English only: selection/configure left, select range right */
.qe-learn-root.qe-lang-en .qe-settings-style-modal .qe-tafseer-settings-main .qe-tafseer-download-col {
    order: 1;
}

.qe-learn-root.qe-lang-en .qe-settings-style-modal .qe-tafseer-settings-main .qe-tafseer-scope-col {
    order: 2;
}

.qe-learn-root.qe-lang-en .qe-settings-style-modal .qe-tafseer-settings-pane .qe-tafseer-download-col label,
.qe-learn-root.qe-lang-en .qe-settings-style-modal .qe-tafseer-settings-pane .qe-tafseer-scope-col label,
.qe-learn-root.qe-lang-en .qe-settings-style-modal .qe-tafseer-settings-pane .qe-tafseer-download-col .form-group label {
    display: block;
    text-align: left !important;
}

.qe-settings-style-modal .qe-tafseer-scope-col,
.qe-settings-style-modal .qe-tafseer-download-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}

.qe-settings-style-modal .qe-tafseer-scope-list,
.qe-settings-style-modal #tafseerOptions.qe-tafseer-scope-list,
.qe-settings-style-modal #translationOptions.qe-tafseer-scope-list,
.qe-settings-style-modal #AsbaabNuzool.qe-tafseer-scope-list,
.qe-settings-style-modal #meaningsOptions.qe-tafseer-scope-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
}

/* A writer already added for the chosen language: shown (not hidden) with a
   check mark instead of the "+" add icon, so the full picture of what's
   available/picked/missing per-language is always visible. */
.qe-settings-style-modal #tafseerOptions .qe-tafseer-option-picked,
.qe-settings-style-modal #translationOptions .qe-tafseer-option-picked,
.qe-settings-style-modal #AsbaabNuzool .qe-tafseer-option-picked,
.qe-settings-style-modal #meaningsOptions .qe-tafseer-option-picked {
    opacity: 0.6;
}

.qe-settings-style-modal #tafseerOptions .qe-tafseer-option-picked label,
.qe-settings-style-modal #translationOptions .qe-tafseer-option-picked label,
.qe-settings-style-modal #AsbaabNuzool .qe-tafseer-option-picked label,
.qe-settings-style-modal #meaningsOptions .qe-tafseer-option-picked label {
    font-style: italic;
}

.qe-settings-style-modal #tafseerOptions .qe-tafseer-option-picked .fa-check,
.qe-settings-style-modal #translationOptions .qe-tafseer-option-picked .fa-check,
.qe-settings-style-modal #AsbaabNuzool .qe-tafseer-option-picked .fa-check,
.qe-settings-style-modal #meaningsOptions .qe-tafseer-option-picked .fa-check {
    color: #2e8b3d;
}

/* "No writer for this language" / "all writers already selected" hints */
.qe-settings-style-modal .qe-tafseer-scope-empty-hint {
    color: #8a7a5c;
    font-size: 0.85rem;
    font-style: italic;
    padding: 0.5rem 0.1rem;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal .qe-tafseer-scope-empty-hint {
    text-align: right;
}

.qe-learn-root.qe-lang-en .qe-settings-style-modal .qe-tafseer-scope-empty-hint {
    text-align: left;
}

/* Full-width section outside the two columns */
.qe-settings-style-modal .qe-tafseer-download-meta {
    flex: 1 1 55%;
    width: 100%;
    min-height: 0;
    margin-top: 0.75rem;
    padding: 0 0.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal .qe-tafseer-download-meta {
    text-align: right;
}

.qe-learn-root.qe-lang-en .qe-settings-style-modal .qe-tafseer-download-meta {
    text-align: left;
}

.qe-settings-style-modal .qe-tafseer-settings-footer {
    flex: 0 0 auto;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Save confirmation hint: floats over the settings modal, "Saving..." then "Saved". */
.qe-settings-style-modal .modal-content {
    position: relative;
}

.qe-settings-save-toast {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
    background: #6c757d;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.qe-settings-save-toast.qe-settings-save-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.qe-settings-save-toast.qe-settings-save-toast-saved {
    background: #28a745;
}

/* Expand buttons on the sidebar Tafseer/Translation and Word Meanings/Asbab panels:
   opens a larger modal with the same content as the currently selected tab. */
.qe-expandable-panel {
    position: relative;
    padding-bottom: 40px;
}

.qe-panel-expand-btn {
    position: absolute;
    bottom: 6px;
    left: 6px;
    z-index: 5;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #383433;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    padding: 0;
}

.qe-panel-expand-btn:hover,
.qe-panel-expand-btn:focus {
    background: #383433;
    color: #fff;
}

.qe-panel-expand-btn i {
    font-size: 13px;
}

.qe-panel-expand-modal .modal-body {
    max-height: 75vh;
    overflow-y: auto;
}

/* Word meanings table: meaning on the left, kalma (word) on the right (expand modal only). */
.qe-learn-root.qe-lang-ar #qeMeaningsAsbabExpandModal .modal-body {
    direction: ltr;
    text-align: right;
    background: #fff;
    padding: 12px;
}

.qe-learn-root.qe-lang-ar #qeMeaningsAsbabExpandModal .tabtable {
    direction: ltr;
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

#qeMeaningsAsbabExpandModal .tabtable th,
#qeMeaningsAsbabExpandModal .tabtable td {
    border: 1px solid #dee2e6;
}

#qeMeaningsAsbabExpandModal .tabtable .thead-dark th {
    background-color: #FFF8F1 !important;
    color: #816225 !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    line-height: 29px;
    border: none !important;
    text-align: right;
    font-family: 'Vazirmatn', sans-serif;
}

#qeMeaningsAsbabExpandModal .tabtable tbody tr td {
    border-left: none !important;
    border-bottom: none !important;
    font-weight: 400;
    font-size: 13px;
    line-height: 30px;
    color: #383433;
    text-align: right;
    font-family: 'Vazirmatn', sans-serif;
    background: #fff;
}

#qeMeaningsAsbabExpandModal .tabtable tbody tr td.border-right-0 {
    border-right: none !important;
}

#qeMeaningsAsbabExpandModal .tabtable tbody tr.qe-ayah-meaning-header td {
    background-color: #F9F4EB !important;
    color: #4B3000 !important;
    font-weight: 700 !important;
}

/* The Tafseer/Translation card is styled by the legacy ".radio-selections + div" rule
   (fixed height + white background) with higher specificity than .qe-expandable-panel
   alone, so it wins the "height"/"padding-bottom" cascade unless matched directly here.
   This reserves extra room at the bottom of that same fixed-height card for the expand
   button, without shrinking the space already used by its content (#evenDiv, etc). */
.radio-selections + div.qe-expandable-panel {
    position: relative;
    height: 290px;
}

/* Tafseer settings: selected writers by language — fills remaining space (screen-relative), scrolls inside */
.qe-settings-style-modal .qe-tafseer-selected-langs {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.85rem;
    flex: 1 1 auto;
    width: 100%;
    min-height: 140px;
    overflow-x: auto;
    overflow-y: auto;
    padding: 0.55rem 0.45rem;
    border: 2px dotted rgba(75, 48, 0, 0.35);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.35);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.qe-settings-style-modal .qe-tafseer-lang-col {
    flex: 0 0 auto;
    align-self: stretch;
    min-width: 9.5rem;
    max-width: 12rem;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.7);
    cursor: grab;
    user-select: none;
}

.qe-settings-style-modal .qe-tafseer-lang-col.ui-sortable-helper {
    cursor: grabbing;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
    background: #fff;
}

.qe-settings-style-modal .qe-tafseer-lang-col.ui-sortable-placeholder {
    visibility: visible !important;
    border: 1px dashed rgba(0, 0, 0, 0.25);
    background: rgba(0, 0, 0, 0.04);
    min-height: 4rem;
}

.qe-settings-style-modal .qe-tafseer-lang-col-title {
    font-weight: 700;
    margin: 0;
    padding: 0.45rem 0.55rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #F3E8D5;
    color: #4B3000;
    border-bottom: 1px solid rgba(75, 48, 0, 0.12);
}

.qe-settings-style-modal .qe-tafseer-lang-col-writers {
    min-height: 1.25rem;
    padding: 0 0.55rem 0.35rem;
}

.qe-settings-style-modal .qe-tafseer-lang-col-writers > div {
    margin-top: 0 !important;
    padding: 0.4rem 0;
    border-bottom: 1px dotted rgba(75, 48, 0, 0.35);
    cursor: default;
}

.qe-settings-style-modal .qe-tafseer-lang-col-writers > div:last-child {
    border-bottom: none;
}

/* Drag handle shown only when a language has multiple writers */
.qe-settings-style-modal .qe-writer-drag-handle {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0 0.25rem;
    color: #b0956b;
    cursor: grab;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.qe-settings-style-modal .qe-writer-drag-handle:hover {
    opacity: 1;
    color: #7a5c20;
}

.qe-settings-style-modal .qe-tafseer-lang-col-writers.ui-sortable-disabled .qe-writer-drag-handle {
    cursor: default;
    opacity: 0.35;
}

/* Placeholder row while a writer is being dragged */
.qe-settings-style-modal .qe-writer-row-placeholder {
    height: 2rem;
    border: 1px dashed rgba(75, 48, 0, 0.3) !important;
    background: rgba(243, 232, 213, 0.45);
    border-radius: 3px;
    margin: 0.1rem 0;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal .qe-tafseer-selected-langs {
    direction: rtl;
}

.qe-learn-root.qe-lang-en .qe-settings-style-modal .qe-tafseer-selected-langs {
    direction: ltr;
}

/* Tafseer settings: selected writers sit under the language dropdown and
   stack vertically with an inner vertical scroll instead of a horizontal row. */
.qe-settings-style-modal .qe-tafseer-download-col .qe-tafseer-selected-langs-vertical {
    flex: 1 1 auto;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
}

.qe-settings-style-modal .qe-tafseer-download-col .qe-tafseer-selected-langs-vertical .qe-tafseer-lang-col {
    min-width: 0;
    max-width: none;
    width: 100%;
    flex: 0 0 auto;
}

/* Profile Information modal (header uses .qe-mic-modal brown bar) */
.qe-profile-modal .modal-content {
    position: relative;
    border-radius: 10px;
    border: 1px solid rgba(75, 48, 0, 0.12);
    overflow: hidden;
}

.qe-profile-dialog {
    max-width: 880px;
    width: calc(100% - 1.5rem);
    margin: 0.75rem auto;
}

.qe-profile-modal .modal-header .qe-profile-refreshing {
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
    margin-inline-end: 0.5rem;
    white-space: nowrap;
    flex: 0 0 auto;
}

.qe-profile-modal .modal-body {
    max-height: min(70vh, 640px);
    overflow-y: auto;
    padding: 1rem 1.25rem 0.5rem;
}

.qe-profile-modal .modal-footer {
    border-top: 1px solid rgba(75, 48, 0, 0.1);
    padding: 0.85rem 1.25rem;
    justify-content: space-between;
}

.qe-profile-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.25rem;
}

.qe-profile-avatar-btn {
    position: relative;
    display: inline-block;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    line-height: 0;
}

.qe-profile-avatar-btn:hover .qe-profile-avatar,
.qe-profile-avatar-btn:focus .qe-profile-avatar {
    border-color: #8b6914;
}

.qe-profile-avatar-btn:focus {
    outline: 2px solid rgba(139, 105, 20, 0.45);
    outline-offset: 3px;
}

.qe-profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f0e6d8;
    background: #f7f1e8;
    display: block;
}

.qe-profile-avatar-edit {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #4b3000;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.qe-profile-image-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.qe-profile-avatar-hint {
    margin: 0.5rem 0 0;
    font-size: 0.82rem;
    color: #6b5a48;
}

#qeProfileImageError {
    text-align: center;
    margin-top: 0.35rem;
}

.qe-profile-gender-field {
    border: 0;
    padding: 0;
    margin: 0 0 1rem;
}

.qe-profile-gender-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b5a48;
    margin-bottom: 0.35rem;
    padding: 0;
    width: auto;
}

.qe-profile-gender-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.qe-profile-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    cursor: pointer;
    font-size: 0.95rem;
    color: #383433;
}

.qe-profile-modal .form-control[readonly] {
    background: #f7f1e8;
    color: #6b5a48;
}

.qe-profile-email-hint {
    margin-top: 0.35rem;
    font-size: 0.82rem;
}

.qe-profile-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 220px;
    color: #6b5a48;
    font-size: 0.95rem;
}

.qe-profile-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(75, 48, 0, 0.15);
    border-top-color: #8b6914;
    border-radius: 50%;
    animation: qe-profile-spin 0.75s linear infinite;
}

@keyframes qe-profile-spin {
    to { transform: rotate(360deg); }
}

.qe-profile-alert {
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    font-size: 0.9rem;
}

.qe-profile-toast {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    z-index: 40;
    max-width: calc(100% - 24px);
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    background: #28a745;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    text-align: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.qe-profile-toast.qe-profile-toast-error {
    background: #dc3545;
}

.qe-profile-toast.qe-profile-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.qe-learn-root.qe-lang-ar .qe-profile-modal .modal-body,
.qe-learn-root.qe-lang-ar .qe-profile-modal .modal-footer {
    direction: rtl;
    text-align: right;
}

@media (max-width: 767.98px) {
    .qe-profile-dialog {
        width: calc(100% - 1rem);
        margin: 0.5rem auto;
    }

    .qe-profile-modal .modal-body {
        max-height: calc(100vh - 180px);
        padding: 0.85rem 1rem 0.35rem;
    }

    .qe-profile-gender-options {
        gap: 0.75rem;
    }
}

/* Change password (OTP) flow inside User settings */
.qe-settings-style-modal #v-pills-settings2 .qe-change-password-help {
    margin: 0 0 0.75rem;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #5c4a3a;
}

.qe-settings-style-modal #v-pills-settings2 .qe-change-password-email-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    background: #f7f1e8;
    border: 1px solid rgba(75, 48, 0, 0.12);
}

.qe-settings-style-modal #v-pills-settings2 .qe-change-password-email-label {
    font-size: 0.85rem;
    color: #6b5a48;
}

.qe-settings-style-modal #v-pills-settings2 .qe-change-password-email-value {
    font-size: 0.95rem;
    color: #4b3000;
    letter-spacing: 0.02em;
}

.qe-settings-style-modal #v-pills-settings2 .qe-change-password-alert {
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    font-size: 0.88rem;
    line-height: 1.4;
}

.qe-settings-style-modal #v-pills-settings2 .qe-change-password-alert-error {
    background: #fdecea;
    border: 1px solid #f5c2c0;
    color: #8a1f1b;
}

.qe-settings-style-modal #v-pills-settings2 .qe-change-password-alert-success {
    background: #eaf6ea;
    border: 1px solid #b7dfb9;
    color: #1e6b24;
}

.qe-settings-style-modal #v-pills-settings2 .qe-change-password-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qe-settings-style-modal #v-pills-settings2 .qe-change-password-back {
    color: #4b3000;
    text-decoration: underline;
    padding-left: 0;
    padding-right: 0;
}

.qe-settings-style-modal #v-pills-settings2 .qe-change-password-field {
    max-width: 360px;
}

.qe-settings-style-modal #v-pills-settings2 .qe-password-input-wrap {
    position: relative;
}

.qe-settings-style-modal #v-pills-settings2 .qe-password-input-wrap .form-control {
    padding-inline-end: 2.5rem;
}

.qe-settings-style-modal #v-pills-settings2 .qe-password-toggle-btn {
    position: absolute;
    top: 50%;
    inset-inline-end: 0.55rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6b5a48;
    cursor: pointer;
    line-height: 1;
}

.qe-settings-style-modal #v-pills-settings2 .qe-password-toggle-btn:hover,
.qe-settings-style-modal #v-pills-settings2 .qe-password-toggle-btn:focus {
    color: #4b3000;
    outline: none;
}

.qe-settings-style-modal #v-pills-settings2 .qe-password-toggle-btn .fa {
    font-size: 0.95rem;
    pointer-events: none;
}

.qe-settings-style-modal #v-pills-settings2 .qe-change-password-resend-hint {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #5c4a3a;
}

.qe-settings-style-modal #v-pills-settings2 .qe-change-password-resend {
    padding: 0;
    vertical-align: baseline;
    color: #4b3000;
    text-decoration: underline;
    font-weight: 600;
}

.qe-settings-style-modal #v-pills-settings2 .qe-change-password-resend:disabled {
    opacity: 0.55;
    text-decoration: none;
    cursor: not-allowed;
}

/* Change-password success toast (auto-hides) */
.qe-change-password-toast {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    z-index: 35;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    max-width: calc(100% - 24px);
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
    background: #28a745;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    white-space: normal;
    text-align: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.qe-change-password-toast.qe-change-password-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.qe-learn-root.qe-lang-ar .qe-change-password-toast {
    direction: rtl;
}

/* Arabic RTL: title, help text, email row, actions on the right
   (page body uses dir=ltr, so this pane must force RTL) */
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #v-pills-settings2,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #v-pills-settings2 .row,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #v-pills-settings2 .col-12 {
    direction: rtl;
    text-align: right;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal #v-pills-settings2 .font-weight-bold,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #v-pills-settings2 .qe-change-password-help,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #v-pills-settings2 .qe-change-password-alert,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #v-pills-settings2 .qe-change-password-field label {
    display: block;
    width: 100%;
    text-align: right !important;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal #v-pills-settings2 .qe-change-password-email-row {
    flex-direction: row;
    justify-content: flex-start;
    text-align: right;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal #v-pills-settings2 .qe-change-password-email-value {
    direction: ltr;
    unicode-bidi: plaintext;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal #v-pills-settings2 .qe-change-password-actions,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #v-pills-settings2 .text-right {
    justify-content: flex-start;
    text-align: right !important;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal #v-pills-settings2 .qe-change-password-actions {
    flex-direction: row;
}

/* English LTR */
.qe-learn-root.qe-lang-en .qe-settings-style-modal #v-pills-settings2 {
    direction: ltr;
    text-align: left;
}

.qe-learn-root.qe-lang-en .qe-settings-style-modal #v-pills-settings2 .qe-change-password-email-row {
    justify-content: flex-start;
    text-align: left;
}

.qe-learn-root.qe-lang-en .qe-settings-style-modal #v-pills-settings2 .qe-change-password-actions {
    justify-content: flex-start;
}

/* Settings radios/checkboxes: control before label text */
.qe-settings-style-modal #v-pills-settings1 .qe-lang-option,
.qe-settings-style-modal #v-pills-messages .qe-settings-radio-option,
.qe-settings-style-modal #v-pills-settings2 .qe-settings-check-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

.qe-settings-style-modal #v-pills-settings1 .qe-lang-option .form-check-input,
.qe-settings-style-modal #v-pills-messages .qe-settings-radio-option .form-check-input,
.qe-settings-style-modal #v-pills-settings2 .qe-settings-check-option .form-check-input {
    position: static;
    float: none;
    margin: 0;
    flex: 0 0 auto;
}

.qe-settings-style-modal #v-pills-settings1 .qe-lang-option .form-check-label,
.qe-settings-style-modal #v-pills-messages .qe-settings-radio-option .form-check-label,
.qe-settings-style-modal #v-pills-settings2 .qe-settings-check-option .form-check-label {
    margin: 0;
    padding: 0;
    line-height: 1.4;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #383433;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal #v-pills-settings1 .qe-lang-option,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #v-pills-messages .qe-settings-radio-option,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal #v-pills-settings2 .qe-settings-check-option {
    flex-direction: row;
    justify-content: flex-start;
    text-align: right;
}

.qe-learn-root.qe-lang-en .qe-settings-style-modal #v-pills-settings1 .qe-lang-option,
.qe-learn-root.qe-lang-en .qe-settings-style-modal #v-pills-messages .qe-settings-radio-option,
.qe-learn-root.qe-lang-en .qe-settings-style-modal #v-pills-settings2 .qe-settings-check-option {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
}

/* Downloads modal - Script/Audio scope radios: control before label, single-line text */
.qe-settings-style-modal .qe-scope-radio-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

.qe-settings-style-modal .qe-scope-radio-option .form-check-input {
    position: static;
    float: none;
    margin: 0;
    flex: 0 0 auto;
}

.qe-settings-style-modal .qe-scope-radio-option .form-check-label {
    margin: 0;
    padding: 0;
    line-height: 1.4;
    white-space: nowrap;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal .qe-scope-radio-option {
    flex-direction: row;
    justify-content: flex-start;
    text-align: right;
}

.qe-learn-root.qe-lang-en .qe-settings-style-modal .qe-scope-radio-option {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
}

/* Settings sidebar: icon at the start of the title */
.qe-settings-style-modal .settingsidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: row;
}

.qe-settings-style-modal .settingsidebar .nav-link img {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.qe-settings-style-modal .settingsidebar .nav-link span {
    flex: 1 1 auto;
    padding: 0;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal .settingsidebar .nav-link {
    flex-direction: row;
    text-align: right;
    justify-content: flex-start;
}

.qe-learn-root.qe-lang-en .qe-settings-style-modal .settingsidebar .nav-link {
    flex-direction: row;
    text-align: left;
}

.qe-learn-root.qe-lang-en .qe-settings-style-modal .settingsidebar .nav-link span {
    padding-right: 0;
    padding-left: 0;
}

.qe-learn-root.qe-lang-en .col-4.offset-8,
.qe-learn-root.qe-lang-en .col-5.offset-7 {
    margin-left: 0 !important;
}
/* Listen & Repeat + Show & Hide + Record & Compare + Test Understanding + Combined — shared scope field layout */
#collapseTwo.samaa .samaa-repeat-fields,
#collapseThree.clipboard .samaa-repeat-fields,
#collapseFour.izhhar .samaa-repeat-fields,
#collapseFive.sajjal .samaa-repeat-fields,
#collapseCombined.combined .samaa-repeat-fields {
    direction: rtl;
    text-align: right;
    display: grid;
    grid-template-columns: max-content 1fr;
    align-items: center;
    row-gap: 0.5rem;
    column-gap: 10px;
}

#collapseTwo.samaa .samaa-repeat-mode-choice,
#collapseThree.clipboard .samaa-repeat-mode-choice,
#collapseFour.izhhar .samaa-repeat-mode-choice,
#collapseFive.sajjal .samaa-repeat-mode-choice,
#collapseCombined.combined .samaa-repeat-mode-choice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

#collapseTwo.samaa .samaa-repeat-mode-choice .js-samaa-mode-radio,
#collapseThree.clipboard .samaa-repeat-mode-choice .js-clipboard-mode-radio,
#collapseFour.izhhar .samaa-repeat-mode-choice .js-izhhar-mode-radio,
#collapseFive.sajjal .samaa-repeat-mode-choice .js-sajjal-mode-radio,
#collapseCombined.combined .samaa-repeat-mode-choice .js-combined-mode-radio {
    margin: 0;
    flex-shrink: 0;
}

#collapseTwo.samaa .samaa-repeat-mode-text,
#collapseThree.clipboard .samaa-repeat-mode-text,
#collapseFour.izhhar .samaa-repeat-mode-text,
#collapseFive.sajjal .samaa-repeat-mode-text,
#collapseCombined.combined .samaa-repeat-mode-text {
    color: #383433;
    font-size: 14px;
    white-space: nowrap;
}

/* Surah / Juz / Rub rows: shrink label column, widen dropdown, reduce gap */
#collapseTwo.samaa .samaa-repeat-mode-line.row,
#collapseThree.clipboard .samaa-repeat-mode-line.row,
#collapseFour.izhhar .samaa-repeat-mode-line.row,
#collapseFive.sajjal .samaa-repeat-mode-line.row,
#collapseCombined.combined .samaa-repeat-mode-line.row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    column-gap: 10px;
    margin-left: 0;
    margin-right: 0;
}

#collapseTwo.samaa .samaa-repeat-mode-line.row > .col-md-6,
#collapseThree.clipboard .samaa-repeat-mode-line.row > .col-md-6,
#collapseFour.izhhar .samaa-repeat-mode-line.row > .col-md-6,
#collapseFive.sajjal .samaa-repeat-mode-line.row > .col-md-6,
#collapseCombined.combined .samaa-repeat-mode-line.row > .col-md-6 {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

#collapseTwo.samaa .samaa-repeat-mode-line.row > .col-md-6:first-child,
#collapseThree.clipboard .samaa-repeat-mode-line.row > .col-md-6:first-child,
#collapseFour.izhhar .samaa-repeat-mode-line.row > .col-md-6:first-child,
#collapseFive.sajjal .samaa-repeat-mode-line.row > .col-md-6:first-child,
#collapseCombined.combined .samaa-repeat-mode-line.row > .col-md-6:first-child {
    flex: 0 0 auto;
    width: auto;
}

#collapseTwo.samaa .samaa-repeat-mode-line.row > .col-md-6:last-child,
#collapseThree.clipboard .samaa-repeat-mode-line.row > .col-md-6:last-child,
#collapseFour.izhhar .samaa-repeat-mode-line.row > .col-md-6:last-child,
#collapseFive.sajjal .samaa-repeat-mode-line.row > .col-md-6:last-child,
#collapseCombined.combined .samaa-repeat-mode-line.row > .col-md-6:last-child {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}

/* ── Only the three mode-selection rows become transparent grid items ──
   Their col-md-6 children participate directly in the parent grid, sharing
   the max-content column track. All other rows keep their block layout and
   span both columns with grid-column: 1 / -1. */
#collapseTwo.samaa .samaa-repeat-mode-line.row[data-mode="surah"],
#collapseTwo.samaa .samaa-repeat-mode-line.row[data-mode="juz"],
#collapseTwo.samaa .samaa-repeat-mode-line.row[data-mode="rub"],
#collapseThree.clipboard .samaa-repeat-mode-line.row[data-mode="surah"],
#collapseThree.clipboard .samaa-repeat-mode-line.row[data-mode="juz"],
#collapseThree.clipboard .samaa-repeat-mode-line.row[data-mode="rub"],
#collapseFour.izhhar .samaa-repeat-mode-line.row[data-mode="surah"],
#collapseFour.izhhar .samaa-repeat-mode-line.row[data-mode="juz"],
#collapseFour.izhhar .samaa-repeat-mode-line.row[data-mode="rub"],
#collapseFive.sajjal .samaa-repeat-mode-line.row[data-mode="surah"],
#collapseFive.sajjal .samaa-repeat-mode-line.row[data-mode="juz"],
#collapseFive.sajjal .samaa-repeat-mode-line.row[data-mode="rub"],
#collapseCombined.combined .samaa-repeat-mode-line.row[data-mode="surah"],
#collapseCombined.combined .samaa-repeat-mode-line.row[data-mode="juz"],
#collapseCombined.combined .samaa-repeat-mode-line.row[data-mode="rub"] {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    align-items: center;
    margin-bottom: 0;
}

/* Dropdown cell must fill its subgrid column completely */
#collapseTwo.samaa .samaa-repeat-mode-line.row[data-mode="surah"] > .col-md-6:last-child,
#collapseTwo.samaa .samaa-repeat-mode-line.row[data-mode="juz"]   > .col-md-6:last-child,
#collapseTwo.samaa .samaa-repeat-mode-line.row[data-mode="rub"]   > .col-md-6:last-child,
#collapseThree.clipboard .samaa-repeat-mode-line.row[data-mode="surah"] > .col-md-6:last-child,
#collapseThree.clipboard .samaa-repeat-mode-line.row[data-mode="juz"]   > .col-md-6:last-child,
#collapseThree.clipboard .samaa-repeat-mode-line.row[data-mode="rub"]   > .col-md-6:last-child,
#collapseFour.izhhar .samaa-repeat-mode-line.row[data-mode="surah"] > .col-md-6:last-child,
#collapseFour.izhhar .samaa-repeat-mode-line.row[data-mode="juz"]   > .col-md-6:last-child,
#collapseFour.izhhar .samaa-repeat-mode-line.row[data-mode="rub"]   > .col-md-6:last-child,
#collapseFive.sajjal .samaa-repeat-mode-line.row[data-mode="surah"] > .col-md-6:last-child,
#collapseFive.sajjal .samaa-repeat-mode-line.row[data-mode="juz"]   > .col-md-6:last-child,
#collapseFive.sajjal .samaa-repeat-mode-line.row[data-mode="rub"]   > .col-md-6:last-child,
#collapseCombined.combined .samaa-repeat-mode-line.row[data-mode="surah"] > .col-md-6:last-child,
#collapseCombined.combined .samaa-repeat-mode-line.row[data-mode="juz"]   > .col-md-6:last-child,
#collapseCombined.combined .samaa-repeat-mode-line.row[data-mode="rub"]   > .col-md-6:last-child {
    width: 100%;
    min-width: 0;
}

/* Every other direct child of .samaa-repeat-fields spans both grid columns
   so it keeps its full-width block layout unchanged. */
#collapseTwo.samaa .samaa-repeat-fields > .samaa-repeat-mode-row:not([data-mode="surah"]):not([data-mode="juz"]):not([data-mode="rub"]),
#collapseThree.clipboard .samaa-repeat-fields > .samaa-repeat-mode-row:not([data-mode="surah"]):not([data-mode="juz"]):not([data-mode="rub"]),
#collapseFour.izhhar .samaa-repeat-fields > .samaa-repeat-mode-row:not([data-mode="surah"]):not([data-mode="juz"]):not([data-mode="rub"]),
#collapseFive.sajjal .samaa-repeat-fields > .samaa-repeat-mode-row:not([data-mode="surah"]):not([data-mode="juz"]):not([data-mode="rub"]),
#collapseCombined.combined .samaa-repeat-fields > .samaa-repeat-mode-row:not([data-mode="surah"]):not([data-mode="juz"]):not([data-mode="rub"]) {
    grid-column: 1 / -1;
}

#collapseTwo.samaa .samaa-repeat-mode-line .js-samaa-mode-select,
#collapseThree.clipboard .samaa-repeat-mode-line .js-clipboard-mode-select,
#collapseFour.izhhar .samaa-repeat-mode-line .js-izhhar-mode-select,
#collapseFive.sajjal .samaa-repeat-mode-line .js-sajjal-mode-select,
#collapseCombined.combined .samaa-repeat-mode-line .js-combined-mode-select {
    width: 100%;
    min-width: 12rem;
}

#collapseTwo.samaa .js-samaa-mode-select:disabled,
#collapseThree.clipboard .js-clipboard-mode-select:disabled,
#collapseFour.izhhar .js-izhhar-mode-select:disabled,
#collapseFive.sajjal .js-sajjal-mode-select:disabled,
#collapseCombined.combined .js-combined-mode-select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#collapseTwo.samaa .samaa-repeat-range-grid,
#collapseThree.clipboard .samaa-repeat-range-grid,
#collapseFour.izhhar .samaa-repeat-range-grid,
#collapseFive.sajjal .samaa-repeat-range-grid,
#collapseCombined.combined .samaa-repeat-range-grid {
    display: flex;
    gap: 10px;
    width: 100%;
    padding: 8px 15px;
}

#collapseTwo.samaa .samaa-repeat-range-block,
#collapseThree.clipboard .samaa-repeat-range-block,
#collapseFour.izhhar .samaa-repeat-range-block,
#collapseFive.sajjal .samaa-repeat-range-block,
#collapseCombined.combined .samaa-repeat-range-block {
    flex: 1 1 0;
    min-width: 0;
}

#collapseTwo.samaa .samaa-repeat-range-block h6,
#collapseThree.clipboard .samaa-repeat-range-block h6,
#collapseFour.izhhar .samaa-repeat-range-block h6,
#collapseFive.sajjal .samaa-repeat-range-block h6,
#collapseCombined.combined .samaa-repeat-range-block h6 {
    margin-bottom: 8px;
    font-size: 16px;
}

#collapseTwo.samaa .samaa-repeat-range-fields,
#collapseThree.clipboard .samaa-repeat-range-fields,
#collapseFour.izhhar .samaa-repeat-range-fields,
#collapseFive.sajjal .samaa-repeat-range-fields,
#collapseCombined.combined .samaa-repeat-range-fields {
    display: flex;
    gap: 8px;
    flex-direction: column;
}

#collapseTwo.samaa .samaa-repeat-field--surah,
#collapseThree.clipboard .samaa-repeat-field--surah,
#collapseFour.izhhar .samaa-repeat-field--surah,
#collapseFive.sajjal .samaa-repeat-field--surah,
#collapseCombined.combined .samaa-repeat-field--surah {
    flex: 1 1 auto;
    min-width: 0;
}

#collapseTwo.samaa .samaa-repeat-field--ayah,
#collapseThree.clipboard .samaa-repeat-field--ayah,
#collapseFour.izhhar .samaa-repeat-field--ayah,
#collapseFive.sajjal .samaa-repeat-field--ayah,
#collapseCombined.combined .samaa-repeat-field--ayah {
    flex: 0 0 56px;
}

#collapseTwo.samaa .samaa-repeat-range-fields .form-group,
#collapseThree.clipboard .samaa-repeat-range-fields .form-group,
#collapseFour.izhhar .samaa-repeat-range-fields .form-group,
#collapseFive.sajjal .samaa-repeat-range-fields .form-group,
#collapseCombined.combined .samaa-repeat-range-fields .form-group {
    margin-bottom: 0;
}

#collapseTwo.samaa .samaa-repeat-range-fields .form-group label,
#collapseThree.clipboard .samaa-repeat-range-fields .form-group label,
#collapseFour.izhhar .samaa-repeat-range-fields .form-group label,
#collapseFive.sajjal .samaa-repeat-range-fields .form-group label,
#collapseCombined.combined .samaa-repeat-range-fields .form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

#collapseTwo.samaa .samaa-repeat-field--ayah .form-control,
#collapseThree.clipboard .samaa-repeat-field--ayah .form-control,
#collapseFour.izhhar .samaa-repeat-field--ayah .form-control,
#collapseFive.sajjal .samaa-repeat-field--ayah .form-control,
#collapseCombined.combined .samaa-repeat-field--ayah .form-control {
    text-align: center;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

#collapseTwo.samaa .samaa-repeat-table {
    direction: rtl;
    table-layout: fixed;
    width: 100%;
}

/* Narrow Ù…Ø±Ø§Øª Ø§Ù„ØªÙƒØ±Ø§Ø± + Ø§Ù„ØªÙƒØ±Ø§Ø± columns so Ø§Ù†ØªØ¸Ø§Ø± Ø¨ÙŠÙ† Ø§Ù„Ø§ÙŠØ§Øª gets more space */
#collapseTwo.samaa .samaa-repeat-table th:nth-child(1),
#collapseTwo.samaa .samaa-repeat-table td:nth-child(1) {
    width: 78px;
    max-width: 88px;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

#collapseTwo.samaa .samaa-repeat-table th:nth-child(3),
#collapseTwo.samaa .samaa-repeat-table td:nth-child(3) {
    width: 64px;
    max-width: 72px;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    white-space: nowrap;
}

#collapseTwo.samaa .samaa-repeat-table th:nth-child(3) .form-check,
#collapseTwo.samaa .samaa-repeat-table td:nth-child(3) .form-check {
    margin-bottom: 0;
    padding-right: 0;
    min-height: 0;
}

#collapseTwo.samaa .samaa-repeat-table td:nth-child(3) .form-check-label {
    font-size: 13px;
}

#collapseTwo.samaa .samaa-repeat-table th:nth-child(2),
#collapseTwo.samaa .samaa-repeat-table td:nth-child(2) {
    width: auto;
}

#collapseTwo.samaa .samaa-repeat-table td:nth-child(1) .form-control,
#collapseTwo.samaa .samaa-repeat-table td:nth-child(2) .form-control {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    font-size: 13px;
}

/* English: LTR column order — Repeat count | Pause | Repeat */
.qe-learn-root.qe-lang-en #collapseTwo.samaa .samaa-repeat-table {
    direction: ltr;
}

.qe-learn-root.qe-lang-en #collapseTwo.samaa .samaa-repeat-table th:nth-child(3) .form-check,
.qe-learn-root.qe-lang-en #collapseTwo.samaa .samaa-repeat-table td:nth-child(3) .form-check {
    padding-left: 1.25rem;
    padding-right: 0;
    text-align: left;
}

.qe-learn-root.qe-lang-en #collapseTwo.samaa .samaa-repeat-table td:nth-child(3) .form-check-label {
    text-align: left;
}

#collapseTwo.samaa .samaa-repeat-mode-tabs {
    margin-top: 1rem;
    direction: rtl;
}

.samaa-repeat-mode-tabs .nav-link {
    /* border: 1px solid var(--primary-color); */
    background-color: #FFFBF3;
    border-radius: 6px;
    color: var(--primary-color);
    height: 40px !important;
}
.samaa-repeat-mode-tabs .nav-tabs .nav-link.active {
    border: 1px solid transparent !important;
}

.samaa-repeat-table .thead-dark th {
    background-color: #FFF8F1;
    color: #816225;
    font-weight: 400;
    font-size: 14px;
    border: none;
}

.samaa-repeat-mode-tabs li {
    margin-bottom: 0.75rem;
}

.samaa-repeat-mode-tabs .nav-link.active {
    color: #212529;
}

#collapseTwo.samaa .samaa-repeat-mode-tablist {
    border-bottom: 1px solid #dee2e6;
}

#collapseTwo.samaa .samaa-repeat-mode-tablist .nav-link {
    color: #495057;
    font-weight: 600;
}

#collapseTwo.samaa .samaa-repeat-mode-tablist .nav-link.active {
    color: #212529;
}

#collapseTwo.samaa .samaa-repeat-mode-tab-content {
    padding-top: 0.75rem;
}

#collapseTwo.samaa .samaa-repeat-advanced-placeholder {
    min-height: 120px;
}

/* Advanced mode tab/pane hidden until implemented */
#collapseTwo.samaa #samaa-repeat-advanced {
    display: none !important;
}

#collapseTwo.samaa .samaa-repeat-actions,
#collapseThree.clipboard .samaa-repeat-actions,
#collapseFour.izhhar .samaa-repeat-actions,
#collapseFive.sajjal .samaa-repeat-actions {
    margin-top: 0.75rem;
}

#collapseTwo.samaa .samaa-repeat-proceed-btn,
#collapseThree.clipboard .samaa-repeat-proceed-btn,
#collapseFour.izhhar .samaa-repeat-proceed-btn,
#collapseFive.sajjal .samaa-repeat-proceed-btn {
    min-width: 7rem;
    font-weight: 600;
}

#collapseTwo.samaa .samaa-repeat-proceed-btn:disabled,
#collapseThree.clipboard .samaa-repeat-proceed-btn:disabled,
#collapseFour.izhhar .samaa-repeat-proceed-btn:disabled,
#collapseFive.sajjal .samaa-repeat-proceed-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Listen & Repeat â€” mushaf session tooltip + UI lock */
.qe-learn-root .qe-mushaf-col .form-row.mx-0 {
    position: relative;
}

.samaa-repeat-mushaf-tooltip {
    display: none;
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 10061;
    min-width: 200px;
    max-width: 280px;
    padding: 0.75rem 2.25rem 0.75rem 0.75rem;
    background: #fff;
    border: 1px solid #e0c9a0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    direction: rtl;
    text-align: right;
    pointer-events: auto;
}

.samaa-repeat-mushaf-tooltip.is-visible {
    display: block;
}

.samaa-repeat-mushaf-tooltip.is-floating {
    position: fixed;
}

.samaa-repeat-tooltip-close {
    position: absolute;
    top: 4px;
    left: 6px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    color: #666;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    pointer-events: auto;
}

.samaa-repeat-tooltip-close:hover {
    color: #212529;
}

.samaa-repeat-tooltip-title {
    font-weight: 600;
    color: #816225;
    font-size: 14px;
    margin-bottom: 0.5rem;
}

.samaa-repeat-tooltip-settings {
    font-size: 13px;
    color: #495057;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.samaa-repeat-tooltip-live {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.35rem;
    border-top: 1px solid #f0e6d6;
}

.samaa-repeat-tooltip-live-label {
    font-size: 13px;
    color: #816225;
}

.samaa-repeat-tooltip-live-value {
    font-size: 16px;
    font-weight: 700;
    color: #212529;
}

.samaa-repeat-tooltip-delay.is-waiting .samaa-repeat-tooltip-live-value {
    color: #b45309;
}

.samaa-repeat-tooltip-value {
    font-size: 15px;
    color: #212529;
}

/* Shared visual dim overlay (Record & Compare may still use this class).
   Listen & Repeat no longer shows it â€” same CSS-only lock pattern as Tajweed. */
.samaa-repeat-session-blocker {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: rgba(0, 0, 0, 0.12);
    cursor: not-allowed;
}

.samaa-repeat-session-blocker.is-visible {
    display: block;
}

/* Self-learning tool groups — colors match Self Study Tools mockup */
#sidebar-tabs #home .accordion > .card.qe-tool-group-green,
#sidebar-tabs #home .accordion > .card.qe-tool-group-blue,
#sidebar-tabs #home .accordion > .card.qe-tool-group-purple,
#sidebar-tabs #home .accordion > .card.qe-tool-group-teal {
    /* Prevent accordion overflow from clipping the header bottom border */
    overflow: visible !important;
    margin-bottom: 0.4rem !important;
}

#sidebar-tabs #home .card.qe-tool-group-green .card-header,
#sidebar-tabs #home .card.qe-tool-group-blue .card-header,
#sidebar-tabs #home .card.qe-tool-group-purple .card-header,
#sidebar-tabs #home .card.qe-tool-group-teal .card-header {
    /* Override base `#sidebar-tabs .tab-content .card-header { border: none }` */
    border-top: 1.5px solid transparent !important;
    border-right: 1.5px solid transparent !important;
    border-bottom: 1.5px solid transparent !important;
    border-left: 1.5px solid transparent !important;
    border-radius: 8px;
    /* Compact on large screens — avoid tall awkward rows */
    padding: 5px 10px !important;
    margin-bottom: 0 !important;
    box-sizing: border-box;
    background-clip: padding-box;
    min-height: 0;
}

#sidebar-tabs #home .card.qe-tool-group-green .card-header {
    background-color: #eaf6ea;
    border-color: #6fbf73 !important;
}

#sidebar-tabs #home .card.qe-tool-group-blue .card-header {
    background-color: #e8f3fb;
    border-color: #5ba3d9 !important;
}

#sidebar-tabs #home .card.qe-tool-group-purple .card-header {
    background-color: #f3eef8;
    border-color: #9b7bc4 !important;
}

#sidebar-tabs #home .card.qe-tool-group-teal .card-header {
    background-color: #e6f6f4;
    border-color: #4db6a8 !important;
}

#sidebar-tabs #home .card.qe-tool-group-green .card-header .btn-link,
#sidebar-tabs #home .card.qe-tool-group-blue .card-header .btn-link,
#sidebar-tabs #home .card.qe-tool-group-purple .card-header .btn-link,
#sidebar-tabs #home .card.qe-tool-group-teal .card-header .btn-link {
    min-height: 0;
    line-height: 1.2;
    align-items: center;
}

#sidebar-tabs #home .card.qe-tool-group-green .card-header .btn-link span,
#sidebar-tabs #home .card.qe-tool-group-blue .card-header .btn-link span,
#sidebar-tabs #home .card.qe-tool-group-purple .card-header .btn-link span,
#sidebar-tabs #home .card.qe-tool-group-teal .card-header .btn-link span {
    color: #3d2b1f;
    /* Cap size so large viewports don't inflate the controls */
    font-size: 0.875rem !important;
    line-height: 1.25;
}

#sidebar-tabs #home .card.qe-tool-group-green .card-header .btn-link img:not(.angleimg),
#sidebar-tabs #home .card.qe-tool-group-blue .card-header .btn-link img:not(.angleimg),
#sidebar-tabs #home .card.qe-tool-group-purple .card-header .btn-link img:not(.angleimg),
#sidebar-tabs #home .card.qe-tool-group-teal .card-header .btn-link img:not(.angleimg),
#sidebar-tabs #home .card.qe-tool-group-green .card-header .btn-link img[src*="combined-tool.png"],
#sidebar-tabs #home .card.qe-tool-group-blue .card-header .btn-link img[src*="combined-tool.png"],
#sidebar-tabs #home .card.qe-tool-group-purple .card-header .btn-link img[src*="combined-tool.png"],
#sidebar-tabs #home .card.qe-tool-group-teal .card-header .btn-link img[src*="combined-tool.png"],
#sidebar-tabs #home .card.qe-tool-group-green .card-header .btn-link img[src*="question-mark.png"],
#sidebar-tabs #home .card.qe-tool-group-blue .card-header .btn-link img[src*="question-mark.png"],
#sidebar-tabs #home .card.qe-tool-group-purple .card-header .btn-link img[src*="question-mark.png"],
#sidebar-tabs #home .card.qe-tool-group-teal .card-header .btn-link img[src*="question-mark.png"] {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    object-fit: contain;
    flex-shrink: 0;
}

#sidebar-tabs #home .card.qe-tool-group-green .card-header .btn-link img.angleimg,
#sidebar-tabs #home .card.qe-tool-group-blue .card-header .btn-link img.angleimg,
#sidebar-tabs #home .card.qe-tool-group-purple .card-header .btn-link img.angleimg,
#sidebar-tabs #home .card.qe-tool-group-teal .card-header .btn-link img.angleimg {
    width: 14px !important;
    height: 14px !important;
}

#sidebar-tabs #home .card.qe-tool-group-green .card-header h5,
#sidebar-tabs #home .card.qe-tool-group-blue .card-header h5,
#sidebar-tabs #home .card.qe-tool-group-purple .card-header h5,
#sidebar-tabs #home .card.qe-tool-group-teal .card-header h5 {
    margin: 0;
    line-height: 1.2;
}

/* Slight extra gap between color groups */
#sidebar-tabs #home .card.qe-tool-group-green + .qe-tool-group-blue,
#sidebar-tabs #home .card.qe-tool-group-blue + .qe-tool-group-purple,
#sidebar-tabs #home .card.qe-tool-group-purple + .qe-tool-group-teal {
    margin-top: 0.45rem !important;
}

/* Right-panel active tool badge + End session control (right of accordion arrow) */
#sidebar-tabs .card-header .btn-link.qe-learn-tool-heading {
    display: flex;
    align-items: center;
    flex-direction: row;
    direction: ltr;
    gap: 0.35rem;
    width: 100%;
}

.qe-learn-session-controls {
    display: none;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.3rem;
    margin: 0 0.15rem;
    flex-grow: 0 !important;
    text-align: center !important;
    color: inherit;
}

#sidebar-tabs .tab-content .card-header .btn-link .qe-learn-session-end-btn,
#collapseOne.tajweed .qe-learn-session-end-btn {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    flex-grow: 0 !important;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    padding: 0 !important;
    font-size: 0 !important;
    font-weight: 700 !important;
    line-height: 0 !important;
    color: transparent !important;
    text-align: center !important;
    background: #d32f2f !important;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
    user-select: none;
}

#sidebar-tabs .tab-content .card-header .btn-link .qe-learn-session-end-btn::before,
#sidebar-tabs .tab-content .card-header .btn-link .qe-learn-session-end-btn::after,
#collapseOne.tajweed .qe-learn-session-end-btn::before,
#collapseOne.tajweed .qe-learn-session-end-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.55rem;
    height: 2px;
    background: #fff;
    border-radius: 1px;
}

#sidebar-tabs .tab-content .card-header .btn-link .qe-learn-session-end-btn::before,
#collapseOne.tajweed .qe-learn-session-end-btn::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

#sidebar-tabs .tab-content .card-header .btn-link .qe-learn-session-end-btn::after,
#collapseOne.tajweed .qe-learn-session-end-btn::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

#sidebar-tabs .tab-content .card-header .btn-link .qe-learn-session-end-btn:hover,
#sidebar-tabs .tab-content .card-header .btn-link .qe-learn-session-end-btn:focus,
#collapseOne.tajweed .qe-learn-session-end-btn:hover,
#collapseOne.tajweed .qe-learn-session-end-btn:focus {
    color: transparent !important;
    background: #b71c1c !important;
    outline: none;
}

.qe-learn-session-active-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    flex-grow: 0 !important;
    margin: 0;
    padding: 0.15rem 0.55rem;
    min-width: 2.75rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-align: center !important;
    color: #1b5e20 !important;
    background: #c8e6c9;
    border: 1px solid #a5d6a7;
    border-radius: 999px;
    white-space: nowrap;
}

/* Accordion tools (no sub-actions): controls on header, right of arrow */
body.samaa-repeat-session-locked #headingTwo .qe-learn-session-controls,
body.clipboard-session-locked #headingThree .qe-learn-session-controls,
body.izhhar-session-locked #headingFour .qe-learn-session-controls,
body.sajjal-session-locked #headingFive .qe-learn-session-controls,
body.combined-session-locked #headingCombined .qe-learn-session-controls,
body.assignment-session-locked #headingO12 .qe-learn-session-controls,
body.asgn-correction-review #headingO12 .qe-learn-session-controls,
body.qe-tasgn-open #headingT02 .qe-learn-session-controls {
    display: inline-flex;
}

/* مراجعة الواجب (correct-play): Active/× on O16; hide Assignments session chrome. */
body.assignment-session-locked.asgn-correct-play #headingO16 .qe-learn-session-controls {
    display: inline-flex;
}

body.assignment-session-locked.asgn-correct-play #headingO12 .qe-learn-session-controls {
    display: none !important;
}

/* مراجعة الواجب dedicated session: Active/× on O16; keep list usable. */
body.asgn-review-session-locked #headingO16 .qe-learn-session-controls {
    display: inline-flex;
}

body.asgn-review-session-locked.asgn-review-active #sidebar-tabs .card-header .btn-link[data-target="#collapseO16"],
body.asgn-review-session-locked.asgn-review-active #headingO16 .btn-link,
body.asgn-review-session-locked.asgn-review-active #asgnCorrectEndSession {
    pointer-events: auto !important;
    opacity: 1 !important;
}

body.asgn-review-session-locked.asgn-review-active #collapseO16,
body.asgn-review-session-locked.asgn-review-active #collapseO16 * {
    pointer-events: auto !important;
}

/* Tajweed sub-actions: controls on left; show only on the selected link */
#collapseOne.tajweed a.js-tajweed-show-all-link,
#collapseOne.tajweed a.js-tajweed-select-rule-link {
    display: flex;
    align-items: center;
    flex-direction: row;
    direction: ltr;
    gap: 0.4rem;
}

#collapseOne.tajweed a.js-tajweed-show-all-link > .qe-learn-session-controls,
#collapseOne.tajweed a.js-tajweed-select-rule-link > .qe-learn-session-controls {
    order: -1;
    margin-inline-end: 0.15rem;
}

#collapseOne.tajweed a.js-tajweed-show-all-link .qe-learn-tajweed-link-text,
#collapseOne.tajweed a.js-tajweed-select-rule-link .qe-learn-tajweed-link-text {
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
}

#collapseOne.tajweed a.js-tajweed-show-all-link > img,
#collapseOne.tajweed a.js-tajweed-select-rule-link > img {
    flex: 0 0 auto;
    margin-inline-start: auto;
}

/* English Tajweed sub-links: icon left, text, Active/close on the right */
.qe-learn-root.qe-lang-en #collapseOne.tajweed a.js-tajweed-show-all-link .qe-learn-tajweed-link-text,
.qe-learn-root.qe-lang-en #collapseOne.tajweed a.js-tajweed-select-rule-link .qe-learn-tajweed-link-text {
    text-align: left;
    order: 0;
}

.qe-learn-root.qe-lang-en #collapseOne.tajweed a.js-tajweed-show-all-link > img,
.qe-learn-root.qe-lang-en #collapseOne.tajweed a.js-tajweed-select-rule-link > img {
    order: -1;
    margin-inline-start: 0;
    margin-inline-end: 0.5rem;
    margin-left: 0;
    margin-right: 0.5rem;
}

.qe-learn-root.qe-lang-en #collapseOne.tajweed a.js-tajweed-show-all-link > .qe-learn-session-controls,
.qe-learn-root.qe-lang-en #collapseOne.tajweed a.js-tajweed-select-rule-link > .qe-learn-session-controls {
    order: 2;
    margin-inline-end: 0;
    margin-left: auto;
}

body.tajweed-mode-show-all #collapseOne .js-tajweed-show-all-link > .qe-learn-session-controls,
body.tajweed-mode-select-rule #collapseOne .js-tajweed-select-rule-link > .qe-learn-session-controls {
    display: inline-flex;
}

/* Keep Active badge readable under EN span color rules */
.qe-learn-root.qe-lang-en #sidebar-tabs .tab-content .card-header .btn-link .qe-learn-session-active-badge {
    color: #1b5e20;
}

/* English: Active badge left of close × (pair stays on the right of the tab) */
.qe-learn-root.qe-lang-en .qe-learn-session-controls {
    flex-direction: row;
}

.qe-learn-root.qe-lang-en .qe-learn-session-controls .qe-learn-session-active-badge {
    order: 1;
}

.qe-learn-root.qe-lang-en .qe-learn-session-controls .qe-learn-session-end-btn {
    order: 2;
}

/* â”€â”€ Listen & Repeat session lock (Tajweed-style: no overlay, CSS disables actions) â”€â”€ */
body.samaa-repeat-session-locked .samaa-repeat-mushaf-tooltip {
    pointer-events: auto;
}

/* Other self-learning accordion headers disabled (keep Listen & Repeat panel visible) */
body.samaa-repeat-session-locked #sidebar-tabs .card-header .btn-link:not([data-target="#collapseTwo"]) {
    pointer-events: none;
    opacity: 0.55;
}

/* Combined Tools owns the session UI — keep original tool tabs closed/disabled */
body.combined-session-locked #sidebar-tabs .card-header .btn-link:not([data-target="#collapseCombined"]) {
    pointer-events: none !important;
    opacity: 0.55 !important;
}

body.combined-session-locked #headingCombined .btn-link {
    pointer-events: auto !important;
    opacity: 1 !important;
}

body.combined-session-locked #headingTwo .qe-learn-session-controls,
body.combined-session-locked #headingFour .qe-learn-session-controls,
body.combined-session-locked #headingFive .qe-learn-session-controls {
    display: none !important;
}

/* Disable other tool actions while Listen & Repeat plays.
   Panel settings + ØªØ´ØºÙŠÙ„ stay usable so new settings can be applied anytime. */
body.samaa-repeat-session-locked #collapseOne .js-tajweed-show-all-link,
body.samaa-repeat-session-locked #collapseOne .js-tajweed-select-rule-link,
body.samaa-repeat-session-locked #collapseOne .js-tajweed-lessons-link,
body.samaa-repeat-session-locked #collapseFour .js-izhhar-mode-radio,
body.samaa-repeat-session-locked #collapseFour .js-izhhar-mode-select,
body.samaa-repeat-session-locked #izhharStart,
body.samaa-repeat-session-locked #collapseFive .js-sajjal-mode-radio,
body.samaa-repeat-session-locked #collapseFive .js-sajjal-mode-select,
body.samaa-repeat-session-locked #sajjalStart {
    pointer-events: none;
    opacity: 0.55;
}

/* Mushaf page nav + ayah selection locked (system advances pages during playback) */
body.samaa-repeat-session-locked #aNextPage,
body.samaa-repeat-session-locked #aPreviousPage,
body.samaa-repeat-session-locked .qe-mushaf-col .heading select,
body.samaa-repeat-session-locked .qe-mushaf-col .form-row.mx-0 input,
body.samaa-repeat-session-locked .qe-mushaf-col .form-row.mx-0 select,
body.samaa-repeat-session-locked #page_mapEven area,
body.samaa-repeat-session-locked #page_mapOdd area,
body.samaa-repeat-session-locked .imgarea canvas {
    pointer-events: none;
    cursor: default;
}

body.samaa-repeat-session-locked #aNextPage,
body.samaa-repeat-session-locked #aPreviousPage,
body.samaa-repeat-session-locked .qe-mushaf-col .heading select,
body.samaa-repeat-session-locked .qe-mushaf-col .form-row.mx-0 input,
body.samaa-repeat-session-locked .qe-mushaf-col .form-row.mx-0 select {
    opacity: 0.55;
}

/* Hide default mushaf play controls; Listen & Repeat uses its own bar */
body.samaa-repeat-session-locked .bottom-bar > .center-icons:not(.sajjal-control-bar):not(.asgn-control-bar) {
    display: none !important;
}

body.samaa-repeat-session-locked #samaaRepeatControlBar.is-visible {
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* Left study panels stay usable (translation/tafseer + meanings/asbab). Lock settings menus only. */
body.samaa-repeat-session-locked .sidebar-content .btn-tabs-menu,
body.samaa-repeat-session-locked .sidebar-content .tabs-menu {
    pointer-events: none;
    opacity: 0.55;
}

/* Show & Hide (Ø§Ø¸Ù‡Ø± ÙˆØ§Ø®ÙÙŠ) â€” reveal options + mushaf session tooltip */
#collapseFour.izhhar .izhhar-reveal-options {
    direction: rtl;
    text-align: right;
    margin-top: 1rem;
}

.qe-learn-root.qe-lang-en #collapseTwo.samaa .samaa-repeat-fields,
.qe-learn-root.qe-lang-en #collapseThree.clipboard .samaa-repeat-fields,
.qe-learn-root.qe-lang-en #collapseFour.izhhar .samaa-repeat-fields,
.qe-learn-root.qe-lang-en #collapseFive.sajjal .samaa-repeat-fields,
.qe-learn-root.qe-lang-en #collapseCombined.combined .samaa-repeat-fields {
    direction: ltr;
    text-align: left;
}

.qe-learn-root.qe-lang-en #collapseFour.izhhar .izhhar-reveal-options {
    direction: ltr;
    text-align: left;
}

body.izhhar-session-locked #page_mapEven area,
body.izhhar-session-locked #page_mapOdd area {
    pointer-events: none;
    cursor: default;
}

body.izhhar-session-locked #page_mapEven area.izhhar-current-area,
body.izhhar-session-locked #page_mapOdd area.izhhar-current-area {
    pointer-events: auto;
    cursor: pointer;
}

body.izhhar-session-locked #izhharMushafTooltip {
    pointer-events: auto;
}

body.izhhar-session-locked #sidebar-tabs .card-header .btn-link:not([data-target="#collapseFour"]) {
    pointer-events: none;
    opacity: 0.55;
}

body.izhhar-session-locked #aNextPage,
body.izhhar-session-locked #aPreviousPage,
body.izhhar-session-locked .qe-mushaf-col .heading select,
body.izhhar-session-locked #samaaRepeatProceed,
body.izhhar-session-locked #clipboardProceed {
    pointer-events: none;
    opacity: 0.55;
}

/* Keep playback controls visible but disabled during Show & Hide */
body.izhhar-session-locked .bottom-bar > .center-icons:not(.sajjal-control-bar) {
    pointer-events: none;
    opacity: 0.55;
}

/* Record & Compare (Ø³Ø¬Ù„ ÙˆÙ‚Ø§Ø±Ù†) */
.sajjal-inline-error {
    margin-top: 0.75rem;
    min-height: 1.25rem;
    font-size: 13px;
    color: #b71c1c;
    text-align: center;
}

.sajjal-control-bar {
    display: none !important;
}

.sajjal-control-bar.is-visible {
    display: flex !important;
}

.sajjal-bar-btn {
    border: none;
    background: transparent;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    color: inherit;
}

.sajjal-bar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sajjal-recording-panel {
    display: none;
    position: absolute;
    left: 50%;
    bottom: 72px;
    z-index: 10060;
    width: calc(100% - 24px);
    max-width: 720px;
    margin: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid #e0c9a0;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    transform: translateX(-50%);
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden;
}

.sajjal-recording-panel.is-visible {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sajjal-recording-panel.is-dragging {
    opacity: 0.92;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

/* Merged session chrome (title + close) â€” also the drag handle.
   Close on left, title on right (forced LTR), matching Tajweed session tooltip. */
.sajjal-panel-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.45rem 0.75rem 0.45rem 0.55rem;
    background: linear-gradient(180deg, #faf6ee 0%, #f3ead9 100%);
    border-bottom: 1px solid #e0c9a0;
    cursor: move;
    touch-action: none;
    direction: ltr;
}

.sajjal-panel-header-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
    min-width: 0;
    flex: 1 1 auto;
    text-align: right;
}

.sajjal-panel-title {
    font-size: 13px;
    font-weight: 700;
    color: #5c4819;
    line-height: 1.25;
}

.sajjal-panel-live {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    font-size: 11px;
    line-height: 1.2;
    color: #816225;
}

.sajjal-panel-live-label {
    opacity: 0.85;
}

.sajjal-panel-live-value {
    font-weight: 600;
}

/* Same red circular Close as Tajweed / Listen & Repeat session tooltips */
#sajjalRecordingPanel .samaa-repeat-tooltip-close,
#asgnReviewRecordingPanel .samaa-repeat-tooltip-close {
    position: static;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dc3545 !important;
    color: #fff !important;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    padding: 0;
    border: none;
    z-index: 2;
}

#sajjalRecordingPanel .samaa-repeat-tooltip-close:hover,
#asgnReviewRecordingPanel .samaa-repeat-tooltip-close:hover {
    background: #c82333 !important;
    color: #fff !important;
}

.sajjal-panel-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.35rem 0.55rem 0.4rem;
    transition: opacity 0.15s ease;
}

/* At Start: only "Your recording" stays disabled until first Record.
   Reciter preview + ayah nav remain usable so the learner can listen first. */
.sajjal-recording-panel.is-body-disabled .sajjal-wave-user {
    opacity: 0.45;
    pointer-events: none;
}

/* Reciter (left) + Your recording (right) — forced LTR so order is stable in AR/EN */
.sajjal-waves-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.45rem;
    width: 100%;
    direction: ltr;
}

.sajjal-wave-user,
.sajjal-wave-reciter {
    flex: 1 1 0;
    min-width: 0;
    width: 50%;
    margin-bottom: 0;
}

/* Arabic: label on right, action button on left. English: label left, button right. */
.sajjal-wave-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.1rem;
    direction: rtl;
}

.qe-learn-root.qe-lang-en .sajjal-wave-header {
    direction: ltr;
}

.sajjal-wave-label {
    font-size: 11px;
    font-weight: 600;
    color: #816225;
    line-height: 1.2;
}

.sajjal-wave-btn {
    border: 1px solid #e0c9a0;
    background: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    line-height: 1;
    cursor: pointer;
    font-size: 10px;
    padding: 0;
    flex-shrink: 0;
}

.sajjal-wave-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sajjal-wave-canvas {
    display: block;
    width: 100%;
    height: 36px;
    border-radius: 4px;
    background: #f5f0e6;
}

/* Centered: [←] ayah# [→] — icons stay LTR; Arabic swaps Prev/Next button roles in markup. */
.sajjal-ayah-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 0.15rem;
    direction: ltr;
}

.sajjal-ayah-nav-btns {
    display: none;
}

#sajjalAyahCounterLabel,
#asgnReviewAyahCounterLabel,
.sajjal-ayah-counter {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    min-width: 3.25rem;
    text-align: center;
}

.sajjal-ayah-nav-btn,
.sajjal-ayah-next-btn {
    border: 1px solid #e0c9a0;
    background: #fff;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    line-height: 1;
    cursor: pointer;
    font-size: 11px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #5c4819;
}

.sajjal-ayah-nav-btn:disabled,
.sajjal-ayah-next-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

body.sajjal-session-locked #sajjalRecordingPanel,
body.sajjal-session-locked #sajjalControlBar {
    pointer-events: auto;
}

body.asgn-review-session-locked #asgnReviewRecordingPanel,
body.asgn-review-session-locked #asgnReviewControlBar {
    pointer-events: auto;
}

/* Header (title + close) stays interactive even while recording body is disabled */
body.sajjal-session-locked #sajjalRecordingPanel.is-body-disabled .sajjal-panel-header {
    pointer-events: auto;
}

body.asgn-review-session-locked #asgnReviewRecordingPanel.is-body-disabled .sajjal-panel-header {
    pointer-events: auto;
}

body.sajjal-session-locked .qe-mushaf-col .form-row.mx-0 {
    position: relative;
    z-index: 10055;
}

body.asgn-review-session-locked .qe-mushaf-col .form-row.mx-0 {
    position: relative;
    z-index: 10055;
}

body.sajjal-session-locked #sidebar-tabs .card-header .btn-link:not([data-target="#collapseFive"]) {
    pointer-events: none;
    opacity: 0.55;
}

body.asgn-review-session-locked #sidebar-tabs .card-header .btn-link:not([data-target="#collapseO16"]) {
    pointer-events: none;
    opacity: 0.55;
}

/* Mushaf navigation locked for the session (sequential ayah flow only) */
body.sajjal-session-locked #aNextPage,
body.sajjal-session-locked #aPreviousPage,
body.sajjal-session-locked .bottom-bar .sideicon,
body.sajjal-session-locked .bottom-bar .pgDivSelect,
body.sajjal-session-locked .bottom-bar .pgDivSelectEven,
body.sajjal-session-locked .bottom-bar .pageListVal,
body.sajjal-session-locked .bottom-bar .pageListValEven,
body.sajjal-session-locked .bottom-bar .pgWraper,
body.sajjal-session-locked .bottom-bar .pgWraperEven,
body.sajjal-session-locked .qe-mushaf-col .heading select,
body.sajjal-session-locked .qe-mushaf-col .form-row.mx-0 input,
body.sajjal-session-locked .qe-mushaf-col .form-row.mx-0 select,
body.sajjal-session-locked #page_mapEven area,
body.sajjal-session-locked #page_mapOdd area,
body.sajjal-session-locked #samaaRepeatProceed,
body.sajjal-session-locked #izhharStart,
body.sajjal-session-locked #clipboardProceed,
body.sajjal-session-locked #sajjalStart,
body.asgn-review-session-locked #aNextPage,
body.asgn-review-session-locked #aPreviousPage,
body.asgn-review-session-locked .bottom-bar .sideicon,
body.asgn-review-session-locked .bottom-bar .pgDivSelect,
body.asgn-review-session-locked .bottom-bar .pgDivSelectEven,
body.asgn-review-session-locked .bottom-bar .pageListVal,
body.asgn-review-session-locked .bottom-bar .pageListValEven,
body.asgn-review-session-locked .bottom-bar .pgWraper,
body.asgn-review-session-locked .bottom-bar .pgWraperEven,
body.asgn-review-session-locked .qe-mushaf-col .heading select,
body.asgn-review-session-locked .qe-mushaf-col .form-row.mx-0 input,
body.asgn-review-session-locked .qe-mushaf-col .form-row.mx-0 select,
body.asgn-review-session-locked #page_mapEven area,
body.asgn-review-session-locked #page_mapOdd area,
body.asgn-review-session-locked #samaaRepeatProceed,
body.asgn-review-session-locked #izhharStart,
body.asgn-review-session-locked #clipboardProceed,
body.asgn-review-session-locked #sajjalStart {
    pointer-events: none !important;
    opacity: 0.55;
    cursor: default;
}

/* Hide open page-picker menus if any were left open at Start */
body.sajjal-session-locked .bottom-bar .pgWraper,
body.sajjal-session-locked .bottom-bar .pgWraperEven,
body.asgn-review-session-locked .bottom-bar .pgWraper,
body.asgn-review-session-locked .bottom-bar .pgWraperEven {
    display: none !important;
}

body.izhhar-session-locked #sajjalStart,
body.izhhar-session-locked #collapseFive .js-sajjal-mode-select,
body.izhhar-session-locked #collapseFive .js-sajjal-mode-radio {
    pointer-events: none;
    opacity: 0.55;
}

/* Tajweed mushaf session */
body.tajweed-session-locked #sidebar-tabs .card-header .btn-link:not([data-target="#collapseOne"]) {
    pointer-events: none;
    opacity: 0.55;
}

body.tajweed-session-locked #collapseOne .js-tajweed-lessons-link,
body.tajweed-session-locked #collapseTwo .js-samaa-mode-radio,
body.tajweed-session-locked #collapseTwo .js-samaa-mode-select,
body.tajweed-session-locked #samaaRepeatProceed,
body.tajweed-session-locked #collapseFour .js-izhhar-mode-radio,
body.tajweed-session-locked #collapseFour .js-izhhar-mode-select,
body.tajweed-session-locked #izhharStart {
    pointer-events: none;
    opacity: 0.55;
}

body.tajweed-session-locked #tajweedMushafTooltip,
body.tajweed-session-locked #tajweedWordTooltip {
    pointer-events: auto;
}

/* Keep playback controls visible but disabled; pagination stays usable */
body.tajweed-session-locked .bottom-bar > .center-icons:not(.sajjal-control-bar) {
    pointer-events: none;
    opacity: 0.55;
}

body.izhhar-session-locked #collapseOne .js-tajweed-show-all-link,
body.izhhar-session-locked #collapseOne .js-tajweed-select-rule-link {
    pointer-events: none;
    opacity: 0.55;
}

/* Tajweed + Listen & Repeat + Test Understanding + Show & Hide session chrome: over bottom-bar play controls, centered */
#tajweedMushafTooltip,
#samaaRepeatMushafTooltip,
#clipboardMushafTooltip,
#izhharMushafTooltip {
    position: fixed;
    left: 50%;
    right: auto;
    top: auto;
    /* Sit lower, over the disabled bottom-bar play controls */
    bottom: 14px;
    transform: translateX(-50%);
    z-index: 10080;
    min-width: 0;
    max-width: calc(100vw - 24px);
    padding: 0.45rem 0.55rem 0.45rem 0.85rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    cursor: grab;
    user-select: none;
    touch-action: none;
}

#tajweedMushafTooltip,
#clipboardMushafTooltip {
    white-space: nowrap;
}

/* Multi-line session chrome (word count + arrows) â€” allow wrap like Show & Hide */
#tajweedMushafTooltip {
    min-width: 200px;
    white-space: normal;
    padding: 0.55rem 0.75rem 0.55rem;
}

#samaaRepeatMushafTooltip,
#izhharMushafTooltip {
    min-width: 220px;
    white-space: normal;
}

#tajweedMushafTooltip.is-dragging,
#samaaRepeatMushafTooltip.is-dragging,
#clipboardMushafTooltip.is-dragging,
#izhharMushafTooltip.is-dragging {
    cursor: grabbing;
}

#samaaRepeatMushafTooltip.is-visible,
#clipboardMushafTooltip.is-visible {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

#samaaRepeatMushafTooltip.is-visible {
    align-items: flex-start;
}

/* Show & Hide / Tajweed: close floats; content uses full width for aligned controls */
#izhharMushafTooltip {
    padding: 0.55rem 0.75rem 0.55rem;
}

#izhharMushafTooltip.is-visible,
#tajweedMushafTooltip.is-visible {
    display: block;
    align-items: stretch;
    gap: 0;
}

#samaaRepeatMushafTooltip .samaa-repeat-tooltip-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    order: 2;
}

#samaaRepeatMushafTooltip .samaa-repeat-tooltip-close,
#clipboardMushafTooltip .samaa-repeat-tooltip-close {
    position: static;
    flex-shrink: 0;
    order: 2;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

#tajweedMushafTooltip .samaa-repeat-tooltip-close,
#izhharMushafTooltip .samaa-repeat-tooltip-close {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 2;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.qe-learn-root.qe-lang-en #tajweedMushafTooltip .samaa-repeat-tooltip-close,
.qe-learn-root.qe-lang-en #izhharMushafTooltip .samaa-repeat-tooltip-close {
    left: auto;
    right: 6px;
}

#samaaRepeatMushafTooltip .samaa-repeat-tooltip-close {
    order: 0;
}

#tajweedMushafTooltip .samaa-repeat-tooltip-close:hover,
#samaaRepeatMushafTooltip .samaa-repeat-tooltip-close:hover,
#clipboardMushafTooltip .samaa-repeat-tooltip-close:hover,
#izhharMushafTooltip .samaa-repeat-tooltip-close:hover {
    background: #c82333;
    color: #fff;
}

#samaaRepeatMushafTooltip .samaa-repeat-tooltip-replay,
#izhharMushafTooltip .izhhar-tooltip-forward,
#izhharMushafTooltip .izhhar-tooltip-back,
#izhharMushafTooltip .izhhar-tooltip-repeat,
#izhharMushafTooltip .izhhar-tooltip-play,
#tajweedMushafTooltip .tajweed-tooltip-forward,
#tajweedMushafTooltip .tajweed-tooltip-back,
#tajweedMushafTooltip .tajweed-tooltip-play,
#tajweedMushafTooltip .tajweed-tooltip-refresh {
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #816225;
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

#izhharMushafTooltip .izhhar-tooltip-controls {
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.55rem;
    padding-top: 0.45rem;
    border-top: 1px solid #f0e6d6;
    direction: ltr;
}

#tajweedMushafTooltip .tajweed-tooltip-controls {
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.45rem;
    padding-top: 0.4rem;
    border-top: 1px solid #f0e6d6;
    direction: ltr;
    box-sizing: border-box;
}

#izhharMushafTooltip .izhhar-tooltip-controls-center {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 1 1 auto;
    order: 2;
}

#izhharMushafTooltip .izhhar-tooltip-back,
#izhharMushafTooltip .izhhar-tooltip-forward {
    flex: 0 0 auto;
}

#tajweedMushafTooltip .tajweed-tooltip-back,
#tajweedMushafTooltip .tajweed-tooltip-forward {
    flex: 0 0 auto;
}

#tajweedMushafTooltip .tajweed-tooltip-controls-center {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 1 1 auto;
    order: 2;
}

/* Arabic (default): forward left, back right */
#izhharMushafTooltip .izhhar-tooltip-forward {
    order: 1;
}

#izhharMushafTooltip .izhhar-tooltip-back {
    order: 3;
}

#tajweedMushafTooltip .tajweed-tooltip-forward {
    order: 1;
}

#tajweedMushafTooltip .tajweed-tooltip-back {
    order: 3;
}

/* English: back left, forward right */
.qe-learn-root.qe-lang-en #izhharMushafTooltip .izhhar-tooltip-back {
    order: 1;
}

.qe-learn-root.qe-lang-en #izhharMushafTooltip .izhhar-tooltip-forward {
    order: 3;
}

.qe-learn-root.qe-lang-en #tajweedMushafTooltip .tajweed-tooltip-back {
    order: 1;
}

.qe-learn-root.qe-lang-en #tajweedMushafTooltip .tajweed-tooltip-forward {
    order: 3;
}

#samaaRepeatMushafTooltip .samaa-repeat-tooltip-replay.is-visible,
#samaaRepeatMushafTooltip.is-completed .samaa-repeat-tooltip-replay,
#izhharMushafTooltip.is-visible .izhhar-tooltip-forward,
#izhharMushafTooltip.is-visible .izhhar-tooltip-back,
#izhharMushafTooltip.is-visible .izhhar-tooltip-repeat,
#izhharMushafTooltip.is-visible .izhhar-tooltip-play:not(.d-none),
#tajweedMushafTooltip.is-visible .tajweed-tooltip-forward,
#tajweedMushafTooltip.is-visible .tajweed-tooltip-back,
#tajweedMushafTooltip.is-visible .tajweed-tooltip-play,
#tajweedMushafTooltip.is-visible .tajweed-tooltip-refresh {
    display: inline-flex;
}

#izhharMushafTooltip.is-visible .izhhar-tooltip-controls,
#tajweedMushafTooltip.is-visible .tajweed-tooltip-controls {
    display: flex;
}

#samaaRepeatMushafTooltip .samaa-repeat-tooltip-replay:hover,
#izhharMushafTooltip .izhhar-tooltip-forward:hover,
#izhharMushafTooltip .izhhar-tooltip-back:hover,
#izhharMushafTooltip .izhhar-tooltip-repeat:hover,
#izhharMushafTooltip .izhhar-tooltip-play:hover,
#tajweedMushafTooltip .tajweed-tooltip-forward:hover,
#tajweedMushafTooltip .tajweed-tooltip-back:hover,
#tajweedMushafTooltip .tajweed-tooltip-play:hover,
#tajweedMushafTooltip .tajweed-tooltip-refresh:hover {
    background: #6a5020;
    color: #fff;
}

#izhharMushafTooltip .izhhar-tooltip-play.is-playing {
    background: #00C853;
    color: #fff;
}

#izhharMushafTooltip .izhhar-tooltip-play.is-playing:hover {
    background: #00a846;
    color: #fff;
}

#izhharMushafTooltip .izhhar-tooltip-forward:disabled,
#izhharMushafTooltip .izhhar-tooltip-back:disabled,
#izhharMushafTooltip .izhhar-tooltip-repeat:disabled,
#izhharMushafTooltip .izhhar-tooltip-play:disabled,
#tajweedMushafTooltip .tajweed-tooltip-forward:disabled,
#tajweedMushafTooltip .tajweed-tooltip-back:disabled,
#tajweedMushafTooltip .tajweed-tooltip-play:disabled,
#tajweedMushafTooltip .tajweed-tooltip-refresh:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#tajweedMushafTooltip .samaa-repeat-tooltip-content,
#samaaRepeatMushafTooltip .samaa-repeat-tooltip-content,
#clipboardMushafTooltip .samaa-repeat-tooltip-content,
#izhharMushafTooltip .samaa-repeat-tooltip-content {
    flex: 1;
    min-width: 0;
    order: 1;
}

#tajweedMushafTooltip .samaa-repeat-tooltip-content,
#izhharMushafTooltip .samaa-repeat-tooltip-content {
    width: 100%;
    max-width: 100%;
    flex: none;
    order: 0;
    box-sizing: border-box;
}

/* Title / pages / count clear the absolute close; arrow row stays full-bleed edge-to-edge */
#tajweedMushafTooltip .samaa-repeat-tooltip-title,
#tajweedMushafTooltip .tajweed-session-selected-rule,
#tajweedMushafTooltip .tajweed-session-pages,
#tajweedMushafTooltip .tajweed-session-word-count {
    padding-left: 2rem;
    box-sizing: border-box;
}

.qe-learn-root.qe-lang-en #tajweedMushafTooltip .samaa-repeat-tooltip-title,
.qe-learn-root.qe-lang-en #tajweedMushafTooltip .tajweed-session-selected-rule,
.qe-learn-root.qe-lang-en #tajweedMushafTooltip .tajweed-session-pages,
.qe-learn-root.qe-lang-en #tajweedMushafTooltip .tajweed-session-word-count {
    padding-left: 0;
    padding-right: 2rem;
}

/* Breathing room between close button and the first count/pages border */
#tajweedMushafTooltip .tajweed-session-pages {
    margin-top: 0.65rem;
    padding-top: 0.55rem;
}

#tajweedMushafTooltip .tajweed-session-word-count {
    margin-top: 0.15rem;
    padding-top: 0.3rem;
    border-top: none;
}

#tajweedMushafTooltip .tajweed-session-pages + .tajweed-session-word-count {
    border-top: none;
}

#izhharMushafTooltip .samaa-repeat-tooltip-content {
    /* Keep title clear of absolute close button */
    padding-left: 2rem;
}

.qe-learn-root.qe-lang-en #izhharMushafTooltip .samaa-repeat-tooltip-content {
    padding-left: 0;
    padding-right: 2rem;
}

#tajweedMushafTooltip .samaa-repeat-tooltip-title,
#clipboardMushafTooltip .samaa-repeat-tooltip-title {
    margin-bottom: 0;
    line-height: 1.35;
}

#samaaRepeatMushafTooltip .samaa-repeat-tooltip-title,
#izhharMushafTooltip .samaa-repeat-tooltip-title {
    margin-bottom: 0.35rem;
    line-height: 1.35;
}

#samaaRepeatMushafTooltip .samaa-repeat-tooltip-settings-heading {
    font-size: 12px;
    font-weight: 700;
    color: #816225;
    margin-bottom: 0.15rem;
}

#samaaRepeatMushafTooltip .samaa-repeat-tooltip-settings,
#izhharMushafTooltip .samaa-repeat-tooltip-settings {
    margin-top: 0;
    margin-bottom: 0.35rem;
}

#samaaRepeatMushafTooltip .samaa-repeat-tooltip-live:first-of-type,
#izhharMushafTooltip .samaa-repeat-tooltip-live:first-of-type {
    margin-top: 0.15rem;
}

.qe-learn-root.qe-lang-en #tajweedMushafTooltip,
.qe-learn-root.qe-lang-en #samaaRepeatMushafTooltip,
.qe-learn-root.qe-lang-en #clipboardMushafTooltip,
.qe-learn-root.qe-lang-en #izhharMushafTooltip {
    direction: ltr;
    text-align: left;
}

@media (max-width: 767.98px) {
    #tajweedMushafTooltip,
    #samaaRepeatMushafTooltip,
    #clipboardMushafTooltip,
    #izhharMushafTooltip {
        bottom: 20px;
        padding: 0.4rem 0.55rem;
    }
}

.tajweed-word-tooltip {
    display: none;
    position: fixed;
    z-index: 10070;
    min-width: 200px;
    max-width: 320px;
    padding: 0.5rem 0.75rem 0.7rem;
    background: #fff;
    border: 1px solid #e0c9a0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    direction: rtl;
    text-align: right;
}

.tajweed-word-tooltip.is-visible {
    display: block;
}

.tajweed-word-tooltip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
    padding-top: 0.15rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #f0e6d4;
}

.tajweed-word-tooltip-header-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.tajweed-word-tooltip-rule-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    height: 1.55rem;
    padding: 0 0.28rem;
    border: 1px solid #e0c9a0;
    border-radius: 4px;
    background: #faf6ef;
    color: #4b3000;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

/* Follow the En/ع toggle, not the page language. */
.tajweed-word-tooltip.is-lang-ltr {
    direction: ltr;
    text-align: left;
}

.tajweed-word-tooltip.is-lang-ltr .tajweed-word-tooltip-header {
    flex-direction: row;
}

.tajweed-word-tooltip.is-lang-ltr .tajweed-word-tooltip-list li {
    flex-direction: row;
}

.tajweed-word-tooltip.is-lang-ltr .tajweed-word-tooltip-text {
    direction: ltr;
    text-align: left;
}

.tajweed-word-tooltip-lang {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.15rem 0 0;
    padding: 0.3rem 0.55rem;
    border: 1px solid #e0c9a0;
    border-radius: 999px;
    background: #faf6ef;
    color: #4b3000;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
}

.tajweed-word-tooltip-lang:hover {
    background: #f3e9d7;
}

.tajweed-word-tooltip-lang-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.tajweed-word-tooltip-lang-text {
    line-height: 1;
}

.tajweed-word-tooltip-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #6c757d;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.tajweed-word-tooltip-close:hover {
    background: #f3e9d7;
    color: #212529;
}

.tajweed-word-tooltip-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tajweed-word-tooltip-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    font-size: 13px;
    line-height: 1.45;
}

.tajweed-word-tooltip-list li:last-child {
    margin-bottom: 0;
}

.tajweed-word-tooltip-bullet {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 0.35rem;
}

.tajweed-word-tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    pointer-events: none;
}

.tajweed-word-tooltip.arrow-bottom .tajweed-word-tooltip-arrow {
    bottom: -9px;
    border-width: 9px 8px 0 8px;
    border-color: #fff transparent transparent transparent;
    filter: drop-shadow(0 1px 0 #e0c9a0);
}

.tajweed-word-tooltip.arrow-top .tajweed-word-tooltip-arrow {
    top: -9px;
    border-width: 0 8px 9px 8px;
    border-color: transparent transparent #fff transparent;
    filter: drop-shadow(0 -1px 0 #e0c9a0);
}

.word-meaning-tooltip-body {
    font-size: 13px;
    line-height: 1.45;
}

.word-meaning-tooltip-word {
    font-size: 1.15rem;
    font-weight: 700;
    color: #3d2a00;
    margin-bottom: 0.2rem;
}

.word-meaning-tooltip-translit {
    font-size: 12px;
    color: #7a6545;
    margin-bottom: 0.45rem;
    direction: ltr;
    text-align: left;
}

.word-meaning-tooltip-text {
    color: #383433;
}

.word-meaning-tooltip.is-lang-ltr,
.word-meaning-tooltip.is-lang-ltr .word-meaning-tooltip-text {
    direction: ltr;
    text-align: left;
}

.word-meaning-lang-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: nowrap;
}

.word-meaning-lang-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    height: 1.55rem;
    margin: 0;
    padding: 0 0.28rem;
    border: 1px solid #e0c9a0;
    border-radius: 4px;
    background: #faf6ef;
    color: #4b3000;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.word-meaning-lang-icon:hover {
    background: #f3e9d7;
}

.word-meaning-lang-icon.is-active {
    background: #2e7d32;
    border-color: #2e7d32;
    color: #fff;
}

.word-meaning-word-highlight {
    display: none;
    position: absolute;
    z-index: 20;
    pointer-events: none;
    box-sizing: border-box;
    background: rgba(0, 200, 83, 0.45);
    border: 1.5px solid #1b5e20;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.word-meaning-word-highlight.is-visible {
    display: block;
}

.qe-learn-root.qe-lang-en .word-meaning-tooltip:not(.is-lang-ltr) .word-meaning-tooltip-header {
    flex-direction: row;
}

.qe-learn-root.qe-lang-en .word-meaning-tooltip:not(.is-lang-ltr) .word-meaning-tooltip-text,
.qe-learn-root.qe-lang-en .word-meaning-tooltip:not(.is-lang-ltr) .word-meaning-tooltip-word {
    direction: rtl;
    text-align: right;
}

body.tajweed-session-locked .qe-mushaf-col .form-row.mx-0 {
    overflow: visible;
}

/* Keep Select Rule wheel above the tools sidebar (picker is portaled to body). */
body.tajweed-mode-select-rule .tajweed-rule-picker {
    z-index: 20050;
}

/* Radial tajweed rule picker â€” fixed to the far right of the page (outside mushaf).
   Collapses after a rule is chosen; expands while the pointer is on the dock. */
.tajweed-rule-picker {
    display: none;
    position: fixed;
    top: 56px;
    right: 0;
    bottom: 72px;
    left: auto;
    width: min(72vh, 560px);
    z-index: 10120; /* above jquery.blockUI overlays so cells stay clickable after mapping */
    pointer-events: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.tajweed-rule-picker.is-visible {
    display: block;
}

.tajweed-radial-dock {
    position: absolute;
    top: 50%;
    right: 8px;
    left: auto;
    z-index: 2;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(62vh, 500px);
    height: min(62vh, 500px);
    transform: translateY(-50%);
    transition: width 0.28s ease, height 0.28s ease;
}

/* Invisible hit padding so category bullets outside the square still count as "on the dock".
   Must NOT capture clicks over the wheel itself. */
.tajweed-radial-dock::before {
    content: '';
    position: absolute;
    top: -12px;
    bottom: -12px;
    left: -12px;
    right: -44px;
    z-index: 0;
    pointer-events: none;
}

.tajweed-radial-stage {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform-origin: center center;
    transition: transform 0.3s ease, opacity 0.3s ease;
    /* Room on the right for the vertical category-dot column */
    overflow: visible;
}

.tajweed-rule-picker.is-collapsed .tajweed-radial-dock {
    width: 112px;
    height: 112px;
    right: 10px;
}

.tajweed-rule-picker.is-collapsed .tajweed-radial-stage {
    transform: scale(0.48);
    opacity: 1;
}

.tajweed-rule-picker.is-collapsed .tajweed-active-slot,
.tajweed-rule-picker.is-collapsed .tajweed-category-dots {
    opacity: 0;
    pointer-events: none;
}

.tajweed-rule-picker.is-collapsed .tajweed-category-dots .tajweed-cat-dot {
    pointer-events: none;
}

/* Visible peeker ring when collapsed so the control is findable */
.tajweed-rule-picker.is-collapsed .tajweed-radial-dock::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 3px solid rgba(129, 98, 37, 0.55);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.75), 0 4px 14px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    z-index: 40;
}

/* Expand only via .is-peeking (JS) â€” avoid CSS :hover size thrash while moving to bullets */
.tajweed-rule-picker.is-collapsed.is-peeking .tajweed-radial-dock {
    width: min(62vh, 500px);
    height: min(62vh, 500px);
}

.tajweed-rule-picker.is-collapsed.is-peeking .tajweed-radial-stage {
    transform: scale(1);
    opacity: 1;
}

.tajweed-rule-picker.is-collapsed.is-peeking .tajweed-radial-dock::after {
    display: none;
}

.tajweed-rule-picker.is-collapsed.is-peeking .tajweed-active-slot {
    opacity: 1;
    pointer-events: none;
}

/* Keep the dots host non-interactive so it does not cover the wheel hit layer.
   Only the individual color bullets receive pointer events. */
.tajweed-rule-picker.is-collapsed.is-peeking .tajweed-category-dots {
    opacity: 1;
    pointer-events: none;
}

.tajweed-rule-picker.is-collapsed.is-peeking .tajweed-category-dots .tajweed-cat-dot {
    pointer-events: auto;
}

.tajweed-active-slot {
    position: absolute;
    z-index: 35;
    pointer-events: none;
    display: none;
    flex-direction: row;
    direction: ltr;
    align-items: center;
    gap: 0;
    max-width: 220px;
    height: 68px;
    transform: translate(-100%, -50%);
}

.tajweed-slot-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 3px solid rgba(255, 64, 129, 0.55);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.14);
    transition: background 0.3s, box-shadow 0.3s;
}

.tajweed-slot-line {
    width: 18px;
    height: 2px;
    background: #2a2a2a;
    flex-shrink: 0;
}

.tajweed-slot-label {
    flex: 1;
    min-width: 0;
    max-width: 150px;
    padding: 0.35rem 0.55rem;
    background: #fff;
    border: 1px solid #e0c9a0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    color: #212529;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: rtl;
    text-align: right;
}

.qe-learn-root.qe-lang-en .tajweed-slot-label {
    direction: ltr;
    text-align: left;
}

.tajweed-category-dots {
    position: absolute;
    inset: 0;
    z-index: 30;
    pointer-events: none;
}

.tajweed-cat-dot {
    position: absolute;
    width: 34px;
    height: 34px;
    margin-left: -17px;
    margin-top: -17px;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    transition: box-shadow 0.2s, opacity 0.2s, border-color 0.2s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.85);
    opacity: 0.78;
    padding: 0;
    /* No scale on hover â€” overlapping circles were merging when scaled */
    transform: none !important;
}

.tajweed-cat-dot:hover {
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(129, 98, 37, 0.28), 0 4px 12px rgba(0, 0, 0, 0.22);
    z-index: 32;
}

.tajweed-cat-dot.active {
    opacity: 1;
    border-color: rgba(255, 64, 129, 0.65);
    box-shadow: 0 0 0 4px rgba(255, 64, 129, 0.22), 0 5px 16px rgba(0, 0, 0, 0.26);
    z-index: 31;
}

.tajweed-radial-wheel {
    position: absolute;
    inset: 1.25%;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.15s ease-out;
    transform-origin: center center;
    filter: drop-shadow(0 6px 22px rgba(0, 0, 0, 0.08));
    z-index: 2;
    background: rgba(255, 255, 255, 0.35);
    box-shadow: inset 0 0 0 1px rgba(30, 30, 30, 0.14);
}

.tajweed-radial-wheel:active {
    cursor: pointer;
}

.tajweed-radial-wheel.snapping {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tajweed-wheel-cells {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    z-index: 12;
    overflow: hidden;
}

.tajweed-cell {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: #d0d0d0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    box-shadow: none;
    z-index: 1;
}

.tajweed-cell.is-in-group {
    z-index: 2;
}

.tajweed-cell.is-selected {
    z-index: 4;
    background: #d0d0d0;
    filter: none;
}

.tajweed-cell:focus-visible {
    z-index: 5;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.45));
}

.tajweed-cell-fill {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.97);
    pointer-events: none;
    z-index: 1;
}

.tajweed-cell.is-in-group .tajweed-cell-fill {
    background: #fff;
}

.tajweed-cell-color {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.tajweed-cell-spoke {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    transform-origin: center center;
}

.tajweed-cell-face {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    box-sizing: border-box;
    padding: 2px;
}

.tajweed-cell-label {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height: 1.15;
    user-select: none;
    color: #1b1b1b;
    box-sizing: border-box;
    /* rightâ†’left + topâ†’bottom */
    writing-mode: vertical-rl;
    text-orientation: mixed;
    direction: rtl;
    text-align: center;
}

.qe-learn-root.qe-lang-en .tajweed-cell-label {
    direction: ltr;
    writing-mode: vertical-lr;
}

.tajweed-cell-tooltip {
    position: fixed;
    /* Above body.tajweed-mode-select-rule .tajweed-rule-picker (20050). */
    z-index: 20100;
    display: none;
    max-width: 260px;
    padding: 0.4rem 0.65rem;
    background: #1f1f1f;
    color: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    pointer-events: none;
    white-space: normal;
}

.tajweed-cell-tooltip.is-visible {
    display: block;
}

.qe-learn-root:not(.qe-lang-en) .tajweed-cell-tooltip {
    direction: rtl;
    text-align: right;
}

/* Parent/child rule branch popup (Select Rule). */
.tajweed-child-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20120;
    align-items: center;
    justify-content: center;
}

.tajweed-child-popup.is-visible {
    display: flex;
}

.tajweed-child-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 20, 0.32);
}

.tajweed-child-popup-dialog {
    position: relative;
    z-index: 1;
    width: min(92vw, 740px);
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
}

.tajweed-child-popup-close {
    position: absolute;
    top: -14px;
    right: -14px;
    left: auto;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #e53935;
    color: #fff;
    font-size: 22px;
    line-height: 32px;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.tajweed-child-popup[dir="rtl"] .tajweed-child-popup-close,
.tajweed-child-popup.is-arabic .tajweed-child-popup-close {
    right: auto;
    left: -14px;
}

.tajweed-child-popup-close::before {
    content: '\00d7';
}

.tajweed-child-popup-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.tajweed-child-popup-col-parent {
    border-inline-end: 1px solid #d7d7d7;
}

.tajweed-child-popup-head {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 8px 14px;
    background: var(--tajweed-popup-color, #1e88e5);
    color: #fff;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.tajweed-child-popup-list {
    min-height: 96px;
    max-height: 46vh;
    overflow-y: auto;
    padding: 6px 0 12px;
}

.tajweed-child-popup-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 10px 16px;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: inherit;
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
    text-align: start;
}

/* Keep visual order label → radio → swatch. RTL only packs the row to the right. */
.tajweed-child-popup[dir="rtl"] .tajweed-child-popup-row,
.tajweed-child-popup.is-arabic .tajweed-child-popup-row {
    direction: ltr;
    flex-direction: row;
    justify-content: flex-end;
    text-align: right;
}

/* EN: controls before the text — swatch, radio, then label, packed left. */
.tajweed-child-popup[dir="ltr"] .tajweed-child-popup-row {
    direction: ltr;
    flex-direction: row-reverse;
    justify-content: flex-end;
    text-align: left;
}

.tajweed-child-popup-row:hover,
.tajweed-child-popup-row:focus {
    background: #f5f8fb;
    outline: none;
}

.tajweed-child-popup-label {
    flex: 0 1 auto;
    font-size: 15px;
    font-weight: 600;
    color: #222;
}

.tajweed-child-popup[dir="rtl"] .tajweed-child-popup-label,
.tajweed-child-popup.is-arabic .tajweed-child-popup-label {
    text-align: right;
}

.tajweed-child-popup[dir="ltr"] .tajweed-child-popup-label {
    text-align: left;
}

.tajweed-child-popup-radio {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border: 2px solid #9e9e9e;
    border-radius: 50%;
    background: #fff;
}

.tajweed-child-popup-row.is-selected .tajweed-child-popup-radio {
    border-color: var(--tajweed-popup-color, #1e88e5);
    box-shadow: inset 0 0 0 4px var(--tajweed-popup-color, #1e88e5);
}

.tajweed-child-popup-swatch {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 3px;
}

@media (max-width: 640px) {
    .tajweed-child-popup-cols {
        grid-template-columns: 1fr;
    }

    .tajweed-child-popup-col-parent {
        border-inline-end: 0;
        border-bottom: 1px solid #d7d7d7;
    }

    .tajweed-child-popup-close {
        right: 8px;
        left: auto;
        top: 8px;
    }

    .tajweed-child-popup[dir="rtl"] .tajweed-child-popup-close,
    .tajweed-child-popup.is-arabic .tajweed-child-popup-close {
        right: auto;
        left: 8px;
    }
}

/* Rule-not-found popup (Select Rule) — same chrome as Tajweed Lessons / video modals. */
.tajweed-missing-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20140;
    align-items: center;
    justify-content: center;
}

.tajweed-missing-popup.is-visible {
    display: flex;
}

.tajweed-missing-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.tajweed-missing-popup-dialog {
    position: relative;
    z-index: 1;
    width: min(92vw, 420px);
    background: #fdfaf5;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.tajweed-missing-popup-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    direction: ltr;
    margin: 0;
    padding: 8px 16px;
    background-color: #1e1007;
    background-image: linear-gradient(172deg, #1e1007 0%, #5c3317 100%);
}

.tajweed-missing-popup-close {
    order: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.tajweed-missing-popup-close:hover,
.tajweed-missing-popup-close:focus {
    background: rgba(255, 255, 255, 0.22);
    outline: none;
}

.tajweed-missing-popup-close-icon {
    display: block;
    width: 15px;
    height: 15px;
}

.tajweed-missing-popup-title {
    order: 2;
    flex: 1 1 auto;
    margin: 0;
    padding: 0;
    color: #fff;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
    text-align: right;
}

.tajweed-missing-popup[dir="ltr"] .tajweed-missing-popup-close {
    order: 2;
    margin-left: auto;
}

.tajweed-missing-popup[dir="ltr"] .tajweed-missing-popup-title {
    order: 1;
    text-align: left;
}

.tajweed-missing-popup-gold-line {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, #c8922a 0%, #e5b55a 50%, #c8922a 100%);
}

.tajweed-missing-popup-body {
    padding: 22px 22px 18px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    background: #fdfaf5;
}

.tajweed-missing-popup-message {
    margin: 0 0 8px;
    text-align: center;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #3a2a18;
    line-height: 1.5;
}

.tajweed-missing-popup-action {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(180deg, #f0dfb8 0%, #d4b46a 55%, #c9a45c 100%);
    color: #1a1a1a;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    box-shadow: 0 2px 0 rgba(139, 105, 20, 0.25);
    cursor: pointer;
}

.tajweed-missing-popup-action:hover,
.tajweed-missing-popup-action:focus {
    filter: brightness(1.03);
    color: #1a1a1a;
    outline: none;
}

.tajweed-missing-popup-cancel {
    display: block;
    width: auto;
    min-width: 140px;
    margin: 6px auto 0;
    padding: 8px 28px;
    border: 1px solid rgba(92, 51, 23, 0.28);
    border-radius: 8px;
    background: transparent;
    color: #5c3317;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.tajweed-missing-popup-cancel:hover,
.tajweed-missing-popup-cancel:focus {
    background: rgba(92, 51, 23, 0.06);
    outline: none;
}

.tajweed-missing-popup.is-exhausted .tajweed-missing-popup-action {
    display: none;
}

/* Soft busy cue removed — rule swaps use the small page-wide blockUI loader instead
   of dimming the mushaf (that opacity flash made rule changes feel like screen flicker). */
body.tajweed-rule-mapping .qe-mushaf-col {
    opacity: 1;
}

.tajweed-center-core {
    position: absolute;
    width: 20%;
    height: 20%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 50%;
    z-index: 20;
    box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
    pointer-events: none;
}

.tajweed-session-selected-rule {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.35rem;
    min-width: 0;
}

.tajweed-session-selected-rule[hidden] {
    display: none !important;
}

.tajweed-session-rule-bullet {
    flex-shrink: 0;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 1px 2px rgba(0, 0, 0, 0.2);
}

.tajweed-session-rule-name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: #212529;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 991.98px) {
    .tajweed-radial-dock {
        width: min(56vh, 380px);
        height: min(56vh, 380px);
        right: 6px;
    }

    .tajweed-rule-picker.is-collapsed .tajweed-radial-dock {
        width: 96px;
        height: 96px;
    }

    .tajweed-rule-picker.is-collapsed.is-peeking .tajweed-radial-dock {
        width: min(56vh, 380px);
        height: min(56vh, 380px);
    }
}

/* English (LTR): mirror the Select Rule wheel to the page-left side. */
.qe-learn-root.qe-lang-en .tajweed-rule-picker {
    right: auto;
    left: 0;
}

.qe-learn-root.qe-lang-en .tajweed-radial-dock {
    right: auto;
    left: 8px;
}

.qe-learn-root.qe-lang-en .tajweed-radial-dock::before {
    right: -12px;
    left: -44px;
}

.qe-learn-root.qe-lang-en .tajweed-rule-picker.is-collapsed .tajweed-radial-dock {
    right: auto;
    left: 10px;
}

/* Slot anchors its left edge on the wheel's right focus point and extends rightward:
   dot (touching the wheel), line, then label. */
.qe-learn-root.qe-lang-en .tajweed-active-slot {
    flex-direction: row-reverse;
    transform: translate(0, -50%);
}

@media (max-width: 991.98px) {
    .qe-learn-root.qe-lang-en .tajweed-radial-dock {
        right: auto;
        left: 6px;
    }
}

area.tajweed-word-area {
    cursor: pointer;
}

/* Word meanings tabs: Word | Reasons, then gear + collapse on the right */
.qe-learn-root.qe-lang-en #AsbaabMaaniTabs .nav-pills > .nav-item:last-of-type {
    order: 1;
}

.qe-learn-root.qe-lang-en #AsbaabMaaniTabs .nav-pills > .nav-item:first-of-type {
    order: 2;
}

.qe-learn-root.qe-lang-en #AsbaabMaaniTabs .nav-pills > .dropdown,
.qe-learn-root.qe-lang-en #AsbaabMaaniTabs .nav-pills > .qe-panel-settings-wrap {
    order: 3;
    margin-left: 4px;
    margin-right: 0;
    flex-grow: 0 !important;
}

.qe-learn-root.qe-lang-en #AsbaabMaaniTabs .nav-pills > .qe-panel-collapse-toggle {
    order: 4;
}

/* English study panel header: tabs on the left; gear then collapse on the right */
.qe-learn-root.qe-lang-en .sidebar-content .radio-selections {
    flex-direction: row;
}

.qe-learn-root.qe-lang-en .sidebar-content .radio-selections > .qe-tt-tabs-scroll {
    order: 0;
    flex: 1 1 0;
    min-width: 0;
}

.qe-learn-root.qe-lang-en .sidebar-content .radio-selections > .qe-panel-settings-wrap {
    order: 1;
    margin-left: 4px;
    margin-right: 0 !important;
    flex-grow: 0 !important;
}

.qe-learn-root.qe-lang-en .sidebar-content .radio-selections > .qe-panel-collapse-toggle {
    order: 2 !important;
    margin-left: 6px;
    margin-right: 0;
}

/* Self-learning tab first on English (mirror of Arabic tab order) */
.qe-learn-root.qe-lang-en #sidebar-tabs #myTab {
    display: flex;
    width: 100%;
}

.qe-learn-root.qe-lang-en #sidebar-tabs #myTab .qe-sidebar-tab-self {
    order: 1;
}

.qe-learn-root.qe-lang-en #sidebar-tabs #myTab .qe-sidebar-tab-study {
    order: 2;
}

#teacher-study .qe-teacher-tool-placeholder {
    color: rgba(56, 52, 51, 0.72);
    font-size: 0.92rem;
    line-height: 1.5;
}

/* Action-only teacher tools (not collapsible) — match student record-send / review */
#teacher-study .qe-teacher-tool-card[data-teacher-tool="send-correction"] .angleimg,
#teacher-study .qe-teacher-tool-card[data-teacher-tool="correct-assignment"] .angleimg,
#teacher-study .qe-teacher-tool-card[data-teacher-tool="live-meeting"] .angleimg {
    visibility: hidden;
}

#teacher-study .qe-teacher-tool-action.is-busy {
    pointer-events: none;
    cursor: wait;
}


/* English tab labels are longer — keep text inside the button */
.qe-learn-root.qe-lang-en #sidebar-tabs .tabs .nav-tabs .nav-item .nav-link,
.qe-learn-root.qe-lang-en #sidebar-tabs .tabs .nav-tabs .nav-link.active {
    height: auto;
    min-height: 75px;
    padding: 10px 6px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
}

.qe-learn-root.qe-lang-en #sidebar-tabs .tabs .nav-tabs .nav-item .nav-link span {
    font-size: 0.78rem;
    line-height: 1.2;
    margin-top: 6px;
    padding: 0 2px;
    word-break: break-word;
}

/* Accordion headers: feature icon left, label, Active/close + chevron on the right */
.qe-learn-root.qe-lang-en #sidebar-tabs .tab-content .card-header .btn-link {
    flex-direction: row;
}

.qe-learn-root.qe-lang-en #sidebar-tabs .tab-content .card-header .btn-link > img:not(.angleimg) {
    order: 0;
    margin-left: 0;
    margin-right: 8px;
}

.qe-learn-root.qe-lang-en #sidebar-tabs .tab-content .card-header .btn-link > span:not(.qe-learn-session-controls) {
    order: 1;
    flex-grow: 1;
}

.qe-learn-root.qe-lang-en #sidebar-tabs .tab-content .card-header .btn-link > .qe-learn-session-controls {
    order: 2;
    margin-left: 0;
}

.qe-learn-root.qe-lang-en #sidebar-tabs .tab-content .card-header .btn-link > img.angleimg {
    order: 3;
    margin-left: 0.35rem;
}

/* Match Combined Tool / QOTD icons to other sidebar tool icons (34x34 assets) */
#sidebar-tabs .card-header .btn-link img[src*="combined-tool.png"],
#sidebar-tabs .card-header .btn-link img[src*="question-mark.png"] {
    width: 34px;
    height: 34px;
    max-width: 34px;
    max-height: 34px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Form checks: label left, checkbox right in mirrored EN panels */
.qe-learn-root.qe-lang-en .form-check {
    padding-left: 1.25rem;
    text-align: left;
}

.qe-learn-root.qe-lang-en .samawork thead tr {
    direction: ltr;
}

.qe-learn-root.qe-lang-en .samawork tbody tr {
    direction: ltr;
}

.qe-learn-root.qe-lang-en #sidebar-tabs .card-body a {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 0.35rem;
}

/* Sub-tabs: feature icon left (before text), Active/close on the right end */
.qe-learn-root.qe-lang-en #sidebar-tabs .card-body a > img {
    order: -1;
    margin-left: 0 !important;
    margin-right: 0;
    flex-shrink: 0;
}

.qe-learn-root.qe-lang-en #sidebar-tabs .card-body a > .qe-learn-tajweed-link-text,
.qe-learn-root.qe-lang-en #sidebar-tabs .card-body a > span:not(.qe-learn-session-controls):not(.qe-learn-session-active-badge) {
    order: 0;
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

.qe-learn-root.qe-lang-en #sidebar-tabs .card-body a > .qe-learn-session-controls {
    order: 2;
    margin-left: auto;
}

.qe-learn-root.qe-lang-en .ramzan {
    justify-content: flex-start !important;
}

.qe-learn-root.qe-lang-en .popup .modal-header {
    flex-direction: row;
}

.qe-learn-root.qe-lang-en .popup:not(#TajweedLessonsPopup):not(#MasabqatPopup):not(#QotdPopup):not(#asgnModeModal):not(#asgnTeacherFeedbackModal):not(#asgnUploadPrefsModal):not(#onlineMeetingMaintModal):not(.qe-tms-popup) .modal-header .close {
    order: 2 !important;
    margin-left: auto !important;
    margin-right: 0 !important;
}

.qe-learn-root.qe-lang-en .popup:not(#TajweedLessonsPopup):not(#MasabqatPopup):not(#QotdPopup):not(#asgnModeModal):not(#asgnTeacherFeedbackModal):not(#asgnUploadPrefsModal):not(#onlineMeetingMaintModal):not(.qe-tms-popup) .modal-header .modal-title {
    order: 1;
    margin-right: auto;
}

/* English: close on the right (match Masabqat / QOTD) */
.qe-learn-root.qe-lang-en #TajweedLessonsPopup .modal-header .close {
    order: 2 !important;
    margin-left: auto !important;
}

.qe-learn-root.qe-lang-en #TajweedLessonsPopup .qe-tajweed-modal-heading {
    order: 1 !important;
    align-items: flex-start !important;
    text-align: left !important;
}

/* English column mirror: sidebar-tabs | mushaf | sidebar-content
   (Arabic stays DOM order: sidebar-content | mushaf | sidebar-tabs) */
.qe-learn-root.qe-lang-en .qe-explorer-layout > #sidebar-tabs {
    order: 1;
}

.qe-learn-root.qe-lang-en .qe-explorer-layout > .qe-mushaf-col {
    order: 2;
}

.qe-learn-root.qe-lang-en .qe-explorer-layout > .sidebar-content {
    order: 3;
}

/* â”€â”€ Desktop: sidebar-content | mushaf | sidebar-tabs (Arabic default DOM order) â”€â”€ */
.qe-learn-root .qe-explorer-layout {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 12px;
    justify-content:center;
}

.qe-learn-root .qe-explorer-layout > .sidebar-content {
    flex: 0 0 350px;
    width: 350px;
    max-width: 350px;
}

.qe-learn-root .qe-explorer-layout > .qe-mushaf-col {
    min-width: 600px;
    max-width: none;
}

.qe-learn-root .qe-explorer-layout > #sidebar-tabs {
    flex: 0 0 350px;
    width: 350px;
    max-width: 350px;
}
.imgarea > div {
    max-height: calc(100vh - 245px);
    height: auto;
    width: auto !important;
}
.imgarea > div[id] {
    width: fit-content !important;
}
/* Spine-align the even page without float — float collapsed .imgarea/.qpage-con
   height so the white page chrome disappeared and the beige page bg showed through.
   Use physical margin-left (not inline-start) so RTL still pins the page to the spine. */
.imgarea.text-end > div[id] {
    margin-left: auto;
    margin-right: 0;
}
    /* Cap the image/canvas height directly (viewport-relative) instead of via
       "100% of a fixed-height parent" — this lets the wrapper divs above hug
       the actual rendered page image (no leftover top/bottom whitespace)
       without changing the image's own rendered pixel size, so the ayah/word
       tap-mapping overlay (imagemapster canvas) stays aligned. */
    .imgarea > div img, .imgarea > div canvas {
        max-height: calc(100vh - 245px);
        max-width: 100%;
        width: auto !important;
        height: auto !important;
    }
/* Beat QuranExplorer.css percentage/fixed sidebar widths inside Learn layout */
@media screen and (min-width: 1200px) {
    .qe-learn-root .qe-explorer-layout > .sidebar-content,
    .qe-learn-root .qe-explorer-layout > #sidebar-tabs {
        flex: 0 0 360px;
        width: 360px !important;
        max-width: 360px;
        padding-right: 5px !important;
        padding-left: 5px !important;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    /* Study column (tafseer/translation + meanings/asbab): match mushaf
       pages + playback bar height (--qe-mushaf-align-height from JS) */
    .qe-learn-root .qe-explorer-layout > .sidebar-content {
        height: var(--qe-mushaf-align-height, calc(100vh - 180px));
        max-height: var(--qe-mushaf-align-height, calc(100vh - 180px));
        display: flex;
        flex-direction: column;
    }

    /* Tools column: same alignment so it scrolls internally */
    .qe-learn-root .qe-explorer-layout > #sidebar-tabs {
        height: var(--qe-mushaf-align-height, calc(100vh - 180px));
        max-height: var(--qe-mushaf-align-height, calc(100vh - 180px));
    }

    .qe-learn-root .qe-explorer-layout > .sidebar-content + .qe-mushaf-col,
    .qe-learn-root .qe-explorer-layout > .sidebar + .col.con {
        width: auto !important;
        max-width: none;
    }

    /* Fit study panels to the available column height. Expanded panels share
       remaining space; collapsed ones shrink to the tab bar. If several are
       open, the host scrolls instead of overflowing the mushaf. */
    .qe-learn-root .sidebar-content > .mb-3 {
        display: flex;
        flex-direction: column;
        flex: 1 1 0;
        min-height: 120px;
    }

    .qe-learn-root .sidebar-content > .qe-study-panels-host {
        flex: 1 1 0;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: auto;
        gap: 8px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .qe-learn-root .sidebar-content .qe-study-panel {
        display: flex;
        flex-direction: column;
        flex: 1 0 220px;
        min-height: 220px;
        margin-bottom: 0 !important;
        overflow: hidden;
        position: relative;
        z-index: 1;
    }

    .qe-learn-root .sidebar-content .qe-study-panel.qe-panel-collapsed {
        flex: 0 0 auto;
        min-height: 0;
        overflow: visible;
    }

    .qe-learn-root .sidebar-content > .mb-3 > .qe-expandable-panel,
    .qe-learn-root .sidebar-content .qe-study-panel > .qe-expandable-panel {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        height: auto !important;
        min-height: 0;
        overflow: hidden;
    }

    .qe-learn-root .sidebar-content .qe-study-panel .radio-selections + div.qe-expandable-panel {
        height: auto !important;
        max-height: none;
    }

    .qe-learn-root .sidebar-content #evenDiv,
    .qe-learn-root .sidebar-content .qe-study-text-body {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
        overflow: auto;
        max-height: none;
    }

    .qe-learn-root .sidebar-content #AsbaabMaaniTabs .tab-content {
        flex: 1 1 auto;
        height: auto;
        min-height: 60px;
        overflow: auto;
    }
}

.qe-learn-root .qe-explorer-layout .form-row > .col img,
.qe-learn-root .qe-explorer-layout .imgarea img {
    width: 100%;
    height: auto;
}

/* Center mushaf: always keep both pages visible; scale with column width */
.qe-learn-root .qe-mushaf-col .form-row > .col {
    max-width: 50%;
    flex: 0 0 50%;
}

.qe-learn-root .qe-mushaf-col .form-row > .col .imgarea,
.qe-learn-root .qe-mushaf-col .form-row > .col .imgarea.small-hidden {
    display: block !important;
}

/* Mushaf page image loader */
.qe-learn-root .imgarea {
    position: relative;
}

/* Tajweed Select Rule: black base behind transparent color overlay */
.qe-learn-root .imgarea .qe-mushaf-base-layer {
    display: none;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

/* ── Mushaf image download protection ─────────────────────────────────────── */

/* Disable drag-to-desktop and mobile long-press-save on all mushaf images */
.qe-learn-root .imgarea img#pageImageEven,
.qe-learn-root .imgarea img#pageImageOdd,
.qe-learn-root .imgarea .qe-mushaf-base-layer {
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    user-select: none;
}

.qe-learn-root .imgarea.is-tajweed-layered {
    width: fit-content;
    max-width: 100%;
}

/* Even (2nd) page: pin the whole stack to the spine. Mapster wrap used to do
   this; when it unbinds during a rule swap the page collapsed and the white
   mushaf chrome disappeared. Size the imgarea to the image instead. */
.qe-learn-root .imgarea.text-end.is-tajweed-layered {
    margin-left: auto;
    margin-right: 0;
}

.qe-learn-root .imgarea.is-tajweed-layered .qe-mushaf-base-layer {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.qe-learn-root .imgarea.is-tajweed-layered > img#pageImageEven,
.qe-learn-root .imgarea.is-tajweed-layered > img#pageImageOdd {
    position: relative;
    z-index: 1;
    display: block;
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    max-height: calc(100vh - 245px);
}

.qe-learn-root .imgarea.is-tajweed-layered > [id^="mapster_wrap"] {
    position: relative;
    z-index: 1;
}

.qe-img-loader {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    bottom: 20px;
    left: 0;
    z-index: 5;
    pointer-events: none;
    justify-content:center;
}

.qe-learn-root .qe-explorer-layout .imgarea .qe-img-loader img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
}

.imgarea.qe-img-loading {
    min-height: 400px;
}

/* Reserve final mushaf height while loading (AR + EN); keep loader GIF size and center it */
.qe-learn-root .qpage-con:has(.qe-img-loading),
.qe-learn-root .imgarea.qe-img-loading {
    min-height: calc(100vh - 245px);
}

/* Match Arabic. A fixed 765px frame reflowed the English page after ImageMapster
   scaled the word map, so teacher mistake boxes no longer sat on the letters. */
.qe-learn-root.qe-lang-en .qpage-con {
    height: auto;
    max-height: calc(100vh - 225px);
}

.imgarea.qe-img-loading .qe-img-loader {
    display: block;
}

.imgarea.qe-img-loading img.img-fluid,
.imgarea.qe-img-loading [id^="mapster_wrap"] {
    visibility: hidden;
}

/* Keep the two-page spread stable while a tajweed page/surah jump loads. */
.qe-learn-root .qpage-con.is-mushaf-holding {
    position: relative;
}

.qe-learn-root .qe-mushaf-col > .form-row.mx-0.is-mushaf-holding {
    position: relative;
}

.qe-learn-root .qe-mushaf-col > .form-row.mx-0 > .qe-mushaf-hold-cover {
    position: absolute;
    top: 40px;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.qe-learn-root .qe-mushaf-hold-cover img {
    width: auto;
    height: auto;
    max-width: min(100%, 420px);
    max-height: 360px;
    object-fit: contain;
}

.qe-learn-root .qpage-con.is-mushaf-holding .qe-img-loader {
    display: none !important;
}

/* One centered mushaf loader across the spread (AR + EN) */
.qe-learn-root .qe-mushaf-col > .form-row {
    position: relative;
}

.qe-learn-root .qe-mushaf-col > .form-row > .col:has(.qe-img-loading),
.qe-learn-root .qe-img-loading {
    position: static !important;
    text-align: center;
}

.qe-learn-root .qe-mushaf-col > .form-row > .col:nth-child(1) .qe-img-loader {
    display: none !important;
}

.qe-learn-root .imgarea.qe-img-loading .qe-img-loader {
    display: flex !important;
    align-items: center;
    justify-content: center;
    top: 0;
    bottom: 0;
}

/* Keep loader illustration at its natural size (do not stretch to full mushaf height) */
.qe-learn-root .qe-explorer-layout .imgarea.qe-img-loading .qe-img-loader img {
    width: auto !important;
    height: auto !important;
    max-width: min(100%, 420px) !important;
    max-height: 360px !important;
    object-fit: contain;
    object-position: center;
}

/* Mushaf page header: compact surah/juz selectors, fit text width */
.qe-learn-root .qe-mushaf-col .heading {
    flex-wrap: nowrap;
    height: 40px;
    min-height: 40px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 0 12px;
    box-sizing: border-box;
}

.qe-learn-root .qe-mushaf-col .heading > span {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
    white-space: nowrap;
    flex: 0 0 auto;
    gap: 4px;
    direction: rtl;
    /* Drop Bootstrap ml-auto / ml-3 so space-between + fit-width selects create the gap */
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* English mushaf headings read LTR (label then dropdown) */
.qe-learn-root.qe-lang-en .qe-mushaf-col .heading > span {
    direction: ltr;
}

.qe-learn-root .qe-mushaf-col .heading select.surah,
.qe-learn-root .qe-mushaf-col .heading select.juz {
    /* Override fixed .juz width (95px) and longest-option auto width */
    width: auto !important;
    max-width: none;
    min-width: 0 !important;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    /* padding: 2px 22px 2px 8px; */
    line-height: 1.2;
    height: 28px !important;
    box-sizing: border-box;
    /* Modern browsers: size to the selected value, not the longest option */
    field-sizing: content;
}

.qe-learn-root.qe-lang-en .qe-mushaf-col .heading select.surah,
.qe-learn-root.qe-lang-en .qe-mushaf-col .heading select.juz {
    padding: 2px 8px 2px 22px;
}

.qe-learn-root .qe-mushaf-col .heading select.juz {
    max-width: none;
}

/* Bottom bar: page dropdowns hug prev/next; side arrows match play size */
.qe-learn-root .bottom-bar {
    --qe-bar-play-size: 35px;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
}

/* Lock play + side arrows to the same outer size */
.qe-learn-root .bottom-bar .gradient-border.center-icon.large-play-btn,
.qe-learn-root .bottom-bar > .sideicon {
    width: var(--qe-bar-play-size) !important;
    height: var(--qe-bar-play-size) !important;
    min-width: var(--qe-bar-play-size);
    min-height: var(--qe-bar-play-size);
    box-sizing: border-box;
}

.qe-learn-root .bottom-bar > .sideicon {
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
    padding: 2px;
}

/* Kill base QuranExplorer.css sideicon a margins that push arrows off-center */
.qe-learn-root .bottom-bar > .sideicon a,
.qe-learn-root .bottom-bar > .sideicon:first-child a,
.qe-learn-root .bottom-bar > .sideicon:last-child a {
    margin: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    line-height: 0;
    font-size: 0;
    padding: 0 !important;
}

.qe-learn-root .bottom-bar > .sideicon .fi {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: static;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1;
    font-size: 15px;
}

.qe-learn-root .bottom-bar > .sideicon .fi::before {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    width: 1em;
    height: 1em;
    font-size: 15px !important;
    font-weight: bold !important;
    text-align: center;
}

/*
 * These chevrons sit off-center in the circle (left arrow drifts right,
 * right arrow drifts left). Nudge each back to visual center.
 */
.qe-learn-root .bottom-bar > .sideicon .fi-rr-angle-left::before {
    transform: translateX(-1.5px);
}

.qe-learn-root .bottom-bar > .sideicon .fi-rr-angle-right::before {
    transform: translateX(1.5px);
}

/* Keep even-page dropdown next to the first side arrow; push center group inward */
.qe-learn-root .bottom-bar > .sideicon:first-child + div {
    flex: 0 0 auto;
    margin-inline-start: 4px;
    margin-inline-end: auto;
}

/* Keep odd-page dropdown next to the last side arrow */
.qe-learn-root .bottom-bar > div:nth-last-child(2) {
    flex: 0 0 auto;
    margin-inline-start: auto;
    margin-inline-end: 4px;
}

.qe-learn-root .bottom-bar > .center-icons {
    flex: 0 0 auto;
}

.qe-learn-root .bottom-bar .row.pgDivSelect,
.qe-learn-root .bottom-bar .row.pgDivSelectEven {
    padding: 0;
    margin: 0;
}

/* Compact page control: chevron + number only (no dead space between) */
.qe-learn-root .bottom-bar .row.pgDivSelect > span.pageListVal,
.qe-learn-root .bottom-bar .row.pgDivSelectEven > span.pageListValEven {
    min-width: 0 !important;
    width: auto !important;
    max-width: none;
    height: 28px;
    padding: 0 6px 0 16px !important;
    line-height: 28px;
    display: inline-block;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: visible;
    text-align: left !important; /* sit next to left chevron */
    background-size: 10px !important;
    background-position: 4px center !important;
    background-repeat: no-repeat !important;
}

.qe-learn-root.qe-lang-en .bottom-bar .row.pgDivSelect > span.pageListVal,
.qe-learn-root.qe-lang-en .bottom-bar .row.pgDivSelectEven > span.pageListValEven {
    padding: 0 16px 0 6px !important;
    text-align: right !important; /* sit next to right chevron */
    background-position: calc(100% - 4px) center !important;
}

@media screen and (max-height:960px){
    .qe-learn-root .body-content .container-fluid, .qe-learn-root .header .navbar {
        max-width: 1740px;
    }
}
@media screen and (max-height:940px) {
    .qe-learn-root .body-content .container-fluid, .qe-learn-root .header .navbar {
        max-width: 1700px;
    }
}
@media screen and (max-height:900px) {
    .qe-learn-root .body-content .container-fluid, .qe-learn-root .header .navbar {
        max-width: 1660px;
    }
}
@media screen and (max-height:860px) {
    .qe-learn-root .body-content .container-fluid, .qe-learn-root .header .navbar {
        max-width: 1620px;
    }
}
@media screen and (max-height:820px) {
    .qe-learn-root .body-content .container-fluid, .qe-learn-root .header .navbar {
        max-width: 1580px;
    }
}
@media screen and (max-height:780px) {
    .qe-learn-root .body-content .container-fluid, .qe-learn-root .header .navbar {
        max-width: 1540px;
    }
}
@media screen and (max-height:740px) {
    .qe-learn-root .body-content .container-fluid, .qe-learn-root .header .navbar {
        max-width: 1500px;
    }
}
@media screen and (max-height:700px) {
    .qe-learn-root .body-content .container-fluid, .qe-learn-root .header .navbar {
        max-width: 1460px;
    }
}
@media screen and (max-height:660px) {
    .qe-learn-root .body-content .container-fluid, .qe-learn-root .header .navbar {
        max-width: 1420px;
    }
}
@media screen and (max-height:620px) {
    .qe-learn-root .body-content .container-fluid, .qe-learn-root .header .navbar {
        max-width: 1380px;
    }
}
@media screen and (max-height:580px) {
    .qe-learn-root .body-content .container-fluid, .qe-learn-root .header .navbar {
        max-width: 1340px;
    }
}
/* Desktop header layout is defined with the main header rules above (3-column grid). */
@media screen and (min-width: 992px) {
    /* intentionally empty — kept for section markers / future desktop tweaks */
}

@media screen and (max-width:1360px) and (min-width:1201px){
    .qe-learn-root .qe-explorer-layout > .sidebar-content, .qe-learn-root .qe-explorer-layout > #sidebar-tabs {
        flex: 0 0 280px;
        width: 280px !important;
    }
}
/* â”€â”€ â‰¤1280px: padding only â€” do not hide either mushaf page â”€â”€ */
@media screen and (max-width: 1280px) {
    .qe-learn-root .body-content .container-fluid,
    .qe-learn-root .header .navbar {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* QuranExplorer.css sets min-width:100px on .form-control â€” keep mushaf selects compact */
    .qe-learn-root .qe-mushaf-col .heading select.surah,
    .qe-learn-root .qe-mushaf-col .heading select.juz {
        min-width: 0 !important;
    }
}

/* â”€â”€ â‰¤1199px: mushaf + tools side-by-side; study panel becomes an off-canvas
   drawer (instead of stacking under the tools column, which used to push it
   to the bottom of the page). A single "Tafseer & Translation" toggle opens it. â”€â”€ */
@media screen and (max-width: 1199px) {
    .qe-learn-root .qe-explorer-layout {
        display: grid;
        grid-template-columns: minmax(600px, 1fr) minmax(260px, 320px);
        grid-template-areas: "mushaf side-tabs";
        gap: 12px;
        align-items: start;
    }

    .qe-learn-root .qe-explorer-layout > .qe-mushaf-col {
        grid-area: mushaf;
        width: 100% !important;
        min-width: 600px;
        max-width: 100%;
    }

    .qe-learn-root .qe-explorer-layout > #sidebar-tabs {
        grid-area: side-tabs;
        width: 100% !important;
        max-width: none;
        flex: none;
        /* Keep tools column within the viewport so a tall accordion list
           scrolls inside the column instead of growing the whole page. */
        max-height: calc(100vh - 97px);
        max-height: calc(100dvh - 97px);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        align-self: start;
        overscroll-behavior: contain;
    }

    /* Study panel: off-canvas drawer (not in the grid flow) */
    .qe-learn-root .qe-explorer-layout > .sidebar-content {
        position: fixed !important;
        grid-area: unset;
        top: 0;
        bottom: 0;
        left: 0;
        right: auto;
        height: 100vh;
        height: 100dvh;
        width: min(88vw, 360px) !important;
        max-width: min(88vw, 360px) !important;
        margin: 0;
        /* !important beats Bootstrap .px-0 so content is not flush to the edges */
        padding: 56px 16px 20px !important;
        background: #F0F0E6;
        box-shadow: 0 0 28px rgba(0, 0, 0, 0.28);
        z-index: 1035;
        overflow-y: auto;
        transform: translateX(-105%);
        transition: transform 0.28s ease;
        flex: none;
    }

    .qe-learn-root.qe-lang-en .qe-explorer-layout > .sidebar-content {
        left: auto;
        right: 0;
        transform: translateX(105%);
    }

    .qe-learn-root.qe-study-panel-open .qe-explorer-layout > .sidebar-content {
        transform: translateX(0);
    }

    /* Tools panel stays visible in the grid — hide its toggle until ≤991px
       (toggle visibility itself is set in the later ≤1199px chrome block below
       so it wins over the base display:none). */

    .qe-learn-root #AsbaabMaaniTabs .tab-content {
        height: auto;
        max-height: 280px;
    }

    /* English tablet mirror: tools left, mushaf right */
    .qe-learn-root.qe-lang-en .qe-explorer-layout {
        grid-template-columns: minmax(260px, 320px) minmax(600px, 1fr);
        grid-template-areas: "side-tabs mushaf";
    }

    /* Accordion sections inside the study drawer (second starts collapsed) */
    .qe-learn-root .sidebar-content .qe-panel-collapse-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        order: -1;
        width: 26px;
        height: 26px;
        margin-left: 8px;
        margin-right: 0.35rem;
        margin-inline-start: 8px;
        margin-inline-end: 0.35rem;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: rgba(75, 48, 0, 0.08);
        color: #4B3000;
        font-size: 0.8rem;
        cursor: pointer;
    }

    .qe-learn-root .sidebar-content .qe-panel-collapse-toggle i {
        transition: transform 0.2s ease;
    }

    .qe-learn-root .sidebar-content .qe-panel-collapse-toggle[aria-expanded="true"] i {
        transform: rotate(180deg);
    }

    /* Keep header icons off the card edge; tabs fill from icons to the end (no white gap) */
    .qe-learn-root .sidebar-content .radio-selections {
        padding: 0;
        gap: 0;
    }

    .qe-learn-root .sidebar-content .radio-selections > .qe-panel-settings-wrap {
        flex: 0 0 auto !important;
        flex-grow: 0 !important;
        width: auto !important;
        padding-left: 6px;
        padding-right: 4px;
    }

    .qe-learn-root .sidebar-content .radio-selections > .qe-tt-tabs-scroll {
        flex: 1 1 0;
        min-width: 0;
    }

    .qe-learn-root .sidebar-content .radio-selections > .qe-tt-tabs-scroll > .qe-tt-tab {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0;
    }

    .qe-learn-root .sidebar-content .radio-selections > .qe-panel-collapse-toggle {
        flex: 0 0 auto !important;
    }

    .qe-learn-root .sidebar-content .radio-selections input + span,
    .qe-learn-root .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar .nav-link {
        font-size: 0.75rem !important;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
        white-space: nowrap;
    }

    .qe-learn-root .sidebar-content #tafseerTranslationPanel .radio-selections input + span {
        font-size: 0.68rem !important;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }

    /* Taleem panel (mobile/tablet): same RTL tab order as Arabic desktop */
    .qe-learn-root.qe-lang-ar #tafseerTranslationPanel .qe-tt-tabs-scroll > .qe-tt-tab:nth-child(1) { order: 5; }
    .qe-learn-root.qe-lang-ar #tafseerTranslationPanel .qe-tt-tabs-scroll > .qe-tt-tab:nth-child(2) { order: 4; }
    .qe-learn-root.qe-lang-ar #tafseerTranslationPanel .qe-tt-tabs-scroll > .qe-tt-tab:nth-child(3) { order: 3; }
    .qe-learn-root.qe-lang-ar #tafseerTranslationPanel .qe-tt-tabs-scroll > .qe-tt-tab:nth-child(4) { order: 2; }
    .qe-learn-root.qe-lang-ar #tafseerTranslationPanel .qe-tt-tabs-scroll > .qe-tt-tab:nth-child(5) { order: 1; }
    .qe-learn-root.qe-lang-ar #tafseerTranslationPanel .radio-selections > .qe-panel-collapse-toggle {
        order: 0;
    }

    .qe-learn-root.qe-lang-en .sidebar-content .radio-selections > .qe-tt-tabs-scroll {
        order: 0;
        flex: 1 1 0;
        min-width: 0;
    }

    .qe-learn-root.qe-lang-en .sidebar-content .radio-selections > .qe-panel-settings-wrap {
        order: 1;
        margin-left: 4px;
        margin-right: 0 !important;
    }

    .qe-learn-root.qe-lang-en .sidebar-content .radio-selections > .qe-panel-collapse-toggle {
        order: 2;
        margin-left: 6px;
        margin-right: 0;
    }

    .qe-learn-root .sidebar-content .qe-panel-collapse-toggle {
        margin-left: 6px;
        margin-right: 2px;
    }

    .qe-learn-root .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar.nav-pills {
        padding: 0;
        background-color: #F9F4EB !important;
    }

    .qe-learn-root .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar > .nav-item {
        flex: 0 0 auto !important;
        width: auto !important;
    }

    .qe-learn-root .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar > .nav-item:first-of-type {
        margin-left: auto !important;
    }

    .qe-learn-root .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar > .qe-panel-settings-wrap {
        flex: 0 0 auto !important;
        flex-grow: 0 !important;
        padding-left: 6px;
        padding-right: 4px;
        margin-right: 0 !important;
    }

    /* Expand (fullscreen) control — inset from the left card edge */
    .qe-learn-root .sidebar-content .qe-panel-expand-btn {
        left: 12px;
        right: auto;
    }

    .qe-learn-root .sidebar-content .mb-3.qe-panel-collapsed > .qe-expandable-panel {
        display: none;
    }

    .qe-learn-root .sidebar-content #AsbaabMaaniTabs.qe-panel-collapsed > .tab-content,
    .qe-learn-root .sidebar-content #AsbaabMaaniTabs.qe-panel-collapsed > .qe-panel-expand-btn {
        display: none;
    }

    .qe-learn-root .sidebar-content #AsbaabMaaniTabs.qe-panel-collapsed {
        padding-bottom: 0.75rem;
    }

    .qe-learn-root .sidebar-content #AsbaabMaaniTabs.qe-panel-collapsed > .qe-study-tab-bar {
        border-radius: 6px 6px 0 0;
        background-color: #F9F4EB !important;
    }
}

/* Meanings / Asbab tab bar — match Tafseer/Translation .radio-selections look */
.qe-learn-root .sidebar-content #AsbaabMaaniTabs {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: visible;
}

.qe-learn-root .sidebar-content .radio-selections,
.qe-learn-root .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar.nav-pills {
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0;
    flex-wrap: nowrap;
    align-items: center;
    /* Shared tab-bar strip (same on tafseer + meanings panels) */
    background-color: #F9F4EB !important;
    background-image: none !important;
    border-radius: 6px 6px 0 0;
    box-shadow: rgba(100, 100, 111, 0.2) 0 7px 29px 0;
    font-size: 14px;
}

/* Scrollable tab row — settings + collapse stay pinned; extra tabs scroll */
.qe-learn-root .sidebar-content .radio-selections {
    display: flex;
    align-items: center;
    overflow: hidden;
    min-width: 0;
}

.qe-learn-root .sidebar-content .qe-tt-tabs-scroll {
    display: flex;
    flex: 1 1 0 !important;
    flex-wrap: nowrap;
    align-items: stretch;
    align-self: stretch;
    width: 0 !important;
    min-width: 0 !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(75, 48, 0, 0.35) transparent;
    background-color: #F9F4EB !important;
}

.qe-learn-root .sidebar-content .qe-tt-tabs-scroll::-webkit-scrollbar {
    height: 6px;
    display: block;
}

.qe-learn-root .sidebar-content .qe-tt-tabs-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.qe-learn-root .sidebar-content .qe-tt-tabs-scroll::-webkit-scrollbar-thumb {
    background: rgba(75, 48, 0, 0.35);
    border-radius: 4px;
}

.qe-learn-root .sidebar-content .radio-selections > div.qe-tt-tabs-scroll {
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    background-color: #F9F4EB !important;
}

.qe-learn-root .sidebar-content .radio-selections > .qe-panel-settings-wrap {
    display: flex;
    align-items: center;
    align-self: center;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    width: auto !important;
    height: auto;
    position: relative;
    z-index: 2;
    background: transparent !important;
}

.qe-learn-root .sidebar-content .radio-selections > .qe-panel-collapse-toggle {
    align-self: center;
    flex: 0 0 28px !important;
    flex-shrink: 0 !important;
    width: 28px !important;
    height: 28px !important;
    position: relative;
    z-index: 2;
}

.qe-learn-root .sidebar-content .qe-tt-tabs-scroll > .qe-tt-tab {
    display: flex;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    width: auto !important;
    min-width: max-content;
    margin: 0;
    background: transparent;
}

.qe-learn-root .sidebar-content .qe-tt-tabs-scroll > .qe-tt-tab > label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0 !important;
}

.qe-learn-root .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar > .nav-item {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
}

.qe-learn-root .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar > .qe-panel-settings-wrap {
    flex: 0 0 auto !important;
    flex-grow: 0 !important;
    width: auto !important;
    background: transparent !important;
}

/* Shared tab label chrome (top radio spans + bottom nav links) */
.qe-learn-root .sidebar-content .radio-selections input + span,
.qe-learn-root .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
    background-color: #F9F4EB !important;
    color: #816225 !important;
    border-radius: 0 !important;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 400;
    font-size: 14px !important;
    line-height: 1.2;
    padding: 8px 10px !important;
    white-space: nowrap;
}

.qe-learn-root .sidebar-content .radio-selections input:checked + span,
.qe-learn-root .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar .nav-link.active {
    background-color: #4B3000 !important;
    color: #fff !important;
    border-radius: 0 !important;
}

/* Kill legacy rounded top-right on meanings/asbab active tab */
.qe-learn-root .sidebar-content #AsbaabMaaniTabs .nav-item .nav-link,
.qe-learn-root .sidebar-content #AsbaabMaaniTabs .nav-item:nth-child(3) .nav-link,
.qe-learn-root .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar > .nav-item:last-of-type .nav-link {
    border-radius: 0 !important;
}

.qe-learn-root .sidebar-content #AsbaabMaaniTabs > .tab-content {
    padding: 12px;
    background: #fff !important;
    border-radius: 0 0 6px 6px;
    box-shadow: rgba(100, 100, 111, 0.2) 0 7px 29px 0;
    height: auto;
    max-height: none;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

/* â”€â”€ â‰¤991px: header + padding tweaks â”€â”€ */
@media screen and (max-width: 991px) {
    .qe-learn-root .header {
        margin-bottom: 1rem !important;
    }
    .qe-learn-root .qe-explorer-layout {
        grid-template-columns: 1fr;
        grid-template-areas: "mushaf";
    }
        .qe-learn-root .body-content,
        .qe-learn-root .body-content .container-fluid,
        .qe-learn-root .header .navbar {
            padding-left: 12px;
            padding-right: 12px;
        }

    .qe-learn-root .header .navbar-collapse,
    .qe-learn-root .header .qe-header-main {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .qe-learn-root .header .qe-section-nav {
        width: 100%;
        margin: 0;
        flex-direction: column;
    }

    .qe-learn-root .header .qe-section-nav .nav-item {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .qe-learn-root .header .qe-section-nav .nav-link {
        display: block;
        border-radius: 6px;
    }

    .qe-learn-root .header .qe-account-nav {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .qe-learn-root .header .qe-header-start {
        flex: 1 1 auto;
    }

    /* Keep nav arrows pinned to the two ends and the play controls in a single
       centered line — never wrap to a second row (which used to push the
       page-flip control / content below the bar further down the page). */
    .qe-learn-root .bottom-bar {
        flex-wrap: nowrap;
        gap: 6px;
    }

    .qe-learn-root .bottom-bar .sideicon {
        flex-shrink: 0;
    }

    .qe-learn-root .bottom-bar .qe-page-jump {
        display: none;
    }

    .qe-learn-root .bottom-bar > .sideicon:first-child + div,
    .qe-learn-root .bottom-bar > div:nth-last-child(2) {
        margin-inline: 0;
    }

    .qe-learn-root .bottom-bar .center-icons {
        order: 0;
        width: auto;
        flex: 1 1 auto;
        justify-content: center;
        flex-wrap: nowrap;
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .qe-learn-root .bottom-bar .center-icons::-webkit-scrollbar {
        display: none;
    }
}

/* Mobile off-canvas panel toggles + backdrop + page-flip button — base
   (hidden) styles. Must be declared BEFORE the max-width:991px /
   max-width:767px overrides below so those media-query rules win the
   cascade at narrow widths (same selector specificity either way). */
.qe-mobile-panel-toggles {
    display: none;
    gap: 10px;
    margin: 0 0 12px;
}

.qe-panel-collapse-toggle {
    display: none;
}

.qe-mobile-page-flip {
    display: none;
}

.qe-mobile-page-flip .qe-flip-to-first {
    display: none;
}

.qe-learn-root .qe-mushaf-col[data-mobile-page="even"] .qe-mobile-page-flip .qe-flip-to-second {
    display: none;
}

.qe-learn-root .qe-mushaf-col[data-mobile-page="even"] .qe-mobile-page-flip .qe-flip-to-first {
    display: inline;
}

.qe-mobile-panel-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 0;
    padding: 10px 12px;
    background: #FFFBF3;
    border: 1.5px solid rgba(75, 48, 0, 0.25);
    border-radius: 8px;
    color: #4B3000;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.qe-mobile-panel-toggle i {
    font-size: 1rem;
}

.qe-mobile-panel-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1030;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.qe-learn-root.qe-study-panel-open .qe-mobile-panel-backdrop,
.qe-learn-root.qe-tools-panel-open .qe-mobile-panel-backdrop {
    opacity: 1;
    visibility: visible;
}

.qe-learn-root.qe-study-panel-open,
.qe-learn-root.qe-tools-panel-open {
    overflow: hidden;
}

.qe-mobile-panel-close {
    display: none;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 10px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(75, 48, 0, 0.08);
    color: #4B3000;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
}

/* Close sits on the inner edge (toward the mushaf):
   left-side panel → close on the right; right-side panel → close on the left. */
.qe-learn-root .sidebar-content > .qe-mobile-panel-close,
#qeCloseStudyPanel {
    right: 10px;
    left: auto;
}

.qe-learn-root #sidebar-tabs > .qe-mobile-panel-close,
#qeCloseToolsPanel {
    left: 10px;
    right: auto;
}

/* English: panels swap sides, so close icons swap too */
.qe-learn-root.qe-lang-en .sidebar-content > .qe-mobile-panel-close,
.qe-learn-root.qe-lang-en #qeCloseStudyPanel {
    left: 10px;
    right: auto;
}

.qe-learn-root.qe-lang-en #sidebar-tabs > .qe-mobile-panel-close,
.qe-learn-root.qe-lang-en #qeCloseToolsPanel {
    right: 10px;
    left: auto;
}

/* Show study-panel chrome at ≤1199px. Declared AFTER the base display:none
   rules above so these win the cascade (same specificity). */
@media screen and (max-width: 1199px) {
    .qe-mobile-panel-toggles {
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }

    .qe-mobile-panel-toggles #qeOpenToolsPanel {
        display: none;
    }

    /* Compact study toggle — hug content, sit in the left corner */
    .qe-mobile-panel-toggles .qe-mobile-panel-toggle {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
        padding: 6px 10px;
        font-size: 0.78rem;
        gap: 6px;
        border-radius: 6px;
    }

    .qe-mobile-panel-toggles .qe-mobile-panel-toggle i {
        font-size: 0.85rem;
    }

    .qe-mobile-panel-backdrop {
        display: block;
    }

    #qeCloseStudyPanel {
        display: flex;
    }
}

/* â”€â”€ â‰¤991px: both study + tools panels become off-canvas drawers â”€â”€
   Panels are taken out of the grid flow via position:fixed and hidden off-
   screen by default; two toggle buttons (rendered inside .qe-mushaf-col)
   slide them in over the mushaf. The mushaf column no longer needs to
   reserve space for them, so it can use the full viewport width.
   (Study panel already becomes a drawer at ≤1199px — this block adds the
   tools panel drawer and switches to a single-column mushaf layout.) */
@media screen and (max-width: 991px) {
    .qe-learn-root .body-content {
        min-width: 0;
    }

    .qe-learn-root .qe-explorer-layout {
        grid-template-areas: "mushaf" !important;
        grid-template-columns: 1fr !important;
    }

    .qe-learn-root .qe-explorer-layout > .qe-mushaf-col {
        min-width: 0 !important;
        width: 100% !important;
    }

    .qe-mobile-panel-toggles {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .qe-mobile-panel-toggles #qeOpenToolsPanel {
        display: flex;
        margin-inline-start: auto;
    }

    .qe-mobile-panel-backdrop {
        display: block;
    }

    .qe-learn-root .qe-explorer-layout > .sidebar-content,
    .qe-learn-root .qe-explorer-layout > #sidebar-tabs {
        position: fixed !important;
        grid-area: unset;
        top: 0;
        bottom: 0;
        height: 100vh;
        height: 100dvh;
        width: min(88vw, 360px) !important;
        max-width: min(88vw, 360px) !important;
        margin: 0;
        /* !important beats Bootstrap .px-0 so content is not flush to the edges */
        padding: 56px 16px 20px !important;
        background: #F0F0E6;
        box-shadow: 0 0 28px rgba(0, 0, 0, 0.28);
        z-index: 1035;
        overflow-y: auto;
        transition: transform 0.28s ease;
    }

    /* Arabic default: study panel slides from the left, tools panel from the right */
    .qe-learn-root .qe-explorer-layout > .sidebar-content {
        left: 0;
        right: auto;
        transform: translateX(-105%);
    }

    .qe-learn-root .qe-explorer-layout > #sidebar-tabs {
        right: 0;
        left: auto;
        transform: translateX(105%);
        max-height: none;
    }

    /* English mirror: tools panel slides from the left, study panel from the right */
    .qe-learn-root.qe-lang-en .qe-explorer-layout > #sidebar-tabs {
        left: 0;
        right: auto;
        transform: translateX(-105%);
    }

    .qe-learn-root.qe-lang-en .qe-explorer-layout > .sidebar-content {
        right: 0;
        left: auto;
        transform: translateX(105%);
    }

    .qe-learn-root.qe-study-panel-open .qe-explorer-layout > .sidebar-content,
    .qe-learn-root.qe-tools-panel-open .qe-explorer-layout > #sidebar-tabs {
        transform: translateX(0);
    }

    .qe-mobile-panel-close {
        display: flex;
    }
}

/* â”€â”€ â‰¤767px: mushaf full width, then side panels (mirrored order on English) â”€â”€ */
@media screen and (max-width: 767px) {
    /* ── Single-page mushaf: only one of the paired Even/Odd pages shows at a
       time (default: the Odd/primary page). The other stays fully loaded and
       mapped in the DOM — no data is refetched. Bottom-bar Next/Prev flips
       to the other page of the spread first; only then advances by a full
       spread (see learn-mobile-panels.js). ── */
    .qe-learn-root .qe-mushaf-col .form-row {
        flex-wrap: nowrap;
    }

    .qe-learn-root .qe-mushaf-col .form-row > .col {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .qe-learn-root .qe-mushaf-col[data-mobile-page="odd"] .qe-page-even {
        display: none;
    }

    .qe-learn-root .qe-mushaf-col[data-mobile-page="even"] .qe-page-odd {
        display: none;
    }

    .qe-learn-root .qe-mushaf-col .qpage-con {
        border-radius: 6px;
    }

    /* Only one page shows at a time here — center it instead of the
       desktop's edge-alignment (used there so the two pages meet in the
       middle like an open book spine). */
    .qe-learn-root .qe-mushaf-col .imgarea > div[id] {
        float: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-inline-start: auto !important;
        margin-inline-end: auto !important;
    }

    /* Flip is handled by bottom-bar arrows — keep this control hidden */
    .qe-mobile-page-flip {
        display: none !important;
    }

    .qe-learn-root .header .home-link {
        max-width: 40vw;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.9rem;
    }

    .qe-learn-root .sidebar-content .radio-selections,
    .qe-learn-root .sidebar-content #AsbaabMaaniTabs > .qe-study-tab-bar.nav-pills {
        flex-wrap: nowrap !important;
    }

    .qe-learn-root .radio-selections {
        flex-wrap: wrap;
    }

    .qe-learn-root .radio-selections + div #evenDiv {
        height: auto;
        max-height: 200px;
    }

    .qe-learn-root #AsbaabMaaniTabs .tab-content {
        max-height: 240px;
    }

    .qe-learn-root #sidebar-tabs .tabs .nav-tabs .nav-item .nav-link,
    .qe-learn-root #sidebar-tabs .tabs .nav-tabs .nav-link.active {
        height: auto;
        min-height: 64px;
    }

    .qe-learn-root .popup .modal-lg {
        max-width: calc(100% - 1.5rem);
    }
}

/* â”€â”€ â‰¤575px: extra-narrow phones (single mushaf page mode from the â‰¤767px block above still applies) â”€â”€ */
@media screen and (max-width: 575px) {
    .qe-learn-root .body-content,
    .qe-learn-root .body-content .container-fluid,
    .qe-learn-root .header .navbar {
        padding-left: 8px;
        padding-right: 8px;
    }

    .qe-learn-root .header .home-link {
        display: none;
    }

    .qe-learn-root .bottom-bar {
        padding: 8px 6px;
    }

    .qe-learn-root .bottom-bar .center-icons {
        gap: 4px;
    }
}

/* â”€â”€ Test Understanding (Ø§Ø®ØªØ¨Ø± ÙÙ‡Ù…Ùƒ) â”€â”€ */
.qe-learn-root.qe-lang-en #collapseThree.clipboard .samaa-repeat-fields {
    direction: ltr;
    text-align: left;
}

#collapseThree.clipboard .clipboard-range-summary {
    margin: 0.75rem 0 0;
    min-height: 1.4em;
    color: #4B3000;
    font-size: 13px;
}

#collapseThree.clipboard .clipboard-answer-mode {
    direction: rtl;
    text-align: right;
}

#collapseThree.clipboard .clipboard-answer-mode-title {
    margin: 0 0 0.65rem;
    font-size: 14px;
    font-weight: 600;
    color: #4B3000;
    font-family: 'Vazirmatn', sans-serif;
}

#collapseThree.clipboard .clipboard-answer-mode-choice {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin: 0 0 0.5rem;
    cursor: pointer;
    direction: rtl;
}

#collapseThree.clipboard .clipboard-answer-mode-choice input[type="radio"] {
    margin: 0;
    flex-shrink: 0;
    position: static;
}

#collapseThree.clipboard .clipboard-answer-mode-text {
    font-size: 14px;
    color: #383433;
    line-height: 1.3;
}

.qe-learn-root.qe-lang-en #collapseThree.clipboard .clipboard-answer-mode {
    direction: ltr;
    text-align: left;
}

.qe-learn-root.qe-lang-en #collapseThree.clipboard .clipboard-answer-mode-choice {
    direction: ltr;
}

body.clipboard-session-locked #sidebar-tabs .card-header .btn-link:not([data-target="#collapseThree"]) {
    pointer-events: none;
    opacity: 0.55;
}

/* Other tools locked; Test Understanding filters + Proceed stay usable to apply new scope */
body.clipboard-session-locked #samaaRepeatProceed,
body.clipboard-session-locked #izhharStart,
body.clipboard-session-locked #sajjalStart {
    pointer-events: none;
    opacity: 0.55;
}

body.clipboard-session-locked #clipboardMushafTooltip {
    pointer-events: auto;
}

/* Keep playback controls visible but disabled; pagination stays usable */
body.clipboard-session-locked .bottom-bar > .center-icons:not(.sajjal-control-bar) {
    pointer-events: none;
    opacity: 0.55;
}

.clipboard-quiz-modal.qe-clipboard-quiz-modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.clipboard-quiz-modal.qe-clipboard-quiz-modal .modal-dialog,
.clipboard-quiz-modal.qe-clipboard-quiz-modal .modal-dialog.modal-dialog-centered {
    max-width: 640px;
    width: calc(100% - 32px);
    margin: auto !important;
    display: flex;
    align-items: center;
    min-height: auto;
}

.clipboard-quiz-modal.qe-clipboard-quiz-modal .modal-content {
    background: #fdfaf5;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
}

.clipboard-quiz-modal .modal-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    direction: ltr !important;
    gap: 0.75rem;
    margin: 0 !important;
    padding: 8px 16px !important;
    border-bottom: none !important;
    background-color: #1e1007 !important;
    background-image: linear-gradient(172deg, #1e1007 0%, #5c3317 100%) !important;
}

.clipboard-quiz-modal .modal-header .close {
    order: 1 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: static !important;
    opacity: 1 !important;
    color: #fff !important;
    text-shadow: none;
    background: rgba(255, 255, 255, 0.12) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer;
    flex-shrink: 0;
}

.clipboard-quiz-modal .modal-header .close:hover,
.clipboard-quiz-modal .modal-header .close:focus {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.22) !important;
    outline: none;
}

.clipboard-quiz-modal .qe-clipboard-modal-close-icon {
    display: block;
    width: 15px;
    height: 15px;
}

.clipboard-quiz-modal .qe-clipboard-modal-heading {
    order: 2 !important;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    min-width: 0;
}

/* Arabic: title on the right */
.clipboard-quiz-modal.clipboard-ui-rtl .qe-clipboard-modal-heading {
    align-items: flex-end !important;
    text-align: right !important;
    direction: rtl !important;
}

.clipboard-quiz-modal.clipboard-ui-rtl .modal-header .modal-title,
.clipboard-quiz-modal.clipboard-ui-rtl .clipboard-quiz-progress {
    width: 100% !important;
    text-align: right !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* English: title on the left, close on the right */
.clipboard-quiz-modal.clipboard-ui-ltr .modal-header .close {
    order: 2 !important;
    margin-left: auto !important;
}

.clipboard-quiz-modal.clipboard-ui-ltr .qe-clipboard-modal-heading {
    order: 1 !important;
    align-items: flex-start !important;
    text-align: left !important;
    direction: ltr !important;
}

.clipboard-quiz-modal.clipboard-ui-ltr .modal-header .modal-title,
.clipboard-quiz-modal.clipboard-ui-ltr .clipboard-quiz-progress {
    width: 100% !important;
    text-align: left !important;
}

.clipboard-quiz-modal .modal-header .modal-title,
.clipboard-quiz-modal .qe-clipboard-modal-heading .modal-title {
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 1 auto;
    color: #fff !important;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 20px;
}

.clipboard-quiz-modal .clipboard-quiz-progress {
    display: block;
    margin: 2px 0 0;
    color: #e5b55a;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    opacity: 0.85;
    white-space: nowrap;
}

.clipboard-quiz-modal .clipboard-quiz-progress:empty {
    display: none;
}

.clipboard-quiz-modal .qe-clipboard-modal-gold-line {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, #c8922a 0%, #e5b55a 50%, #c8922a 100%);
}

.clipboard-quiz-modal .modal-body {
    background-color: #fdfaf5 !important;
    max-height: min(520px, calc(100vh - 200px));
    overflow: auto;
    padding: 12px 14px !important;
}

.clipboard-quiz-modal .modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 12px 14px 16px;
    border-top: 1px solid #eadfce;
    background: #fdfaf5;
}

.clipboard-quiz-modal.clipboard-ui-rtl .modal-footer {
    direction: rtl;
    justify-content: flex-start;
}

.clipboard-quiz-modal.clipboard-ui-ltr .modal-footer {
    direction: ltr;
    justify-content: flex-end;
}

.clipboard-quiz-modal .clipboard-quiz-primary-btn {
    background: #5c3317;
    border-color: #5c3317;
    color: #fff;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.45rem 1.1rem;
}

.clipboard-quiz-modal .clipboard-quiz-primary-btn:hover,
.clipboard-quiz-modal .clipboard-quiz-primary-btn:focus {
    background: #4a2812;
    border-color: #4a2812;
    color: #fff;
}

.clipboard-quiz-modal .clipboard-quiz-close-btn {
    background: #f0e8de;
    border-color: #e4dccf;
    color: #1e1007;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.45rem 1.1rem;
}

.clipboard-quiz-modal .clipboard-quiz-close-btn:hover,
.clipboard-quiz-modal .clipboard-quiz-close-btn:focus {
    background: #e8dfd0;
    color: #1e1007;
}

.clipboard-question {
    border: none;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    margin-bottom: 0.55rem;
    background: transparent;
    transition: background-color 0.15s ease;
}

.clipboard-question:hover {
    background: #f0e8de;
}

.clipboard-question.is-submitted {
    background: #f7f1e6;
}

.clipboard-question-meta {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.35);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: 'Vazirmatn', sans-serif;
}

.clipboard-question-content.is-rtl {
    direction: rtl;
    text-align: right;
}

.clipboard-question-content.is-ltr {
    direction: ltr;
    text-align: left;
}

.clipboard-stem {
    margin-bottom: 0.5rem;
    color: #5a4a38;
}

.clipboard-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e1007;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
}

.qe-stimulating-summary {
    text-decoration: underline;
    text-underline-offset: 3px;
    color: #4a2c82;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.qe-stimulating-summary-hint {
    display: block;
    margin-top: 0.15rem;
    font-size: 12px;
    font-weight: 500;
    color: #8a6230;
    text-decoration: none;
}

.qe-stimulating-summary-open {
    cursor: pointer;
    margin: 0 0 0.75rem;
    padding: 0.7rem 0.8rem;
    border-radius: 8px;
    background: #f8f3ea;
    border: 1px dashed #c4a574;
}

.qe-stimulating-summary-open:focus {
    outline: 2px solid #8a6230;
    outline-offset: 2px;
}

.clipboard-question.has-stimulating-summary .clipboard-question-content.is-awaiting-open {
    display: none;
}

.clipboard-reference {
    font-size: 12px;
    color: #7a6a56;
    margin-bottom: 0.75rem;
}

.clipboard-options {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.clipboard-option {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0;
    padding: 0.55rem 0.65rem;
    border: 1px solid #e8dfd0;
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
}

.clipboard-option input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.clipboard-option.is-correct {
    border-color: #2e7d32;
    background: #e8f5e9;
}

.clipboard-option.is-wrong {
    border-color: #c62828;
    background: #ffebee;
}

.clipboard-option.is-missed {
    border-color: #ef6c00;
    background: #fff3e0;
}

.clipboard-question.is-submitted .clipboard-option {
    cursor: default;
}

.clipboard-submit-one {
    margin-top: 0.25rem;
}

.clipboard-result-block {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #ddd2c0;
}

.clipboard-result-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.clipboard-result-stats {
    flex: 1 1 180px;
    font-size: 13px;
    line-height: 1.5;
    font-family: 'Vazirmatn', sans-serif;
}

.clipboard-result-status {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.clipboard-result-status--tick { color: #2e7d32; }
.clipboard-result-status--delete { color: #c62828; }
.clipboard-result-status--partial { color: #ef6c00; }

.clipboard-result-summary-line {
    margin-top: 0.35rem;
    color: #5a4a38;
}

.clipboard-pie {
    flex-shrink: 0;
}

.clipboard-feedback {
    margin-top: 0.75rem;
}

.clipboard-feedback-text {
    margin-bottom: 0.5rem;
    font-size: 13px;
}

.clipboard-feedback-media {
    margin-top: 0.5rem;
}

.clipboard-feedback-media img,
.clipboard-feedback-media video {
    max-width: 100%;
    border-radius: 6px;
}

.clipboard-feedback-media audio {
    width: 100%;
}

.clipboard-overall {
    margin-top: 0.25rem;
    padding: 0.75rem;
    background: #f0e8de;
    border-radius: 12px;
    width: 100%;
}

.clipboard-overall h6 {
    margin: 0 0 0.5rem;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    color: #1e1007;
}

.clipboard-quiz-modal.clipboard-ui-rtl .clipboard-overall,
.clipboard-quiz-modal.clipboard-ui-rtl .clipboard-overall h6,
.clipboard-quiz-modal.clipboard-ui-rtl .clipboard-result-stats,
.clipboard-quiz-modal.clipboard-ui-rtl .clipboard-result-summary-line {
    direction: rtl;
    text-align: right;
}

.clipboard-quiz-modal.clipboard-ui-rtl .clipboard-result-top {
    flex-direction: row-reverse;
}

.clipboard-quiz-modal.clipboard-ui-ltr .clipboard-overall,
.clipboard-quiz-modal.clipboard-ui-ltr .clipboard-overall h6,
.clipboard-quiz-modal.clipboard-ui-ltr .clipboard-result-stats,
.clipboard-quiz-modal.clipboard-ui-ltr .clipboard-result-summary-line {
    direction: ltr;
    text-align: left;
}

.clipboard-quiz-modal.clipboard-ui-ltr .clipboard-result-top {
    flex-direction: row;
}

.clipboard-quiz-modal.clipboard-ui-rtl .clipboard-result-block .clipboard-result-top {
    flex-direction: row-reverse;
}

.clipboard-rtf img {
    max-width: 100%;
    height: auto;
}

/* Audio speed slider (ØªØºÙŠØ± Ø³Ø±Ø¹Ø© Ø§Ù„ØµÙˆØª) */
.qe-audio-speed-control {
    direction: ltr;
    padding: 0.5rem 0.25rem 0.25rem;
}

.qe-audio-speed-value {
    text-align: center;
    font-weight: 600;
    color: #4B3000;
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.qe-audio-speed-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #c9b089 0%, #8a6a2f 100%);
    outline: none;
    margin: 0;
    cursor: pointer;
}

.qe-audio-speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4B3000;
    border: 2px solid #f5efe3;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.qe-audio-speed-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4B3000;
    border: 2px solid #f5efe3;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.qe-audio-speed-slider:focus {
    outline: none;
}

.qe-audio-speed-slider:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(75, 48, 0, 0.25);
}

.qe-audio-speed-ticks {
    display: flex;
    justify-content: space-between;
    margin-top: 0.55rem;
    color: #5c4a2a;
    font-size: 0.85rem;
}

/* Combined Tools — movable mode switcher */
#combinedModeTooltip {
    width: 300px !important;
    min-width: 300px !important;
    max-width: min(300px, calc(100vw - 24px)) !important;
    z-index: 10070;
    white-space: normal;
    /* Close sits on the left in RTL — reserve padding there, not on the right */
    padding: 0.65rem 0.75rem 0.75rem 2.35rem !important;
    box-sizing: border-box;
}

#combinedModeTooltip.is-visible {
    display: block;
}

#combinedModeTooltip.is-dragging {
    cursor: grabbing;
}

#combinedModeTooltip .samaa-repeat-tooltip-content {
    width: 100%;
}

#combinedModeTooltip .samaa-repeat-tooltip-title {
    margin-bottom: 0.35rem;
    padding-right: 0;
}

#combinedModeTooltip .samaa-repeat-tooltip-close {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 2;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

#combinedModeTooltip .samaa-repeat-tooltip-close:hover {
    background: #c82333;
    color: #fff;
}

.combined-mode-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.45rem;
    width: 100%;
}

.combined-mode-option {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.45rem 0.65rem;
    border: 1px solid #d8c4a0;
    border-radius: 6px;
    background: #fffdf8;
    color: #4b3000;
    font-size: 0.9rem;
    text-align: inherit;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.combined-mode-option:hover {
    background: #f7efdf;
    border-color: #c9a86a;
}

.combined-mode-option.is-selected {
    background: #4b3000;
    border-color: #4b3000;
    color: #fff;
    font-weight: 600;
}

.combined-tool-settings {
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px solid #f0e6d6;
}

.combined-tool-settings[hidden] {
    display: none !important;
}

.combined-tool-settings-heading {
    font-size: 0.8rem;
    font-weight: 600;
    color: #816225;
    margin-bottom: 0.4rem;
}

.combined-samaa-settings-table {
    font-size: 0.75rem;
    margin-bottom: 0;
    background: #fff;
}

.combined-samaa-settings-table th,
.combined-samaa-settings-table td {
    padding: 0.3rem 0.25rem;
    vertical-align: middle;
    text-align: center;
}

.combined-samaa-settings-table .form-control-sm {
    padding: 0.15rem 0.25rem;
    height: auto;
    font-size: 0.75rem;
    min-width: 0;
}

.combined-check-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: #4b3000;
    cursor: pointer;
    margin: 0;
    white-space: nowrap;
}

.combined-check-label input {
    margin: 0;
    flex-shrink: 0;
}

.combined-izhhar-reveal {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

body.samaa-repeat-session-locked #combinedModeTooltip,
body.izhhar-session-locked #combinedModeTooltip,
body.sajjal-session-locked #combinedModeTooltip,
body.combined-session-locked #combinedModeTooltip {
    pointer-events: auto;
}

/* Keep settings interactive inside Combined switcher during tool locks */
body.combined-session-locked #combinedModeTooltip .combined-tool-settings,
body.combined-session-locked #combinedModeTooltip .combined-tool-settings select,
body.combined-session-locked #combinedModeTooltip .combined-tool-settings input,
body.combined-session-locked #combinedModeTooltip .combined-tool-settings label {
    pointer-events: auto;
    opacity: 1;
}

/* Combined Tools: hide session tooltip/panel close — only switcher close ends the session */
body.combined-session-locked #samaaRepeatTooltipClose,
body.combined-session-locked #izhharTooltipClose,
body.combined-session-locked #sajjalSessionClose,
body.combined-session-locked #samaaRepeatEndSession,
body.combined-session-locked #izhharEndSession,
body.combined-session-locked #sajjalEndSession {
    display: none !important;
}

/* Keep Combined Tools end control reachable while an inner tool session is locked */
body.samaa-repeat-session-locked #headingCombined .qe-learn-session-end-btn,
body.izhhar-session-locked #headingCombined .qe-learn-session-end-btn,
body.sajjal-session-locked #headingCombined .qe-learn-session-end-btn {
    pointer-events: auto;
    opacity: 1;
}

body.combined-session-locked #collapseCombined .js-combined-mode-radio,
body.combined-session-locked #collapseCombined .js-combined-mode-select,
body.combined-session-locked #combinedStart {
    pointer-events: none;
    opacity: 0.55;
}

.qe-learn-root.qe-lang-en #combinedModeTooltip {
    direction: ltr;
    text-align: left;
    /* Close sits on the right in EN */
    padding: 0.65rem 2.35rem 0.75rem 0.75rem !important;
}

.qe-learn-root.qe-lang-en #combinedModeTooltip .samaa-repeat-tooltip-close {
    left: auto;
    right: 6px;
}


/* ---- Al-Raba / quarter picker (Learn filters) ---- */
body.qe-learn-rub-modal-open {
    overflow: hidden;
}

.qe-learn-rub-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10050;
    direction: rtl;
}

.qe-learn-rub-modal.is-open {
    display: block;
}

.qe-learn-rub-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(40, 24, 0, 0.45);
}

.qe-learn-rub-modal__dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(920px, calc(100vw - 24px));
    max-height: min(86vh, 640px);
    background: #f7f1e4;
    border: 1px solid #c9b38a;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(40, 24, 0, 0.28);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.qe-learn-rub-modal__close {
    position: absolute;
    top: 6px;
    right: 8px;
    z-index: 2;
    border: 0;
    background: transparent;
    color: #5a3d12;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}

.qe-learn-rub-modal__body {
    display: flex;
    flex-direction: row;
    direction: ltr; /* physical: detail left, juz right */
    min-height: 0;
    flex: 1;
    overflow: hidden;
}

.qe-learn-rub-juz-list {
    flex: 0 0 118px;
    order: 2; /* right side */
    overflow-y: auto;
    background: #efe4cf;
    border-right: 0;
    border-left: 1px solid #d4c3a0;
    padding: 8px 0;
    direction: rtl;
}

.qe-learn-rub-juz-item {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    color: #4b3000;
    font-family: 'Vazirmatn', 'Amiri', serif;
    font-size: 0.95rem;
    padding: 0.55rem 0.75rem;
    text-align: center;
    cursor: pointer;
    border-bottom: 1px solid rgba(75, 48, 0, 0.08);
}

.qe-learn-rub-juz-item:hover {
    background: rgba(180, 140, 70, 0.18);
}

.qe-learn-rub-juz-item.is-selected {
    background: #c9a85a;
    color: #2d1c00;
    font-weight: 600;
}

.qe-learn-rub-detail {
    flex: 1 1 auto;
    order: 1; /* left side */
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fbf7ef;
    direction: rtl;
}

.qe-learn-rub-detail__title {
    padding: 0.65rem 1rem;
    text-align: center;
    font-family: 'Vazirmatn', 'Amiri', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #4b3000;
    border-bottom: 1px solid #d4c3a0;
    background: #f3ead8;
}

.qe-learn-rub-detail__content {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0;
}

.qe-learn-rub-empty {
    padding: 2rem;
    text-align: center;
    color: #7a6240;
}

.qe-learn-rub-table__head {
    display: grid;
    grid-template-columns: 64px 1fr 72px;
    gap: 0;
    background: #ebe0cb;
    border-bottom: 1px solid #d4c3a0;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #4b3000;
    position: sticky;
    top: 0;
    z-index: 1;
}

.qe-learn-rub-table__head .qe-learn-rub-col {
    padding: 0.45rem 0.5rem;
    text-align: center;
}

.qe-learn-rub-hazb-group {
    display: grid;
    grid-template-columns: 36px 1fr;
    border-bottom: 1px solid #d4c3a0;
}

.qe-learn-rub-hazb-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    background: #b8924a;
    color: #fff8e8;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
    border-left: 1px solid #a07c38;
}

.qe-learn-rub-hazb-rows {
    min-width: 0;
}

.qe-learn-rub-row {
    display: grid;
    grid-template-columns: 64px 1fr 72px;
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(75, 48, 0, 0.1);
    background: #fbf7ef;
    padding: 0;
    cursor: pointer;
    text-align: inherit;
    color: inherit;
    font: inherit;
}

.qe-learn-rub-row:last-child {
    border-bottom: 0;
}

.qe-learn-rub-row:hover {
    background: #f0e6d2;
}

.qe-learn-rub-row:focus {
    outline: 2px solid #c9a85a;
    outline-offset: -2px;
}

.qe-learn-rub-col {
    padding: 0.55rem 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qe-learn-rub-col--ruba {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    color: #4b3000;
    border-left: 1px solid rgba(75, 48, 0, 0.08);
}

.qe-learn-rub-col--start {
    justify-content: flex-start;
    gap: 0.35rem;
    direction: rtl;
    text-align: right;
    min-width: 0;
    border-left: 1px solid rgba(75, 48, 0, 0.08);
}

.qe-learn-rub-col--page {
    font-family: 'Vazirmatn', sans-serif;
    color: #5a3d12;
}

.qe-learn-rub-ayah-text {
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-size: 1.05rem;
    line-height: 1.55;
    color: #2a1a00;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-align: right;
    flex: 1 1 auto;
    min-width: 0;
}

.qe-learn-rub-ayah-num {
    flex: 0 0 auto;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 50%;
    border: 1.5px solid #8a6a2e;
    color: #4b3000;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

@media (max-width: 640px) {
    .qe-learn-rub-modal__dialog {
        width: calc(100vw - 12px);
        max-height: 90vh;
    }

    .qe-learn-rub-juz-list {
        flex-basis: 88px;
    }

    .qe-learn-rub-table__head,
    .qe-learn-rub-row {
        grid-template-columns: 44px 1fr 52px;
    }

    .qe-learn-rub-ayah-text {
        font-size: 0.95rem;
        -webkit-line-clamp: 3;
    }
}

/* English: LTR Al-Raba picker — juz list left, detail right; close stays on the right */
.qe-learn-root.qe-lang-en .qe-learn-rub-modal {
    direction: ltr;
}

.qe-learn-root.qe-lang-en .qe-learn-rub-modal__close {
    left: auto;
    right: 8px;
}

.qe-learn-root.qe-lang-en .qe-learn-rub-juz-list {
    order: 1;
    border-left: 0;
    border-right: 1px solid #d4c3a0;
    direction: ltr;
}

.qe-learn-root.qe-lang-en .qe-learn-rub-detail {
    order: 2;
    direction: ltr;
}

.qe-learn-root.qe-lang-en .qe-learn-rub-hazb-label {
    writing-mode: vertical-lr;
    transform: none;
    border-left: 0;
    border-right: 1px solid #a07c38;
}

.qe-learn-root.qe-lang-en .qe-learn-rub-ayah-text {
    text-align: right;
    direction: rtl;
}

/* ===== Study with Teacher / Assignments ===== */
.qe-asgn-mode {
    display: flex;
    gap: 1rem;
    margin: 0 0 0.75rem;
    align-items: center;
}

.qe-asgn-mode-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    cursor: pointer;
    font-weight: 600;
    color: #8a7340;
    line-height: 1.25;
}

.qe-asgn-mode-item input[type="radio"] {
    position: static;
    float: none;
    margin: 0;
    flex: 0 0 auto;
    width: 0.95rem;
    height: 0.95rem;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    border: 1.5px solid #b0a48c;
    border-radius: 50%;
    background: #fff;
    box-sizing: border-box;
}

.qe-asgn-mode-item input[type="radio"]:checked {
    border-color: #8a7340;
    background-color: #fff;
    background-image: radial-gradient(circle, #8a7340 0 42%, transparent 46%);
    background-repeat: no-repeat;
    background-position: center;
}

.qe-learn-root.qe-lang-ar .qe-asgn-mode {
    direction: rtl;
}

.qe-learn-root.qe-lang-en .qe-asgn-mode {
    direction: ltr;
}

.qe-asgn-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem 0.75rem;
    margin-bottom: 0.95rem;
    align-items: center;
}

.qe-asgn-filter-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.1rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    min-width: 0;
    font-weight: 500;
    color: #8a7340;
    line-height: 1.25;
}

.qe-asgn-filter-item:hover {
    color: #6d5a30;
}

.qe-asgn-filter-item input[type="checkbox"] {
    position: static;
    float: none;
    margin: 0;
    flex: 0 0 auto;
    width: 0.95rem;
    height: 0.95rem;
    align-self: center;
    vertical-align: middle;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    border: 1.5px solid #b0a48c;
    border-radius: 3px;
    background: #fff;
    box-sizing: border-box;
}

.qe-asgn-filter-item input[type="checkbox"]:checked {
    background-color: currentColor;
    border-color: currentColor;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M10.1 2.3L4.4 8.7 1.9 6.1 1 7l3.4 3.5L11 3.2z'/%3E%3C/svg%3E");
    background-size: 0.7rem 0.7rem;
    background-position: center;
    background-repeat: no-repeat;
}

/* Status colors — match assignment status indicators */
.qe-asgn-filter-item input[data-status="16"] { /* Due */
    border-color: #e89a4a;
    color: #e89a4a;
}
.qe-asgn-filter-item input[data-status="17"] { /* Late */
    border-color: #F06066;
    color: #F06066;
}
.qe-asgn-filter-item input[data-status="1"] { /* Not sent */
    border-color: #b0a48c;
    color: #b0a48c;
}
.qe-asgn-filter-item input[data-status="15"] { /* Accepted */
    border-color: #7CB342;
    color: #7CB342;
}
.qe-asgn-filter-item input[data-status="2"] { /* Submitted */
    border-color: #5a5348;
    color: #5a5348;
}
.qe-asgn-filter-item input[data-status="6"] { /* Corrected */
    border-color: #b0a48c;
    color: #b0a48c;
}
.qe-asgn-filter-item input[data-status="0"] { /* All */
    border-color: #64B5F6;
    color: #64B5F6;
}

.qe-asgn-filter-item span {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.25;
    display: flex;
    align-items: center;
}

.qe-asgn-filter-all {
    grid-column: auto;
}

.qe-learn-root.qe-lang-ar .qe-asgn-filters {
    direction: rtl;
}

.qe-learn-root.qe-lang-ar .qe-asgn-filter-item {
    flex-direction: row;
    direction: rtl;
    text-align: right;
}

.qe-learn-root.qe-lang-ar .qe-asgn-filter-item span {
    text-align: right;
}

.qe-learn-root.qe-lang-en .qe-asgn-filters {
    direction: ltr;
}

.qe-learn-root.qe-lang-en .qe-asgn-filter-item {
    flex-direction: row;
    direction: ltr;
    text-align: left;
    gap: 0.35rem;
}

.qe-learn-root.qe-lang-en .qe-asgn-filter-item span {
    text-align: left;
    font-size: 11px;
    line-height: 1.2;
}

.qe-asgn-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.qe-asgn-msg {
    text-align: center;
    font-size: 13px;
    color: #6c5f4f;
    padding: 0.85rem 0.5rem;
}

.qe-asgn-msg-error {
    color: #a94442;
}

.qe-asgn-card {
    border: 1px solid #e6d9c0;
    border-radius: 8px;
    background: #fff;
    padding: 0.7rem 0.75rem 0.75rem;
}

.qe-asgn-list .qe-asgn-card {
    cursor: pointer;
}

/* Pending / needs recording — match mobile light-red row */
.qe-asgn-card.qe-asgn-card-pending {
    background: #fdecec;
    border-color: #f0c4c4;
}

.qe-asgn-record-btn.qe-asgn-record-now-btn .fa-circle {
    color: #e53935;
    font-size: 0.75em;
}

.qe-asgn-record-btn.qe-asgn-show-corrections-btn {
    background-color: #43a047;
    border-color: #43a047;
}

.qe-asgn-record-btn.qe-asgn-show-corrections-btn:hover,
.qe-asgn-record-btn.qe-asgn-show-corrections-btn:focus {
    background-color: #388e3c;
    border-color: #388e3c;
}

/* Submitted, awaiting teacher — match mobile "Under Review" (blue) */
.qe-asgn-record-btn.qe-asgn-under-review-btn {
    background-color: #1976d2;
    border-color: #1976d2;
}

.qe-asgn-record-btn.qe-asgn-under-review-btn:hover,
.qe-asgn-record-btn.qe-asgn-under-review-btn:focus {
    background-color: #1565c0;
    border-color: #1565c0;
}

/* Corrections returned, IsMarked=false — must re-record */
.qe-asgn-record-btn.qe-asgn-record-again-btn {
    background-color: #c9892c;
    border-color: #c9892c;
}

.qe-asgn-record-btn.qe-asgn-record-again-btn:hover,
.qe-asgn-record-btn.qe-asgn-record-again-btn:focus {
    background-color: #b07824;
    border-color: #b07824;
}

/* Mirror English LTR card layout for Arabic RTL */
.qe-learn-root.qe-lang-ar .qe-asgn-card {
    direction: rtl;
    text-align: right;
}

.qe-learn-root.qe-lang-en .qe-asgn-card {
    direction: ltr;
    text-align: left;
}

.qe-asgn-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.qe-asgn-card-num {
    font-size: 12px;
    font-weight: 700;
    color: #816225;
}

.qe-asgn-card-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 11px;
    font-weight: 600;
    color: #5a5044;
}

.qe-asgn-card-status .fa-circle {
    font-size: 8px;
}

.qe-asgn-card-status.qe-asgn-status-new .fa-circle { color: #F06066; }
.qe-asgn-card-status.qe-asgn-status-warn .fa-circle { color: #c9892c; }
.qe-asgn-card-status.qe-asgn-status-ok .fa-circle { color: #43A047; }
.qe-asgn-card-status.qe-asgn-status-review .fa-circle { color: #1976d2; }

.qe-asgn-card-title {
    margin: 0 0 0.25rem;
    font-size: 14px;
    font-weight: 600;
    color: #383433;
    line-height: 1.35;
    word-break: break-word;
}

.qe-learn-root.qe-lang-ar .qe-asgn-card-title {
    text-align: right;
    direction: rtl;
}

.qe-learn-root.qe-lang-en .qe-asgn-card-title {
    text-align: left;
    direction: ltr;
}

.qe-asgn-card-type {
    font-size: 12px;
    color: #816225;
    margin-bottom: 0.35rem;
}

.qe-learn-root.qe-lang-ar .qe-asgn-card-type {
    text-align: right;
}

.qe-learn-root.qe-lang-en .qe-asgn-card-type {
    text-align: left;
}

.qe-asgn-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    font-size: 11px;
    color: #6c5f4f;
    margin-bottom: 0.55rem;
}

.qe-learn-root.qe-lang-ar .qe-asgn-card-meta {
    justify-content: flex-start; /* start = right in RTL card */
    text-align: right;
}

.qe-learn-root.qe-lang-en .qe-asgn-card-meta {
    justify-content: flex-start;
    text-align: left;
}

.qe-asgn-card-actions {
    display: flex;
    justify-content: flex-end; /* end = right in LTR, left in RTL — mirrors English */
    flex-wrap: wrap;
    gap: 0.35rem;
    overflow: visible;
}

.qe-asgn-record-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 12px;
    padding: 0.45rem 1.25rem !important;
    line-height: 1.25;
    white-space: nowrap;
    width: auto;
    max-width: none;
    min-width: max-content;
    flex-shrink: 0;
    overflow: visible;
    box-sizing: border-box;
}

.qe-asgn-record-btn span {
    white-space: nowrap;
    overflow: visible;
}

.qe-asgn-record-btn.qe-asgn-show-corrections-btn {
    padding-left: 1.35rem !important;
    padding-right: 1.35rem !important;
}

.qe-learn-root.qe-lang-en .qe-asgn-record-btn {
    font-size: 11px;
    padding: 0.45rem 1.15rem !important;
    gap: 0.4rem;
}

.qe-learn-root.qe-lang-en .qe-asgn-record-btn.qe-asgn-show-corrections-btn {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
}

.qe-asgn-bracket {
    position: absolute;
    z-index: 20;
    color: #d32f2f !important;
    font-weight: 800;
    font-size: 28px;
    line-height: 1;
    pointer-events: none;
    text-shadow: 0 0 2px #fff, 0 1px 2px rgba(0,0,0,0.25);
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.qe-asgn-bracket-start {
    transform: translate(-30%, -15%);
}

.qe-asgn-bracket-end {
    transform: translate(-20%, -10%);
}

.qe-ca-bracket {
    z-index: 80;
}

.qe-ca-bracket.qe-asgn-bracket-start {
    transform: translate(0, -15%);
}

body.qe-ca-recording .bottom-bar > .center-icons:not(.qe-ca-control-bar) {
    display: none !important;
}

#qeCaBarRecord.is-on .fa-circle {
    color: #c62828;
}

/* Hifz: solid covers above colored mushaf so tajweed colors cannot show through */
.qe-asgn-hifz-mask {
    position: absolute;
    z-index: 18;
    background: #000;
    pointer-events: none;
    box-sizing: border-box;
}

.asgn-control-bar-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 0;
    padding-top: 0.15rem;
    z-index: 10070;
}

.asgn-control-bar-wrap.d-none {
    display: none !important;
}

.asgn-control-bar-label {
    display: none !important;
}

#asgnControlBar.asgn-control-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
}

/* Inline waveform to the left of Record (visible only while recording) */
.asgn-inline-wave-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 36px;
    margin: 0 0.35rem;
    padding: 0 0.25rem;
    background: rgba(245, 240, 230, 0.95);
    border: 1px solid #e0c9a0;
    border-radius: 8px;
    overflow: hidden;
}

.asgn-inline-wave-wrap.d-none {
    display: none !important;
}

.asgn-inline-wave-canvas {
    display: block;
    width: 100%;
    height: 28px;
}

#asgnRecordBtn.is-recording .fa-stop {
    color: #c62828;
}

.asgn-bar-btn {
    border: 0;
    background: transparent;
    padding: 0.15rem 0.35rem;
    cursor: pointer;
    color: inherit;
}

.asgn-control-bar-wrap.asgn-play-only #asgnRecordBtn,
.asgn-control-bar-wrap.asgn-play-only #asgnUploadBtn {
    pointer-events: none;
}

.qe-asgn-record-btn.qe-asgn-play-only-btn .fa-microphone {
    display: none;
}

/* Correction highlight overlays (red selection) */
.qe-asgn-corr-hl {
    position: absolute;
    z-index: 22;
    background: rgba(229, 57, 53, 0.48) !important;
    border: 1.5px solid rgba(183, 28, 28, 0.95) !important;
    border-radius: 2px;
    pointer-events: auto;
    cursor: pointer;
    box-sizing: border-box;
}

.qe-asgn-corr-hl.is-active {
    background: rgba(229, 57, 53, 0.62) !important;
    border-color: rgba(153, 0, 0, 1) !important;
    box-shadow: 0 0 0 1px rgba(153, 0, 0, 0.4);
}

/* Point / end-of-phrase correction star (mobile [★]) */
.qe-asgn-corr-star-wrap {
    position: absolute;
    z-index: 23;
    display: inline-flex;
    align-items: center;
    gap: 1px;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
}

.qe-asgn-corr-star-bracket {
    color: #c62828;
    font-weight: 800;
    font-size: 18px;
    line-height: 1;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    text-shadow: 0 0 1px #fff;
}

.qe-asgn-corr-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1.5px solid #c62828;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.qe-asgn-corr-star .fa-star {
    color: #1565c0;
    font-size: 11px;
}

.qe-asgn-corr-star-wrap.is-active .qe-asgn-corr-star {
    border-color: #b71c1c;
    box-shadow: 0 0 0 1px rgba(183, 28, 28, 0.35);
}

.qe-asgn-corr-hl-bracket {
    position: absolute;
    z-index: 23;
    color: #c62828;
    font-weight: 800;
    font-size: 22px;
    line-height: 1;
    pointer-events: none;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    text-shadow: 0 0 2px #fff;
}

/* Teacher comment tooltip above active correction */
.asgn-corr-comment-tooltip {
    position: fixed;
    z-index: 10085;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    max-width: min(320px, calc(100vw - 1.5rem));
    padding: 0.45rem 0.65rem;
    background: #f7f0e4;
    border: 1px solid #c9a45c;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(56, 52, 51, 0.2);
    direction: rtl;
}

.asgn-corr-comment-tooltip.d-none {
    display: none !important;
}

.asgn-corr-tip-play {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #6b4f1d;
    color: #f5e6c8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.asgn-corr-tip-play:hover,
.asgn-corr-tip-play:focus {
    background: #5a4118;
    color: #fff;
}

.asgn-corr-tip-play:disabled {
    opacity: 0.45;
    cursor: default;
}

.asgn-corr-tip-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: #4a3b1f;
    line-height: 1.35;
    text-align: right;
}

.qe-learn-root.qe-lang-en .asgn-corr-comment-tooltip {
    direction: ltr;
}

.qe-learn-root.qe-lang-en .asgn-corr-tip-text {
    text-align: left;
    unicode-bidi: plaintext;
}

.asgn-corr-tip-arrow {
    position: absolute;
    left: 50%;
    bottom: -7px;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    background: #f7f0e4;
    border-right: 1px solid #c9a45c;
    border-bottom: 1px solid #c9a45c;
    transform: rotate(45deg);
}

.asgn-corr-comment-tooltip.is-below .asgn-corr-tip-arrow {
    top: -7px;
    bottom: auto;
    border-right: none;
    border-bottom: none;
    border-left: 1px solid #c9a45c;
    border-top: 1px solid #c9a45c;
}

/* Marks star rating near assignment end */
.asgn-marks-rating {
    position: absolute;
    z-index: 24;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0.2rem 0.55rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #d4b872;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    pointer-events: none;
}

.asgn-marks-rating .fa-star {
    font-size: 12px;
    color: #c5c0b6;
}

.asgn-marks-rating .fa-star.is-on {
    color: #e0a020;
}

/* Movable correction review panel */
.asgn-correction-panel {
    display: none;
    position: absolute;
    left: 50%;
    top: 4.5rem;
    transform: translateX(-50%);
    z-index: 10065;
    width: min(360px, calc(100% - 1.5rem));
    background: #6b5330;
    border: 1px solid #5a4526;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(40, 28, 12, 0.35);
    overflow: hidden;
    color: #fff;
    padding: 0.35rem 0.55rem 0.5rem;
}

.asgn-correction-panel.is-visible {
    display: block;
}

.asgn-correction-panel.is-dragging {
    opacity: 0.96;
    user-select: none;
}

.asgn-corr-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    direction: ltr;
    cursor: move;
    touch-action: none;
    padding: 0.15rem 0.2rem 0.35rem;
}

.asgn-corr-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.asgn-corr-close:hover {
    background: #c82333;
}

.asgn-corr-title {
    flex: 1 1 auto;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    color: #fff7e8;
    padding-right: 24px;
}

.asgn-corr-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.2rem 0.25rem 0.35rem;
}

.asgn-corr-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.asgn-corr-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.22);
}

.asgn-corr-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.asgn-corr-btn-main {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 18px;
}

.asgn-corr-btn-teacher {
    background: #e53935;
}

.asgn-corr-btn-teacher:hover:not(:disabled) {
    background: #c62828;
}

.asgn-corr-meta {
    text-align: center;
    font-size: 11px;
    color: rgba(255, 247, 232, 0.85);
    padding-bottom: 0.1rem;
}

body.asgn-correction-review:not(.asgn-correction-rerecord) #asgnControlBarWrap,
body.asgn-correction-review:not(.asgn-correction-rerecord) #asgnRecordingPanel {
    display: none !important;
}

body.asgn-correction-review #asgnCorrectionPanel,
body.asgn-correction-review #asgnCorrSessionClose,
body.asgn-correction-review .qe-asgn-corr-hl,
body.asgn-correction-review .qe-asgn-corr-star-wrap,
body.asgn-correction-review .qe-asgn-corr-hl-bracket,
body.asgn-correction-review .asgn-marks-rating,
body.asgn-correction-review .qe-asgn-bracket,
body.asgn-correction-review #asgnCorrCommentTooltip {
    pointer-events: auto !important;
    opacity: 1 !important;
}


.asgn-upload-progress {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    margin: 0;
    padding: 1.25rem;
    background: rgba(56, 52, 51, 0.42);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    pointer-events: auto;
}

.asgn-upload-progress.d-none {
    display: none !important;
}

.asgn-upload-progress-card {
    width: min(360px, calc(100vw - 2rem));
    padding: 1rem 1.15rem 1.05rem;
    background: #fff;
    border: 1px solid #d4b872;
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(56, 52, 51, 0.28);
}

body.asgn-upload-progress-open,
html.asgn-upload-progress-open {
    overflow: hidden !important;
}

.asgn-upload-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
    font-size: 0.92rem;
    color: #4a3b1f;
    font-weight: 700;
}

.asgn-upload-progress-track {
    height: 10px;
    border-radius: 999px;
    background: #efe4c8;
    overflow: hidden;
}

.asgn-upload-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #c9a45c 0%, #8b6914 100%);
    transition: width 0.18s ease-out;
}

.asgn-upload-progress.is-indeterminate .asgn-upload-progress-bar {
    width: 35% !important;
    animation: qe-asgn-upload-indeterminate 1.1s ease-in-out infinite;
}

.asgn-upload-progress-eta {
    margin-top: 0.4rem;
    font-size: 0.78rem;
    color: #6b5a32;
    min-height: 1em;
}

.qe-learn-root.qe-lang-ar .asgn-upload-progress-meta,
.qe-learn-root.qe-lang-ar .asgn-upload-progress-eta {
    direction: rtl;
    text-align: right;
}

@keyframes qe-asgn-upload-indeterminate {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}

#asgnRecordBtn.is-recording .fa-circle {
    animation: qe-asgn-pulse 1s ease-in-out infinite;
}

@keyframes qe-asgn-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.asgn-recording-panel {
    display: none !important;
}

.asgn-recording-panel.is-visible {
    display: block;
}

.asgn-recording-panel.is-dragging {
    opacity: 0.92;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

/* Close left + title right (forced LTR), same pattern as Record & Compare */
.asgn-panel-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin: 0;
    padding: 0.45rem 0.75rem 0.45rem 0.55rem;
    background: linear-gradient(180deg, #faf6ee 0%, #f3ead9 100%);
    border-bottom: 1px solid #e0c9a0;
    cursor: move;
    touch-action: none;
    direction: ltr;
}

#asgnRecordingPanel .samaa-repeat-tooltip-close.asgn-session-close-btn {
    position: static;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 2;
}

#asgnRecordingPanel .samaa-repeat-tooltip-close.asgn-session-close-btn:hover {
    background: #c82333;
    color: #fff;
}

.asgn-panel-header-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
    min-width: 0;
    flex: 1 1 auto;
    text-align: right;
}

.asgn-panel-title {
    font-size: 13px;
    font-weight: 700;
    color: #5c4819;
    line-height: 1.25;
    margin: 0;
}

.asgn-panel-live {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    margin-top: 0;
    font-size: 11px;
    line-height: 1.2;
    color: #816225;
}

.asgn-panel-live-label {
    opacity: 0.85;
}

.asgn-panel-live-value {
    font-weight: 700;
    color: #816225;
}

.asgn-panel-body {
    padding: 0.55rem 0.7rem 0.65rem;
}

.asgn-wave-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 0.15rem;
}

.qe-learn-root.qe-lang-ar .asgn-wave-header {
    justify-content: flex-start; /* start = right in RTL panel */
    direction: rtl;
}

.qe-learn-root.qe-lang-ar .asgn-wave-label {
    text-align: right;
}

.qe-learn-root.qe-lang-en .asgn-wave-header,
.qe-learn-root.qe-lang-en .asgn-panel-header-content {
    align-items: flex-start;
}

.qe-learn-root.qe-lang-en .asgn-panel-header-content {
    text-align: left;
}

.qe-learn-root.qe-lang-en .asgn-panel-live {
    flex-direction: row;
    justify-content: flex-start;
}

.qe-learn-root.qe-lang-en .asgn-wave-header {
    justify-content: flex-start;
}

.asgn-wave-label {
    font-size: 11px;
    font-weight: 600;
    color: #816225;
}

.asgn-wave-canvas {
    display: block;
    width: 100%;
    height: 48px;
    border-radius: 4px;
    background: #f5f0e6;
}

body.assignment-session-locked #asgnRecordingPanel,
body.assignment-session-locked #asgnSessionClose {
    pointer-events: auto !important;
    opacity: 1 !important;
}

.asgn-help-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.55rem);
    transform: translateX(-50%);
    z-index: 10075;
    width: min(520px, calc(100vw - 1.25rem));
    background: #fff;
    border: 1.5px solid #c9a45c;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(56, 52, 51, 0.2);
    padding: 0.85rem 0.75rem 0.55rem;
    /* Overlay only — does not reflow the control bar */
    pointer-events: auto;
}

.asgn-help-tooltip.d-none {
    display: none !important;
}

.asgn-help-close {
    position: absolute;
    top: -0.55rem;
    inset-inline-end: -0.35rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 0;
    background: #dc3545;
    color: #fff;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.asgn-help-close:hover {
    background: #c82333;
    color: #fff;
}

.asgn-help-cols {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.35rem;
    text-align: center;
}

.asgn-help-col {
    padding: 0.2rem 0.35rem;
    font-size: 12px;
    line-height: 1.35;
    color: #383433;
}

.asgn-help-play {
    border-inline-start: 1px solid #ddd;
    border-inline-end: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.asgn-help-line {
    font-weight: 500;
}

.asgn-help-warn {
    color: #d32f2f;
}

.asgn-help-ok {
    color: #2e7d32;
}

.asgn-help-emoji {
    font-size: 18px;
    margin: 0.15rem 0;
}

/* Non-layout SVG lines from help columns → buttons (drawn in JS) */
#asgnHelpLines {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10074;
    pointer-events: none;
    overflow: visible;
}

#asgnHelpLines.d-none {
    display: none !important;
}

#asgnHelpLines .asgn-help-line-path {
    fill: none;
    stroke: #c9a45c;
    stroke-width: 2;
    stroke-linecap: round;
}

#asgnHelpLines .asgn-help-line-head {
    fill: #c9a45c;
}

/* Assignment session lock */
body.assignment-session-locked #asgnControlBar,
body.assignment-session-locked #asgnControlBarWrap,
body.assignment-session-locked #asgnRecordingPanel,
body.assignment-session-locked #asgnCorrectionPanel,
body.assignment-session-locked #asgnHelpTooltip,
body.assignment-session-locked #asgnUploadProgress {
    pointer-events: auto;
}

body.assignment-session-locked .bottom-bar > .center-icons:not(.asgn-control-bar) {
    display: none !important;
}

/* Correct Assignment: keep normal mushaf play controls usable during the lock. */
body.assignment-session-locked.asgn-correct-play .bottom-bar > .center-icons:not(.asgn-control-bar):not(.sajjal-control-bar) {
    display: flex !important;
    pointer-events: auto !important;
    opacity: 1 !important;
}

body.assignment-session-locked.asgn-correct-play .bottom-bar > .center-icons:not(.asgn-control-bar):not(.sajjal-control-bar) * {
    pointer-events: auto !important;
    opacity: 1 !important;
}

body.assignment-session-locked.asgn-correct-play #asgnControlBar,
body.assignment-session-locked.asgn-correct-play #asgnControlBarWrap,
body.assignment-session-locked.asgn-correct-play #asgnRecordingPanel {
    display: none !important;
}

body.assignment-session-locked #sidebar-tabs .card-header .btn-link:not([data-target="#collapseO12"]):not([data-target="#collapseO16"]):not(.qe-asgn-tool-action) {
    pointer-events: none;
    opacity: 0.55;
}

/* Keep Assignments + assignment-linked tools clickable during a session. */
body.assignment-session-locked #headingO12 .btn-link,
body.assignment-session-locked #headingO16 .btn-link,
body.assignment-session-locked #sidebar-tabs .card:not(.disabledcard) .qe-asgn-tool-action {
    pointer-events: auto !important;
    opacity: 1;
}

body.assignment-session-locked #aNextPage,
body.assignment-session-locked #aPreviousPage,
body.assignment-session-locked .bottom-bar .sideicon,
body.assignment-session-locked .bottom-bar .pgDivSelect,
body.assignment-session-locked .bottom-bar .pgDivSelectEven,
body.assignment-session-locked .bottom-bar .pageListVal,
body.assignment-session-locked .bottom-bar .pageListValEven,
body.assignment-session-locked .bottom-bar .pgWraper,
body.assignment-session-locked .bottom-bar .pgWraperEven,
body.assignment-session-locked .qe-mushaf-col .heading select,
body.assignment-session-locked .qe-mushaf-col .form-row.mx-0 input,
body.assignment-session-locked .qe-mushaf-col .form-row.mx-0 select,
body.assignment-session-locked #page_mapEven area,
body.assignment-session-locked #page_mapOdd area,
body.assignment-session-locked .imgarea canvas,
body.assignment-session-locked .imgarea [id^="mapster_wrap"] {
    pointer-events: none !important;
    opacity: 0.55;
    cursor: default;
}

/* Keep mushaf image visible (opacity only dimmed on controls above; restore image wrap) */
body.assignment-session-locked .imgarea,
body.assignment-session-locked .imgarea img,
body.assignment-session-locked .imgarea canvas,
body.assignment-session-locked .imgarea [id^="mapster_wrap"] {
    opacity: 1 !important;
}

body.assignment-session-locked .bottom-bar .pgWraper,
body.assignment-session-locked .bottom-bar .pgWraperEven {
    display: none !important;
}

body.assignment-session-locked #profile-tab,
body.assignment-session-locked #headingO12 .btn-link,
body.assignment-session-locked #headingO16 .btn-link,
body.assignment-session-locked #asgnSessionClose,
body.assignment-session-locked #asgnCorrectEndSession,
body.assignment-session-locked #asgnHelpTooltipClose,
body.assignment-session-locked #asgnHelpTooltipDismiss {
    pointer-events: auto !important;
    opacity: 1;
}

body.assignment-session-locked #asgnHelpTooltipDismiss {
    pointer-events: auto !important;
    opacity: 1;
    background: #dc3545 !important;
    color: #fff !important;
}

body.assignment-session-locked .bottom-bar {
    overflow: visible;
}

body.assignment-session-locked #asgnControlBarWrap {
    overflow: visible;
}

body.assignment-session-locked .qe-mushaf-col {
    position: relative;
}


/* Assignment mode modal — Recitation / Memorization (matches Learn chrome popups) */
#asgnModeModal .modal-dialog {
    max-width: 420px;
}

#asgnModeModal.qe-learn-chrome-modal .modal-header {
    justify-content: space-between !important;
}

#asgnModeModal .asgn-mode-heading {
    order: 2 !important;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin: 0;
    padding: 0;
    text-align: right !important;
}

.qe-learn-root.qe-lang-en #asgnModeModal .asgn-mode-heading {
    order: 1 !important;
    align-items: flex-start;
    text-align: left !important;
}

#asgnModeModal .modal-header .close,
#asgnModeModal.popup .modal-header .close,
.qe-learn-root #asgnModeModal .modal-header .close,
.qe-learn-root.qe-lang-en #asgnModeModal.popup .modal-header .close,
.qe-learn-root.qe-lang-ar #asgnModeModal.popup .modal-header .close {
    order: 1 !important;
}

/* English: title left, close right (same as Tajweed / other Learn chrome popups) */
.qe-learn-root.qe-lang-en #asgnModeModal .modal-header .close,
.qe-learn-root.qe-lang-en #asgnModeModal.popup .modal-header .close {
    order: 2 !important;
    margin-left: auto !important;
}

#asgnModeModal .modal-header .modal-title,
#asgnModeModal.popup .modal-header .modal-title,
.qe-learn-root #asgnModeModal .modal-header .modal-title,
.qe-learn-root.qe-lang-en #asgnModeModal.popup .modal-header .modal-title,
.qe-learn-root.qe-lang-ar #asgnModeModal.popup .modal-header .modal-title {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    float: none !important;
    order: unset !important;
    color: #fff !important;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 20px;
    text-align: right !important;
}

.qe-learn-root.qe-lang-en #asgnModeModal .modal-header .modal-title,
.qe-learn-root.qe-lang-en #asgnModeModal.popup .modal-header .modal-title {
    text-align: left !important;
}

#asgnModeModal .modal-body {
    padding: 1rem 1.15rem 0.65rem;
    background: #fdfaf5 !important;
}

#asgnModeModal .asgn-mode-prompt {
    margin: 0 0 0.85rem;
    font-size: 14px;
    font-weight: 500;
    color: #383433;
    line-height: 1.5;
}

.qe-learn-root.qe-lang-ar #asgnModeModal .asgn-mode-prompt {
    text-align: right;
}

.qe-learn-root.qe-lang-en #asgnModeModal .asgn-mode-prompt {
    text-align: left;
}

#asgnModeModal .asgn-mode-options {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

#asgnModeModal .asgn-mode-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    padding: 0.65rem 0.8rem;
    border: 1px solid #e0c9a0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-weight: 500;
    color: #383433;
    line-height: 1.35;
    box-shadow: 0 1px 0 rgba(139, 105, 20, 0.06);
}

#asgnModeModal .asgn-mode-option:hover {
    border-color: #c9a45c;
    background: #fffdf8;
}

#asgnModeModal .asgn-mode-option input[type="radio"] {
    position: static;
    float: none;
    margin: 0;
    flex: 0 0 auto;
    width: 1.05rem;
    height: 1.05rem;
    cursor: pointer;
    accent-color: #8b6914;
}

#asgnModeModal .asgn-mode-option-text {
    flex: 1 1 auto;
    min-width: 0;
}

.qe-learn-root.qe-lang-ar #asgnModeModal .asgn-mode-option {
    flex-direction: row;
    direction: rtl;
    text-align: right;
}

.qe-learn-root.qe-lang-en #asgnModeModal .asgn-mode-option {
    flex-direction: row;
    direction: ltr;
    text-align: left;
}

#asgnModeModal .modal-footer {
    display: flex;
    justify-content: flex-end;
    border-top: 0;
    padding: 0.35rem 1.15rem 1rem;
    background: #fdfaf5;
}

.qe-learn-root.qe-lang-ar #asgnModeModal .modal-footer {
    justify-content: flex-start;
}

#asgnModeModal .modal-footer .btn-primary {
    min-width: 110px;
    border: 0;
    border-radius: 8px;
    padding: 0.55rem 1.1rem;
    background: linear-gradient(180deg, #f0dfb8 0%, #d4b46a 55%, #c9a45c 100%);
    color: #1a1a1a;
    font-weight: 700;
    box-shadow: 0 2px 0 rgba(139, 105, 20, 0.25);
}

#asgnModeModal .modal-footer .btn-primary:hover,
#asgnModeModal .modal-footer .btn-primary:focus {
    filter: brightness(1.03);
    color: #1a1a1a;
    background: linear-gradient(180deg, #f0dfb8 0%, #d4b46a 55%, #c9a45c 100%);
    border: 0;
}

/* Assignment upload preferences (first upload) */
#asgnUploadPrefsModal .modal-dialog {
    max-width: 420px;
}

#asgnUploadPrefsModal .asgn-upload-prefs-content {
    border: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(56, 52, 51, 0.28);
}

#asgnUploadPrefsModal .asgn-upload-prefs-header {
    display: flex !important;
    flex-direction: row !important;
    direction: ltr !important;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    margin: 0;
    padding: 8px 16px;
    border-bottom: 1px solid #e0c9a0;
    background: linear-gradient(180deg, #faf6ee 0%, #f0e4cc 100%);
}

#asgnUploadPrefsModal .asgn-upload-prefs-header .modal-title {
    flex: 1 1 auto;
    margin: 0 !important;
    order: 1 !important;
    text-align: right !important;
    color: #383433;
    font-size: 1.05rem;
    font-weight: 700;
}

.qe-learn-root.qe-lang-en #asgnUploadPrefsModal .asgn-upload-prefs-header .modal-title {
    text-align: left !important;
}

#asgnUploadPrefsModal .asgn-upload-prefs-close,
#asgnUploadPrefsModal.popup .modal-header .close {
    float: none !important;
    order: 0 !important;
    position: static !important;
    width: 28px;
    height: 28px;
    margin: 0 !important;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: #8b6914;
    color: #fff !important;
    opacity: 1;
    font-size: 1.25rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

#asgnUploadPrefsModal .asgn-upload-prefs-close:hover {
    background: #6f5410;
    color: #fff !important;
    opacity: 1;
}

#asgnUploadPrefsModal .asgn-upload-prefs-body {
    padding: 1rem 1.1rem 1.15rem;
    background: #fff;
}

#asgnUploadPrefsModal .asgn-upload-prefs-label {
    margin: 0 0 0.45rem;
    font-size: 14px;
    font-weight: 500;
    color: #222;
    line-height: 1.4;
}

.qe-learn-root.qe-lang-ar #asgnUploadPrefsModal .asgn-upload-prefs-label {
    text-align: right;
}

.qe-learn-root.qe-lang-en #asgnUploadPrefsModal .asgn-upload-prefs-label {
    text-align: left;
}

#asgnUploadPrefsModal .asgn-upload-prefs-group {
    border: 1px solid #6b6b6b;
    border-radius: 4px;
    margin: 0 0 1rem;
    overflow: hidden;
    background: #fff;
}

#asgnUploadPrefsModal .asgn-upload-prefs-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    padding: 0.7rem 0.75rem;
    cursor: pointer;
    font-weight: 500;
    color: #222;
    border-bottom: 1px solid #ddd;
}

#asgnUploadPrefsModal .asgn-upload-prefs-option:last-child {
    border-bottom: 0;
}

#asgnUploadPrefsModal .asgn-upload-prefs-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

#asgnUploadPrefsModal .asgn-upload-prefs-check {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border: 2px solid #bdbdbd;
    border-radius: 50%;
    background: #fff;
    position: relative;
}

#asgnUploadPrefsModal .asgn-upload-prefs-option input:checked + .asgn-upload-prefs-check {
    border-color: #1e88e5;
    background: #1e88e5;
}

#asgnUploadPrefsModal .asgn-upload-prefs-option input:checked + .asgn-upload-prefs-check::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

#asgnUploadPrefsModal .asgn-upload-prefs-option input:checked ~ .asgn-upload-prefs-option-text {
    font-weight: 700;
}

#asgnUploadPrefsModal .asgn-upload-prefs-option-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    line-height: 1.35;
}

.qe-learn-root.qe-lang-ar #asgnUploadPrefsModal .asgn-upload-prefs-option {
    flex-direction: row;
    direction: rtl;
    text-align: right;
}

.qe-learn-root.qe-lang-en #asgnUploadPrefsModal .asgn-upload-prefs-option {
    flex-direction: row;
    direction: ltr;
    text-align: left;
}

#asgnUploadPrefsModal .asgn-upload-prefs-select-wrap {
    margin: 0 0 1.15rem;
}

#asgnUploadPrefsModal .asgn-upload-prefs-select {
    display: block;
    width: 100%;
    height: 42px;
    padding: 0.45rem 2.25rem 0.45rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f7f1e6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='9' fill='none' stroke='%239e9e9e' stroke-width='1.5'/%3E%3Cpath d='M6 8.5 L10 12.5 L14 8.5' fill='none' stroke='%23666' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left 0.65rem center;
    background-size: 18px 18px;
    color: #222;
    font-size: 14px;
    font-weight: 600;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.qe-learn-root.qe-lang-ar #asgnUploadPrefsModal .asgn-upload-prefs-select {
    padding: 0.45rem 0.75rem 0.45rem 2.25rem;
    background-position: left 0.65rem center;
    text-align: right;
    direction: rtl;
}

.qe-learn-root.qe-lang-en #asgnUploadPrefsModal .asgn-upload-prefs-select {
    text-align: left;
    direction: ltr;
}

#asgnUploadPrefsModal .asgn-upload-prefs-submit {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, #f0dfb8 0%, #d4b46a 55%, #c9a45c 100%);
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 2px 0 rgba(139, 105, 20, 0.25);
}

#asgnUploadPrefsModal .asgn-upload-prefs-submit:hover {
    filter: brightness(1.03);
}

#asgnUploadPrefsModal .asgn-upload-prefs-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ---------- Assignment tools: Correct list + Teacher Feedback ---------- */

.qe-asgn-tool-card[data-asgn-tool="record-send"] .angleimg,
.qe-asgn-tool-card[data-asgn-tool="review"] .angleimg {
    visibility: hidden;
}

.qe-asgn-correct-body {
    padding: 0.5rem 0.35rem !important;
    text-align: start !important;
}

.qe-asgn-correct-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: 420px;
    overflow-y: auto;
}

.qe-asgn-correct-list .qe-asgn-card {
    margin: 0;
}

.qe-asgn-correct-list .qe-asgn-correct-card-item.is-selected {
    border-color: #c0392b;
    box-shadow: inset 3px 0 0 #c0392b;
}

.qe-learn-root.qe-lang-ar .qe-asgn-correct-list .qe-asgn-correct-card-item.is-selected {
    box-shadow: inset -3px 0 0 #c0392b;
}

.qe-asgn-record-btn.qe-asgn-proceed-btn {
    background: #2e7d32;
    border-color: #2e7d32;
}

.qe-asgn-record-btn.qe-asgn-proceed-btn:hover,
.qe-asgn-record-btn.qe-asgn-proceed-btn:focus {
    background: #256628;
    border-color: #256628;
}

/* Shared Learn chrome (Tajweed-style) for Teacher Feedback + Online Meeting */
.qe-learn-chrome-modal .modal-content,
#asgnTeacherFeedbackModal .asgn-feedback-content,
#onlineMeetingMaintModal .online-meeting-maint-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background: #fff;
}

.qe-learn-chrome-modal .modal-header,
#asgnTeacherFeedbackModal .asgn-feedback-header,
#onlineMeetingMaintModal .online-meeting-maint-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    direction: ltr !important;
    margin: 0 !important;
    padding: 8px 16px !important;
    border-bottom: none !important;
    background-color: #1e1007 !important;
    background-image: linear-gradient(172deg, #1e1007 0%, #5c3317 100%) !important;
    position: relative;
}

.qe-learn-chrome-modal .modal-header .close,
#asgnTeacherFeedbackModal .asgn-feedback-close,
#asgnTeacherFeedbackModal.popup .modal-header .close,
#onlineMeetingMaintModal .online-meeting-maint-close,
#onlineMeetingMaintModal.popup .modal-header .close,
.qe-learn-root #asgnTeacherFeedbackModal .asgn-feedback-close,
.qe-learn-root.qe-lang-en #asgnTeacherFeedbackModal.popup .modal-header .close,
.qe-learn-root.qe-lang-ar #asgnTeacherFeedbackModal.popup .modal-header .close,
.qe-learn-root.qe-lang-en #onlineMeetingMaintModal.popup .modal-header .close,
.qe-learn-root.qe-lang-ar #onlineMeetingMaintModal.popup .modal-header .close {
    order: 1 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: static !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    opacity: 1 !important;
    color: #fff !important;
    text-shadow: none;
    background: rgba(255, 255, 255, 0.12) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer;
    flex: 0 0 auto;
}

.qe-learn-chrome-modal .modal-header .close:hover,
.qe-learn-chrome-modal .modal-header .close:focus,
#asgnTeacherFeedbackModal .asgn-feedback-close:hover,
#asgnTeacherFeedbackModal .asgn-feedback-close:focus,
#onlineMeetingMaintModal .online-meeting-maint-close:hover,
#onlineMeetingMaintModal .online-meeting-maint-close:focus {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.22) !important;
    color: #fff !important;
    outline: none;
}

.qe-learn-chrome-modal .qe-learn-modal-close-icon {
    display: block;
    width: 15px;
    height: 15px;
}

#asgnTeacherFeedbackModal .asgn-feedback-heading,
#onlineMeetingMaintModal .online-meeting-maint-heading {
    order: 2 !important;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin: 0;
    padding: 0;
    text-align: right !important;
}

.qe-learn-root.qe-lang-en #asgnTeacherFeedbackModal .asgn-feedback-heading,
.qe-learn-root.qe-lang-en #onlineMeetingMaintModal .online-meeting-maint-heading {
    align-items: flex-start;
    text-align: left !important;
}

#asgnTeacherFeedbackModal .asgn-feedback-header .modal-title,
#asgnTeacherFeedbackModal.popup .modal-header .modal-title,
#onlineMeetingMaintModal .online-meeting-maint-header .modal-title,
#onlineMeetingMaintModal.popup .modal-header .modal-title,
.qe-learn-root #asgnTeacherFeedbackModal .asgn-feedback-header .modal-title,
.qe-learn-root.qe-lang-en #asgnTeacherFeedbackModal.popup .modal-header .modal-title,
.qe-learn-root.qe-lang-ar #asgnTeacherFeedbackModal.popup .modal-header .modal-title,
.qe-learn-root.qe-lang-en #onlineMeetingMaintModal.popup .modal-header .modal-title,
.qe-learn-root.qe-lang-ar #onlineMeetingMaintModal.popup .modal-header .modal-title {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    float: none !important;
    order: unset !important;
    color: #fff !important;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 20px;
    text-align: right !important;
}

.qe-learn-root.qe-lang-en #asgnTeacherFeedbackModal .asgn-feedback-header .modal-title,
.qe-learn-root.qe-lang-en #onlineMeetingMaintModal .online-meeting-maint-header .modal-title,
.qe-learn-root.qe-lang-en #asgnTeacherFeedbackModal.popup .modal-header .modal-title,
.qe-learn-root.qe-lang-en #onlineMeetingMaintModal.popup .modal-header .modal-title {
    text-align: left !important;
}

.qe-learn-chrome-modal .qe-learn-modal-gold-line {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, #c8922a 0%, #e5b55a 50%, #c8922a 100%);
}

#asgnTeacherFeedbackModal .asgn-feedback-body,
#onlineMeetingMaintModal .online-meeting-maint-body {
    padding: 1rem 1.1rem 1.15rem;
    background: #fdfaf5 !important;
}

#asgnTeacherFeedbackModal .asgn-feedback-table-wrap,
#asgnTeacherFeedbackModal .asgn-feedback-mistakes-wrap {
    overflow-x: auto;
    margin-bottom: 0.85rem;
    border: 1px solid #e8dcc0;
    border-radius: 8px;
    background: #fff;
}

#asgnTeacherFeedbackModal table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 0;
}

#asgnTeacherFeedbackModal th,
#asgnTeacherFeedbackModal td {
    border: 1px solid #efe4cc;
    padding: 0.55rem 0.4rem;
    text-align: center;
    vertical-align: middle;
    font-size: 0.92rem;
    color: #383433;
}

#asgnTeacherFeedbackModal .asgn-feedback-submissions thead th,
#asgnTeacherFeedbackModal .asgn-feedback-mistakes thead th {
    background: #f7f0e4;
    color: #383433;
    font-weight: 700;
}

#asgnTeacherFeedbackModal .asgn-feedback-audio-cell {
    white-space: nowrap;
}

#asgnTeacherFeedbackModal .asgn-feedback-play,
#asgnTeacherFeedbackModal .asgn-feedback-stop {
    border: 0;
    background: transparent;
    color: #2e7d32;
    font-size: 1.35rem;
    line-height: 1;
    padding: 0.1rem;
    margin: 0 0.1rem;
    cursor: pointer;
}

#asgnTeacherFeedbackModal .asgn-feedback-play.is-playing {
    color: #8b6914;
}

#asgnTeacherFeedbackModal .asgn-feedback-date {
    font-size: 0.78rem;
    color: #666;
    margin-top: 0.15rem;
}

#asgnTeacherFeedbackModal .asgn-feedback-check {
    width: 1.35rem;
    height: 1.35rem;
    border: 2px solid #c9a45c;
    border-radius: 3px;
    background: #fff;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

#asgnTeacherFeedbackModal .asgn-feedback-check.is-checked,
#asgnTeacherFeedbackModal .asgn-feedback-check.is-active {
    border-color: #8b6914;
    background: #8b6914;
}

#asgnTeacherFeedbackModal .asgn-feedback-check.is-active {
    box-shadow: 0 0 0 2px rgba(139, 105, 20, 0.28);
}

#asgnTeacherFeedbackModal .asgn-feedback-check:disabled {
    opacity: 0.55;
    cursor: default;
}

#asgnTeacherFeedbackModal .asgn-feedback-marks-row {
    display: flex;
    justify-content: flex-end;
    margin: 0.35rem 0 0.9rem;
}

#asgnTeacherFeedbackModal .asgn-feedback-marks-pill {
    display: inline-block;
    padding: 0.28rem 0.85rem;
    border-radius: 999px;
    border: 1px solid #d4b46a;
    background: #fff;
    color: #383433;
    font-weight: 700;
    font-size: 0.9rem;
}

#asgnTeacherFeedbackModal .asgn-feedback-actions {
    display: flex;
    gap: 0.65rem;
    justify-content: stretch;
}

#asgnTeacherFeedbackModal .asgn-feedback-btn {
    flex: 1 1 0;
    border: 0;
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    background: linear-gradient(180deg, #f0dfb8 0%, #d4b46a 55%, #c9a45c 100%);
    color: #1a1a1a;
    font-weight: 700;
}

#asgnTeacherFeedbackModal .asgn-feedback-btn:hover {
    filter: brightness(1.03);
}

#asgnTeacherFeedbackModal .asgn-feedback-marks-text {
    color: #1e6bb8;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
}

#asgnTeacherFeedbackModal .asgn-feedback-actions.asgn-feedback-actions-close-only {
    display: flex;
    justify-content: center;
}

#asgnTeacherFeedbackModal .asgn-feedback-actions.asgn-feedback-actions-close-only .asgn-feedback-btn {
    flex: 0 1 220px;
    max-width: 260px;
}

#asgnTeacherFeedbackModal .asgn-feedback-empty,
#asgnTeacherFeedbackModal .asgn-feedback-muted {
    color: #888;
}

/* Online Meeting — under-maintenance notification */
#onlineMeetingMaintModal .modal-dialog {
    max-width: 360px;
}

#onlineMeetingMaintModal .online-meeting-maint-body {
    text-align: center;
}

#onlineMeetingMaintModal .online-meeting-maint-msg {
    margin: 0.35rem 0 1.15rem;
    color: #2f2a22;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.55;
}

#onlineMeetingMaintModal .online-meeting-maint-ok {
    min-width: 7.5rem;
    padding: 0.45rem 1.4rem;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(180deg, #f0dfb8 0%, #d4b46a 55%, #c9a45c 100%);
    color: #1a1a1a;
    font-weight: 700;
}

#onlineMeetingMaintModal .online-meeting-maint-ok:hover,
#onlineMeetingMaintModal .online-meeting-maint-ok:focus {
    filter: brightness(1.03);
    color: #1a1a1a;
}

/* Assignment submit success popup */
#asgnSubmitSuccessModal .asgn-submit-success-content {
    border: 0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

#asgnSubmitSuccessModal .asgn-submit-success-body {
    position: relative;
    padding: 1.35rem 1.4rem 1.35rem;
    text-align: center;
    background: #fff;
}

#asgnSubmitSuccessModal .asgn-submit-success-icon {
    position: absolute;
    top: 0.85rem;
    width: 48px;
    height: 48px;
    line-height: 0;
}

.qe-learn-root.qe-lang-ar #asgnSubmitSuccessModal .asgn-submit-success-icon {
    right: 0.95rem;
    left: auto;
}

.qe-learn-root.qe-lang-en #asgnSubmitSuccessModal .asgn-submit-success-icon {
    left: 0.95rem;
    right: auto;
}

#asgnSubmitSuccessModal .asgn-submit-success-title {
    margin: 0.35rem 0 0.65rem;
    padding: 0 3.25rem;
    color: #5c3a28;
    font-size: 1.28rem;
    font-weight: 700;
    line-height: 1.45;
}

#asgnSubmitSuccessModal .asgn-submit-success-msg {
    margin: 0 0 1.25rem;
    color: #8a8a8a;
    font-size: 0.98rem;
    font-weight: 500;
    line-height: 1.55;
}

#asgnSubmitSuccessModal .asgn-submit-success-ok {
    min-width: 11rem;
    width: min(100%, 16rem);
    padding: 0.7rem 1.6rem;
    border: 0;
    border-radius: 999px;
    background: #5c4033;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
}

#asgnSubmitSuccessModal .asgn-submit-success-ok:hover,
#asgnSubmitSuccessModal .asgn-submit-success-ok:focus {
    background: #4a3329;
    color: #fff;
}

/* Meeting schedule calendar (مواعيد الاجتماعات) */
.qe-meeting-schedule-body {
    padding: 8px 6px 10px !important;
    text-align: center;
}

.qe-meeting-schedule {
    direction: ltr;
    text-align: left;
    font-family: 'Vazirmatn', sans-serif;
}

.qe-learn-root.qe-lang-ar .qe-meeting-schedule,
.qe-meeting-schedule.is-rtl {
    direction: rtl;
    text-align: right;
}

.qe-meeting-schedule .qe-ms-reload-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 6px;
    gap: 8px;
}

.qe-meeting-schedule .qe-ms-book-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 72px;
    padding: 4px 8px 5px;
    border: 1px solid #222;
    border-radius: 2px;
    background: #ececec;
    color: #222;
    font-size: 10px !important;
    font-weight: 700;
    line-height: 1.15;
    cursor: pointer;
}

.qe-meeting-schedule .qe-ms-book-btn img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.qe-meeting-schedule .qe-ms-book-btn:hover,
.qe-meeting-schedule .qe-ms-book-btn:focus {
    background: #f5f5f5;
    color: #111;
}

.qe-meeting-schedule .qe-ms-refresh {
    border: 0;
    background: transparent;
    color: #c9a227;
    width: 28px;
    height: 28px;
    padding: 0;
    line-height: 1;
    font-size: 16px;
    cursor: pointer;
}

.qe-meeting-schedule .qe-ms-refresh:hover,
.qe-meeting-schedule .qe-ms-refresh:focus {
    color: #8b6914;
}

.qe-meeting-schedule .qe-ms-refresh:disabled {
    opacity: 0.45;
    cursor: default;
}

.qe-meeting-schedule .qe-ms-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin: 0 0 8px;
    font-size: 10px;
    color: #4a4a4a;
}

.qe-meeting-schedule .qe-ms-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px !important;
    font-weight: 600;
}

.qe-meeting-schedule .qe-ms-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex: 0 0 10px;
}

.qe-meeting-schedule .qe-ms-swatch-availability { background: #43a047; }
.qe-meeting-schedule .qe-ms-swatch-booking { background: #8d6e4c; }
.qe-meeting-schedule .qe-ms-swatch-request { background: #f0c419; }

.qe-meeting-schedule .qe-ms-calendar {
    position: relative;
}

.qe-meeting-schedule .qe-ms-loader {
    position: absolute;
    z-index: 3;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.62);
}

.qe-meeting-schedule .qe-ms-loader[hidden] {
    display: none !important;
}

.qe-meeting-schedule .qe-ms-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(31, 78, 121, 0.18);
    border-top-color: #1f4e79;
    border-radius: 50%;
    animation: qe-ms-spin 0.75s linear infinite;
}

@keyframes qe-ms-spin {
    to { transform: rotate(360deg); }
}

.qe-meeting-schedule .qe-ms-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #1f4e79;
    color: #fff;
    border-radius: 2px;
    padding: 4px 6px;
    margin-bottom: 6px;
    direction: ltr;
}

.qe-meeting-schedule .qe-ms-title {
    flex: 1 1 auto;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.qe-meeting-schedule .qe-ms-nav {
    border: 0;
    background: transparent;
    color: #8ec8f0;
    width: 26px;
    height: 26px;
    padding: 0;
    line-height: 1;
    font-size: 20px;
    cursor: pointer;
}

.qe-meeting-schedule .qe-ms-nav:hover {
    color: #fff;
}

.qe-meeting-schedule .qe-ms-status {
    font-size: 11px;
    color: #5c4033;
    padding: 4px 2px 6px;
}

.qe-ms-join-error {
    margin: 0 14px 14px;
    padding: 8px 10px;
    color: #b71c1c;
    background: #fdecea;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.45;
    font-family: 'Vazirmatn', sans-serif;
}

.qe-meeting-schedule .qe-ms-grid,
.qe-meeting-schedule .qe-ms-weekdays,
.qe-meeting-schedule .qe-ms-days {
    direction: ltr;
}

.qe-learn-root.qe-lang-ar .qe-meeting-schedule .qe-ms-grid,
.qe-learn-root.qe-lang-ar .qe-meeting-schedule .qe-ms-weekdays,
.qe-learn-root.qe-lang-ar .qe-meeting-schedule .qe-ms-days,
.qe-meeting-schedule.is-rtl .qe-ms-grid,
.qe-meeting-schedule.is-rtl .qe-ms-weekdays,
.qe-meeting-schedule.is-rtl .qe-ms-days {
    direction: rtl;
}

.qe-meeting-schedule .qe-ms-weekdays,
.qe-meeting-schedule .qe-ms-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.qe-meeting-schedule .qe-ms-weekday {
    text-align: center;
    font-size: 10px !important;
    font-weight: 700;
    color: #1f4e79;
    padding: 3px 0;
}

.qe-meeting-schedule .qe-ms-weekday.is-today-col {
    background: #43a047;
    color: #fff;
    border-radius: 2px 2px 0 0;
}

.qe-meeting-schedule .qe-ms-cell {
    position: relative;
    display: block;
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 2px 1px 12px;
    border: 1px dashed #7ba3c9;
    border-radius: 0;
    background: #fff;
    color: #222;
    cursor: pointer;
    overflow: hidden;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.qe-meeting-schedule .qe-ms-cell.is-outside {
    background: #d9d9d9;
    color: #888;
    cursor: default;
}

.qe-meeting-schedule .qe-ms-cell.is-today .qe-ms-daynum {
    color: #d32f2f;
    font-weight: 800;
}

.qe-meeting-schedule .qe-ms-cell.is-selected {
    background: #eef6fb;
}

.qe-teacher-meeting-schedule .qe-ms-cell.is-past {
    opacity: 0.45;
}

.qe-meeting-schedule .qe-ms-daynum {
    display: block;
    font-size: 11px !important;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    padding-left: 2px;
}

.qe-meeting-schedule .qe-ms-lines {
    position: absolute;
    left: 2px;
    right: 2px;
    top: 14px;
    bottom: 10px;
}

.qe-meeting-schedule .qe-ms-line {
    position: absolute;
    left: 4%;
    right: 4%;
    height: 0;
    border-top-width: 2px;
    pointer-events: none;
}

.qe-meeting-schedule .qe-ms-line.is-dashed {
    border-top-style: dashed;
}

.qe-meeting-schedule .qe-ms-line.is-solid {
    border-top-style: solid;
    border-top-width: 4px;
}

.qe-meeting-schedule .qe-ms-line-booking,
.qe-meeting-schedule .qe-ms-line-conducted,
.qe-meeting-schedule .qe-ms-line-availability {
    border-top-color: #43a047;
}

.qe-meeting-schedule .qe-ms-line-request {
    border-top-color: #f0c419;
}

.qe-meeting-schedule .qe-ms-badges {
    position: absolute;
    left: 2px;
    bottom: 2px;
    display: flex;
    gap: 2px;
}

.qe-meeting-schedule .qe-ms-badge {
    position: static;
    min-width: 12px;
    height: 12px;
    padding: 0 2px;
    border-radius: 2px;
    font-size: 8px !important;
    line-height: 12px;
    font-weight: 800;
    color: #fff;
    text-align: center;
}

.qe-meeting-schedule .qe-ms-badge-booking {
    background: #8d6e4c;
}

.qe-meeting-schedule .qe-ms-badge-request {
    background: #f0c419;
    color: #5c4033;
    left: auto;
}

.qe-meeting-schedule .qe-ms-day-list {
    margin-top: 8px;
    text-align: left;
    border-top: 1px solid #e6dccf;
    padding-top: 6px;
}

.qe-meeting-schedule .qe-ms-day-list-title {
    font-size: 11px;
    font-weight: 700;
    color: #1f4e79;
    margin-bottom: 4px;
}

.qe-meeting-schedule .qe-ms-day-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 3px 0;
    border-bottom: 1px dotted #e6dccf;
}

.qe-meeting-schedule .qe-ms-join-call,
#qeMsSlotList .qe-ms-join-call {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #c8922a;
    cursor: pointer;
}

.qe-meeting-schedule .qe-ms-join-call:hover,
.qe-meeting-schedule .qe-ms-join-call:focus,
#qeMsSlotList .qe-ms-join-call:hover,
#qeMsSlotList .qe-ms-join-call:focus {
    color: #5c3317;
    outline: none;
}

.qe-meeting-schedule .qe-ms-join-call:disabled,
#qeMsSlotList .qe-ms-join-call:disabled {
    opacity: 0.5;
    cursor: default;
}

#qeMsSlotList .qe-ms-join-call {
    pointer-events: auto;
}

.qe-meeting-schedule .qe-ms-day-time {
    font-weight: 600;
    color: #333;
}

.qe-meeting-schedule .qe-ms-day-status {
    font-weight: 700;
}

.qe-meeting-schedule .qe-ms-day-row-booking .qe-ms-day-status,
.qe-meeting-schedule .qe-ms-day-row-conducted .qe-ms-day-status {
    color: #8d6e4c;
}

.qe-meeting-schedule .qe-ms-day-row-request .qe-ms-day-status {
    color: #c9a000;
}

.qe-meeting-schedule .qe-ms-day-row-cancel .qe-ms-day-status {
    color: #888;
    text-decoration: line-through;
}

.qe-learn-root.qe-lang-ar .qe-meeting-schedule .qe-ms-legend,
.qe-learn-root.qe-lang-ar .qe-meeting-schedule .qe-ms-day-list,
.qe-learn-root.qe-lang-ar .qe-meeting-schedule .qe-ms-daynum {
    text-align: right;
}

.qe-learn-root.qe-lang-ar .qe-meeting-schedule .qe-ms-daynum {
    padding-left: 0;
    padding-right: 2px;
}

.qe-learn-root.qe-lang-ar .qe-meeting-schedule .qe-ms-badges {
    left: auto;
    right: 2px;
}

/* Book Schedule popups */
.qe-ms-modal .qe-ms-modal-content {
    border: none;
    border-radius: 6px;
    overflow: hidden;
    background: #f4ead6;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.qe-ms-modal .qe-ms-modal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 12px;
    border-bottom: none;
    background: #c9ae7c;
    color: #3b2a14;
}

.qe-ms-modal .qe-ms-modal-header .modal-title {
    flex: 1 1 auto;
    margin: 0;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #3b2a14;
}

.qe-ms-modal .qe-ms-modal-info {
    color: #e6c84a;
    font-size: 22px;
    line-height: 1;
    text-shadow: 0 0 1px #5c4033;
}

.qe-ms-modal .qe-ms-modal-close {
    float: none;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 28px;
    opacity: 1;
    color: #4a3320;
    background: transparent;
    border: 0;
}

.qe-ms-modal .qe-ms-modal-header-spacer {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
}

.qe-ms-modal .qe-ms-modal-body {
    padding: 16px 18px 12px;
    color: #3b2a14;
}

.qe-ms-modal .qe-ms-msg-text {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.55;
    text-align: center;
}

.qe-ms-modal .qe-ms-msg-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qe-ms-modal .qe-ms-msg-btn {
    width: 100%;
    white-space: normal;
    padding: 10px 12px;
    border: 1px solid #b89a62;
    border-radius: 4px;
    background: #d8c197;
    color: #3b2a14;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.qe-ms-modal .qe-ms-msg-btn:hover,
.qe-ms-modal .qe-ms-msg-btn:focus {
    background: #c9ae7c;
    color: #2a1c0c;
}

.qe-ms-modal .qe-ms-radio-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.qe-ms-modal .qe-ms-field {
    margin-bottom: 12px;
}

.qe-ms-modal .qe-ms-field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    color: #6b4a24;
    font-size: 13px;
    font-weight: 700;
}

.qe-ms-modal .qe-ms-course-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
}

.qe-ms-modal .qe-ms-select,
.qe-ms-modal .qe-ms-input {
    width: 100%;
    height: 36px;
    padding: 4px 8px;
    border: 1px solid #cbb892;
    border-radius: 3px;
    background: #fff;
    color: #333;
    font-size: 13px;
}

.qe-ms-modal .qe-ms-course-refresh {
    width: 36px;
    flex: 0 0 36px;
    border: 0;
    border-radius: 3px;
    background: #c9ae7c;
    color: #fff;
    cursor: pointer;
}

.qe-ms-modal .qe-ms-course-refresh:hover {
    background: #b89a62;
}

.qe-ms-modal .qe-ms-or {
    margin: 8px 0 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    color: #5c4033;
}

.qe-ms-modal .qe-ms-book-status {
    margin: 4px 0 0;
    font-size: 12px;
    color: #5c4033;
}

.qe-ms-modal .qe-ms-book-status.is-error {
    color: #c62828;
}

.qe-ms-modal .qe-ms-modal-footer {
    display: flex;
    justify-content: stretch;
    gap: 10px;
    padding: 10px 16px 14px;
    border-top: none;
    background: #f4ead6;
}

.qe-ms-modal .qe-ms-footer-btn {
    flex: 1 1 50%;
    padding: 8px 12px;
    border: 1px solid #b89a62;
    border-radius: 4px;
    background: #d8c197;
    color: #3b2a14;
    font-weight: 700;
}

.qe-ms-modal .qe-ms-footer-btn:hover,
.qe-ms-modal .qe-ms-footer-btn:focus {
    background: #c9ae7c;
    color: #2a1c0c;
}

.qe-ms-modal.is-rtl .qe-ms-modal-body,
.qe-ms-modal.is-rtl .qe-ms-radio-row,
.qe-ms-modal.is-rtl .qe-ms-field-label {
    direction: rtl;
    text-align: right;
}

.qe-ms-modal.is-rtl .qe-ms-msg-text {
    text-align: right;
}

.qe-ms-slot-dialog {
    max-width: 340px;
}

.qe-ms-slot-content {
    background: #f3f3f3 !important;
}

.qe-ms-slot-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #ececec;
    border-bottom: 1px solid #cfd8dc;
}

.qe-ms-slot-time-label {
    min-width: 52px;
    padding: 4px 6px;
    background: #d7d7d7;
    color: #333;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.qe-ms-slot-date {
    flex: 1 1 auto;
    padding: 4px 8px;
    border: 1px solid #1f4e79;
    background: #fff;
    color: #1f4e79;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.qe-ms-slot-close {
    flex: 0 0 auto;
}

.qe-ms-slot-list {
    max-height: 70vh;
    overflow-y: auto;
    background: #f7f7f7;
}

.qe-ms-slot-row {
    display: flex;
    align-items: stretch;
    position: relative;
    min-height: 36px;
    height: 36px;
    overflow: visible;
}

.qe-ms-slot-gutter {
    width: 58px;
    flex: 0 0 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d9d9d9;
    color: #333;
    font-size: 11px;
    font-weight: 700;
    border-bottom: 1px solid #cfcfcf;
}

.qe-ms-slot-cell {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border: 1px dashed #7ba3c9;
    border-left: 0;
    background: #fff;
    pointer-events: none;
    cursor: default;
}

.qe-ms-slot-cell.is-empty {
    background: #fff;
}

.qe-ms-slot-cell.is-available {
    background: #c8e6c9;
}

.qe-ms-slot-cell.is-booking {
    background: #c4a574;
}

.qe-ms-slot-cell.is-request {
    background: #f0c419;
}

.qe-ms-slot-person {
    width: 22px;
    text-align: center;
    color: #111;
    font-size: 14px;
}

.qe-ms-slot-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.qe-ms-slot-name {
    font-size: 12px;
    font-weight: 700;
    color: #111;
}

.qe-ms-slot-course {
    font-size: 10px;
    font-weight: 600;
    color: #5c3317;
}

.qe-ms-slot-left {
    font-size: 10px;
    color: #333;
}

/* ===== Teacher Assignments (GetAssignments) ===== */
.qe-tasgn {
    color: #383433;
}

.qe-tasgn-toolbar {
    margin-bottom: 0.55rem;
}

.qe-tasgn-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.45rem 0.65rem;
    margin-bottom: 0.35rem;
}

.qe-learn-root.qe-lang-ar .qe-tasgn-filters {
    direction: rtl;
    flex-direction: row;
}

.qe-learn-root.qe-lang-en .qe-tasgn-filters {
    direction: ltr;
    flex-direction: row;
}

.qe-tasgn-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0;
    min-width: 0;
    flex: 1 1 120px;
    font-size: 12px;
    font-weight: 600;
    color: #816225;
}

.qe-learn-root.qe-lang-ar .qe-tasgn-field {
    text-align: right;
    align-items: stretch;
}

.qe-learn-root.qe-lang-en .qe-tasgn-field {
    text-align: left;
}

.qe-tasgn-field select {
    width: 100%;
    max-width: 100%;
    height: 30px;
    border: 1px solid #e6d9c0;
    border-radius: 6px;
    background: #fff;
    color: #383433;
    font-size: 12px;
    padding: 0 0.4rem;
}

.qe-learn-root.qe-lang-ar .qe-tasgn-field select {
    text-align: right;
    direction: rtl;
}

.qe-learn-root.qe-lang-en .qe-tasgn-field select {
    text-align: left;
    direction: ltr;
}

.qe-tasgn-icon-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #e6d9c0;
    border-radius: 6px;
    background: #fff;
    color: #816225;
    cursor: pointer;
}

.qe-tasgn-icon-btn:hover {
    background: #f7f1e4;
}

.qe-tasgn-pager {
    margin-bottom: 0.55rem;
    font-size: 12px;
    font-weight: 600;
    color: #816225;
}

.qe-tasgn-pager select {
    height: 26px;
    border: 1px solid #e6d9c0;
    border-radius: 6px;
    background: #fff;
    color: #383433;
}

.qe-tasgn-list {
    max-height: 420px;
    overflow-y: auto;
    padding: 0 0.1rem 0.2rem;
}

.qe-tasgn-card {
    cursor: pointer;
}

.qe-tasgn-card.is-selected {
    border-color: #c9b48a;
    box-shadow: inset 3px 0 0 #816225;
}

.qe-learn-root.qe-lang-ar .qe-tasgn-card.is-selected {
    box-shadow: inset -3px 0 0 #816225;
}

.qe-tasgn-card-detail {
    margin: 0.15rem 0 0.15rem;
    padding: 0.55rem 0.6rem 0.45rem;
    border: 1px solid #efe4cc;
    border-radius: 6px;
    background: #fdfaf4;
}

.qe-tasgn-dl-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.28rem 0;
    margin: 0;
}

.qe-tasgn-kv {
    display: grid;
    grid-template-columns: minmax(7.5rem, 38%) 1fr;
    align-items: baseline;
    gap: 0.45rem;
    min-width: 0;
}

.qe-tasgn-k {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    color: #816225;
}

.qe-tasgn-v {
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    color: #383433;
    word-break: break-word;
}

.qe-tasgn-actions-block {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px solid #efe4cc;
}

.qe-tasgn-row {
    position: absolute;
    z-index: 23;
    background: transparent;
    pointer-events: auto;
    cursor: text;
    user-select: none;
    touch-action: none;
}

.qe-tasgn-word {
    position: absolute;
    z-index: 24;
    box-sizing: border-box;
    border: 1px solid rgba(120, 120, 120, 0.55);
    background: transparent;
    pointer-events: none;
    cursor: text;
    user-select: none;
    touch-action: none;
}

.qe-tasgn-hl {
    position: absolute;
    z-index: 25;
    box-sizing: border-box;
    background: rgba(244, 143, 143, 0.48);
    border: 1.5px solid rgba(211, 47, 47, 0.88);
    border-radius: 2px;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    touch-action: none;
}

.qe-tasgn-hl.is-active-range {
    background: rgba(239, 83, 80, 0.58);
    border-color: #c62828;
}

.qe-tasgn-hl.is-live {
    pointer-events: none;
}

body.qe-tasgn-selecting {
    cursor: text;
    user-select: none;
}

.qe-tasgn-bracket {
    position: absolute;
    z-index: 26;
    display: inline-flex;
    align-items: center;
    gap: 1px;
    pointer-events: none;
    color: #d32f2f;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 0 2px #fff, 0 1px 2px rgba(0, 0, 0, 0.25);
}

.qe-tasgn-bracket-char {
    font-size: 26px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.qe-tasgn-bracket-star {
    pointer-events: auto;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 2px;
    border-radius: 50%;
    background: #d32f2f;
    color: #fff;
    font-size: 9px;
}

.qe-tasgn-bracket-star:hover,
.qe-tasgn-bracket-star:focus {
    background: #b71c1c;
}

.qe-tasgn-bracket-start {
    transform: translate(-10%, -25%);
}

.qe-tasgn-bracket-end {
    transform: translate(-70%, 10%);
}

.qe-tasgn-open-bar {
    position: fixed;
    left: 50%;
    bottom: 78px;
    transform: translateX(-50%);
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(70, 54, 28, 0.92);
    color: #fff;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.qe-tasgn-open-bar button {
    border: 0;
    border-radius: 999px;
    background: #c4a574;
    color: #fff;
    font-weight: 700;
    padding: 0.2rem 0.7rem;
    cursor: pointer;
}

body.qe-tasgn-open {
    user-select: none;
}

/* Block mushaf ayah / mapster clicks while an assignment is open. */
body.qe-tasgn-open #page_mapEven area,
body.qe-tasgn-open #page_mapOdd area,
body.qe-tasgn-open .imgarea canvas,
body.qe-tasgn-open .imgarea [id^="mapster_wrap"] {
    pointer-events: none !important;
    cursor: default !important;
}

body.qe-tasgn-open .imgarea,
body.qe-tasgn-open .imgarea img {
    cursor: default !important;
}

/* Marking mode: allow correction overlays to receive pointer events. */
body.qe-tasgn-open:not(.qe-tasgn-view-only) .qe-tasgn-word,
body.qe-tasgn-open:not(.qe-tasgn-view-only) .qe-tasgn-row,
body.qe-tasgn-open:not(.qe-tasgn-view-only) .qe-tasgn-hl,
body.qe-tasgn-open:not(.qe-tasgn-view-only) .qe-tasgn-bracket-star {
    pointer-events: auto !important;
}

body.qe-tasgn-view-only .qe-tasgn-word,
body.qe-tasgn-view-only .qe-tasgn-row,
body.qe-tasgn-view-only .qe-tasgn-hl {
    display: none !important;
    pointer-events: none !important;
}

body.qe-tasgn-view-only .qe-tasgn-bracket-star {
    display: none !important;
}

#qeTasgnCorrPanel,
#qeTasgnCorrPanel textarea,
#qeTasgnCorrPanel input {
    user-select: text;
    -webkit-user-select: text;
}

/* View Assignment: keep mushaf play/pause/stop only */
body.qe-tasgn-open .bottom-bar > .center-icons:not(.asgn-control-bar):not(.sajjal-control-bar):not(.asgn-review-control-bar) > .gradient-border:nth-child(1),
body.qe-tasgn-open .bottom-bar > .center-icons:not(.asgn-control-bar):not(.sajjal-control-bar):not(.asgn-review-control-bar) > .gradient-border:nth-child(2),
body.qe-tasgn-open .bottom-bar > .center-icons:not(.asgn-control-bar):not(.sajjal-control-bar):not(.asgn-review-control-bar) > .gradient-border:nth-child(6),
body.qe-tasgn-open .bottom-bar > .center-icons:not(.asgn-control-bar):not(.sajjal-control-bar):not(.asgn-review-control-bar) > .gradient-border:nth-child(7) {
    display: none !important;
}

body.qe-tasgn-open .bottom-bar > .center-icons:not(.asgn-control-bar):not(.sajjal-control-bar):not(.asgn-review-control-bar) {
    pointer-events: auto;
}

body.qe-tasgn-open #teacher-study .card-header .btn-link:not([data-target="#collapseT02"]):not(.qe-teacher-tool-action) {
    pointer-events: none;
    opacity: 0.55;
}

body.qe-tasgn-open #headingT02 .btn-link,
body.qe-tasgn-open #teacher-study .card:not(.disabledcard) .qe-teacher-tool-action {
    pointer-events: auto !important;
    opacity: 1;
}

#qeTasgnMushafTooltip.qe-tasgn-session-tooltip {
    cursor: grab;
    min-width: 220px;
    direction: rtl;
    text-align: right;
    padding: 0.75rem 0.75rem 0.75rem 2.25rem;
}

#qeTasgnMushafTooltip .samaa-repeat-tooltip-content,
#qeTasgnMushafTooltip .samaa-repeat-tooltip-title,
#qeTasgnMushafTooltip .samaa-repeat-tooltip-live {
    text-align: right;
    direction: rtl;
}

.qe-learn-root.qe-lang-en #qeTasgnMushafTooltip.qe-tasgn-session-tooltip {
    direction: ltr;
    text-align: left;
    padding: 0.75rem 2.25rem 0.75rem 0.75rem;
}

.qe-learn-root.qe-lang-en #qeTasgnMushafTooltip .samaa-repeat-tooltip-content,
.qe-learn-root.qe-lang-en #qeTasgnMushafTooltip .samaa-repeat-tooltip-title,
.qe-learn-root.qe-lang-en #qeTasgnMushafTooltip .samaa-repeat-tooltip-live {
    direction: ltr;
    text-align: left;
}

#qeTasgnMushafTooltip.qe-tasgn-session-tooltip.is-dragging {
    cursor: grabbing;
}

#qeTasgnMushafTooltip.qe-tasgn-session-tooltip.is-repositioned {
    position: fixed;
}

#qeTasgnMushafTooltip .samaa-repeat-tooltip-close {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 2;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    padding: 0;
    border: none;
}

.qe-learn-root.qe-lang-en #qeTasgnMushafTooltip .samaa-repeat-tooltip-close {
    left: auto;
    right: 6px;
}

#qeTasgnMushafTooltip .samaa-repeat-tooltip-close:hover {
    background: #c82333;
    color: #fff;
}

.qe-tasgn-corr-panel {
    position: fixed;
    left: 50%;
    bottom: 92px;
    transform: translateX(-50%);
    z-index: 1300;
    width: min(420px, calc(100vw - 1.5rem));
    padding: 0.65rem 0.75rem 0.55rem;
    border-radius: 12px;
    background: #efe4cc;
    box-shadow: 0 8px 28px rgba(56, 40, 16, 0.28);
    border: 1px solid #d9c7a3;
    overflow: visible;
}

.qe-tasgn-corr-panel.is-hidden {
    display: none;
}

.qe-tasgn-corr-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    margin-bottom: 0.45rem;
}

.qe-tasgn-corr-ico {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #5c4b2e;
    font-size: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qe-tasgn-corr-record {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: #e53935;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.4);
}

.qe-tasgn-corr-record.is-recording {
    background: #b71c1c;
}

.qe-tasgn-corr-play {
    color: #2e7d32;
    font-size: 20px;
}

.qe-tasgn-corr-words {
    display: block;
    width: 100%;
    min-height: 72px;
    resize: none;
    border: 1px solid #d7c7a5;
    border-radius: 6px;
    background: #fff;
    color: #383433;
    font-size: 13px;
    padding: 0.45rem 0.55rem;
    direction: rtl;
    text-align: right;
}

.qe-tasgn-corr-words[readonly] {
    background: #f6f1e6;
    color: #5c4b2e;
    cursor: default;
}

.qe-tasgn-corr-ref {
    display: none;
}

.qe-learn-root.qe-lang-en .qe-tasgn-corr-words {
    direction: ltr;
    text-align: left;
}

.qe-tasgn-corr-mid {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.45rem;
    margin-top: 0.4rem;
    position: relative;
}

.qe-tasgn-corr-add {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #43a047;
    color: #fff;
    cursor: pointer;
}

.qe-tasgn-comment-modal {
    position: fixed;
    inset: 0;
    z-index: 1450;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(40, 30, 16, 0.5);
    padding: 1rem;
}

.qe-tasgn-comment-dialog {
    width: min(520px, 100%);
    max-height: min(640px, calc(100vh - 2rem));
    display: flex;
    flex-direction: column;
    background: #fdfaf5;
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.qe-tasgn-comment-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    direction: ltr;
    gap: 0.75rem;
    margin: 0;
    padding: 16px 20px;
    background-color: #1e1007;
    background-image: linear-gradient(172deg, #1e1007 0%, #5c3317 100%);
    color: #fff;
}

.qe-tasgn-comment-tools {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    order: 1;
}

.qe-tasgn-comment-modal.is-rtl .qe-tasgn-comment-title {
    order: 2;
    margin-left: auto;
    text-align: right;
}

.qe-tasgn-comment-modal.is-ltr .qe-tasgn-comment-title {
    order: 1;
    margin-right: auto;
    text-align: left;
}

.qe-tasgn-comment-modal.is-ltr .qe-tasgn-comment-tools {
    order: 2;
}

.qe-tasgn-comment-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.qe-tasgn-comment-x:hover,
.qe-tasgn-comment-x:focus {
    background: rgba(255, 255, 255, 0.22);
    outline: none;
}

.qe-tasgn-comment-x .qe-tasgn-modal-close-icon {
    display: block;
    width: 15px;
    height: 15px;
}

.qe-tasgn-comment-title {
    margin: 0;
    min-width: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
}

.qe-tasgn-comment-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.qe-tasgn-comment-back:hover,
.qe-tasgn-comment-back:focus {
    background: rgba(255, 255, 255, 0.22);
    outline: none;
}

.qe-tasgn-comment-back.is-hidden {
    display: none;
}

.qe-tasgn-comment-gold-line {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, #c4a574 0%, #e5b55a 50%, #c4a574 100%);
}

.qe-tasgn-comment-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    direction: rtl;
    text-align: right;
}

.qe-tasgn-comment-modal.is-ltr .qe-tasgn-comment-main {
    direction: ltr;
    text-align: left;
}

.qe-tasgn-comment-deadline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0;
    padding: 0.85rem 1rem 0;
    font-size: 13px;
    font-weight: 700;
    color: #5c4b2e;
}

.qe-tasgn-comment-days {
    min-width: 96px;
    border: 1px solid #d7c7a5;
    border-radius: 6px;
    background: #fff;
    color: #383433;
    padding: 0.3rem 0.45rem;
}

.qe-tasgn-comment-body {
    height: 280px;
    max-height: 280px;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 0 0 auto;
    padding: 0.7rem 1rem 0.4rem;
}

.qe-tasgn-comment-columns {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.qe-tasgn-comment-column {
    flex: 1 1 0;
    min-width: 0;
}

.qe-tasgn-comment-row,
.qe-tasgn-comment-more {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin: 0 0 0.4rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid #e0d0b0;
    border-radius: 8px;
    background: #fff;
    color: #383433;
    text-align: inherit;
    cursor: pointer;
}

.qe-tasgn-comment-row.is-selected {
    background: #efe4cc;
    border-color: #816225;
    box-shadow: inset 0 0 0 1px #816225;
}

.qe-tasgn-comment-row span,
.qe-tasgn-comment-more {
    flex: 1;
}

.qe-tasgn-comment-row i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.qe-tasgn-comment-group {
    margin: 0 0 0.35rem;
    font-size: 12px;
    font-weight: 700;
    color: #816225;
    text-align: center;
}

.qe-tasgn-comment-letters {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.35rem;
    direction: rtl;
}

.qe-tasgn-comment-modal.is-ltr .qe-tasgn-comment-letters {
    direction: ltr;
}

.qe-tasgn-comment-letter {
    height: 36px;
    border: 1px solid #e0d0b0;
    border-radius: 6px;
    background: #fff;
    font-size: 18px;
    cursor: pointer;
}

.qe-tasgn-comment-empty {
    color: #8a7350;
    font-size: 13px;
    padding: 0.35rem 0 0.5rem;
}

.qe-tasgn-comment-draft {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    max-height: 88px;
    overflow: auto;
    padding: 0.15rem 1rem 0;
}

.qe-tasgn-comment-draft .qe-tasgn-comment-empty {
    width: 100%;
}

.qe-tasgn-comment-pick {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: 100%;
    margin: 0;
    padding: 0.18rem 0.28rem 0.18rem 0.55rem;
    border: 1px solid #d7c7a5;
    border-radius: 999px;
    background: #efe4cc;
    color: #383433;
    font-size: 12px;
    line-height: 1.3;
}

.qe-tasgn-comment-pick span {
    flex: 0 1 auto;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qe-tasgn-comment-pick button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(92, 75, 46, 0.12);
    color: #5c4b2e;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.qe-tasgn-comment-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0.65rem 1rem 0.9rem;
}

.qe-tasgn-comment-save {
    min-width: 7rem;
    border: 0;
    border-radius: 8px;
    background: #816225;
    color: #fff;
    font-weight: 700;
    padding: 0.45rem 1.15rem;
    cursor: pointer;
}

.qe-tasgn-comment-save:hover,
.qe-tasgn-comment-save:focus {
    background: #6d5220;
    color: #fff;
}

.qe-tasgn-corr-clear {
    position: absolute;
    right: -16px;
    top: -80px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #e53935;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.35);
}

.qe-learn-root.qe-lang-ar .qe-tasgn-corr-clear {
    right: auto;
    left: -16px;
}

.qe-tasgn-corr-foot {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.45rem;
}

.qe-tasgn-corr-lang {
    border: 1px solid #c9b48a;
    background: #fff;
    color: #816225;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
}

.qe-tasgn-corr-student {
    flex: 1;
    min-width: 0;
    background: #fff;
    border: 1px solid #d7c7a5;
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    font-size: 12px;
    color: #383433;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.qe-tasgn-corr-count {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #c62828;
    font-weight: 700;
    font-size: 13px;
}

.qe-tasgn-corr-count i {
    font-size: 16px;
}

.qe-tasgn-corr-end {
    display: none;
    width: 100%;
    margin-top: 0.45rem;
    border: 0;
    background: transparent;
    color: #1565c0;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    text-align: center;
}

.qe-tasgn-corr-panel.is-end .qe-tasgn-corr-end {
    display: block;
}

.qe-tasgn-mark-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(40, 30, 16, 0.45);
    padding: 1rem;
}

.qe-tasgn-mark-dialog {
    width: min(380px, 100%);
    background: #f7f1e4;
    border-radius: 10px;
    border: 1px solid #d9c7a3;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.qe-tasgn-mark-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 16px;
    background: #efe4cc;
    border-bottom: 1px solid #e0d0b0;
    color: #5c4b2e;
    font-weight: 700;
}

.qe-tasgn-mark-back {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
}

.qe-tasgn-mark-body {
    padding: 0.85rem 1rem 1rem;
}

.qe-tasgn-mark-mistakes {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: #383433;
}

.qe-tasgn-mark-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.85rem;
}

.qe-tasgn-mark-table th,
.qe-tasgn-mark-table td {
    padding: 0.4rem 0.35rem;
    text-align: center;
    font-size: 13px;
}

.qe-tasgn-mark-table th {
    color: #816225;
    font-weight: 700;
}

.qe-tasgn-mark-score-1 { color: #c62828; font-weight: 700; }
.qe-tasgn-mark-score-2 { color: #ef6c00; font-weight: 700; }
.qe-tasgn-mark-score-3 { color: #212121; font-weight: 700; }
.qe-tasgn-mark-score-4 { color: #2e7d32; font-weight: 700; }
.qe-tasgn-mark-score-5 { color: #1565c0; font-weight: 700; }

.qe-tasgn-mark-save {
    display: block;
    margin-left: auto;
    border: 0;
    border-radius: 6px;
    background: #816225;
    color: #fff;
    font-weight: 700;
    padding: 0.4rem 1.15rem;
    cursor: pointer;
}

.qe-learn-root.qe-lang-ar .qe-tasgn-mark-save {
    margin-left: 0;
    margin-right: auto;
}

.qe-tasgn-notice-modal {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(40, 30, 16, 0.45);
    padding: 1rem;
}

.qe-tasgn-notice-dialog {
    width: min(380px, 100%);
    padding: 1.45rem 1.4rem 1.35rem;
    background: #fff;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
    text-align: center;
}

.qe-tasgn-notice-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 0.65rem;
    line-height: 0;
}

.qe-tasgn-notice-title {
    margin: 0 0 0.55rem;
    color: #5c3a28;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.45;
}

.qe-tasgn-notice-modal.is-error .qe-tasgn-notice-title {
    color: #b71c1c;
}

.qe-tasgn-notice-msg {
    margin: 0 0 1.2rem;
    color: #6b6b6b;
    font-size: 0.98rem;
    font-weight: 500;
    line-height: 1.55;
    white-space: pre-wrap;
}

.qe-tasgn-notice-ok {
    min-width: 11rem;
    width: min(100%, 16rem);
    padding: 0.7rem 1.6rem;
    border: 0;
    border-radius: 999px;
    background: #5c4033;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
}

.qe-tasgn-notice-ok:hover,
.qe-tasgn-notice-ok:focus {
    background: #4a3329;
    color: #fff;
}

.qe-tasgn-next-modal {
    position: fixed;
    inset: 0;
    z-index: 1520;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(40, 30, 16, 0.5);
    padding: 1rem;
}

.qe-tasgn-next-dialog {
    width: min(520px, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    background: #fdfaf5;
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.qe-tasgn-next-head {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    direction: ltr !important;
    gap: 0.75rem;
    margin: 0;
    padding: 8px 16px;
    border-bottom: none;
    background-color: #1e1007;
    background-image: linear-gradient(172deg, #1e1007 0%, #5c3317 100%);
    color: #fff;
}

.qe-tasgn-next-x {
    order: 1;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    opacity: 1;
}

.qe-tasgn-next-x:hover,
.qe-tasgn-next-x:focus {
    background: rgba(255, 255, 255, 0.22);
    outline: none;
}

.qe-tasgn-next-x .qe-tasgn-modal-close-icon,
.qe-tasgn-noassign-x .qe-tasgn-modal-close-icon {
    display: block;
    width: 15px;
    height: 15px;
}

.qe-tasgn-next-heading {
    order: 2;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: 0;
    width: 100%;
    margin-left: auto;
    text-align: right;
}

.qe-tasgn-next-title {
    margin: 0 0 0 auto;
    width: auto;
    max-width: 100%;
    color: #fff;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
    text-align: right;
    direction: rtl;
}

.qe-tasgn-next-gold-line {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, #c4a574 0%, #e5b55a 50%, #c4a574 100%);
}

.qe-tasgn-next-modal.is-ltr .qe-tasgn-next-heading {
    align-items: flex-start;
    margin-left: 0;
    margin-right: auto;
    text-align: left;
    order: 1;
}

.qe-tasgn-next-modal.is-ltr .qe-tasgn-next-title {
    margin: 0 auto 0 0;
    text-align: left;
    direction: ltr;
}

.qe-tasgn-next-modal.is-ltr .qe-tasgn-next-x {
    order: 2;
}

.qe-tasgn-next-body {
    padding: 0.9rem 1rem 1rem;
}

.qe-tasgn-next-modal.is-rtl .qe-tasgn-next-body {
    direction: rtl;
    text-align: right;
}

.qe-tasgn-next-modal.is-ltr .qe-tasgn-next-body {
    direction: ltr;
    text-align: left;
}

.qe-tasgn-next-meta {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
    color: #5c4b2e;
}

.qe-tasgn-next-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.55rem;
}

.qe-tasgn-next-meta-label {
    color: #7a6a52;
    font-size: 0.86rem;
    font-weight: 600;
}

.qe-tasgn-next-meta-value {
    color: #3e2a16;
    font-weight: 700;
}

.qe-tasgn-next-modal.is-rtl .qe-tasgn-next-meta-row {
    justify-content: flex-start;
}

.qe-tasgn-next-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
    margin-bottom: 0.85rem;
}

.qe-tasgn-next-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.55rem 0.3rem;
    border: 1px solid #d9c7a3;
    border-radius: 10px;
    background: #efe6d4;
    color: #5c4b2e;
    font-weight: 700;
    cursor: pointer;
}

.qe-tasgn-next-tab[data-type="1"] i { color: #2e7d32; }
.qe-tasgn-next-tab[data-type="3"] i { color: #e65100; }
.qe-tasgn-next-tab[data-type="2"] i { color: #1565c0; }

.qe-tasgn-next-tab.is-active {
    background: #f3e2a8;
    border-color: #c4a050;
    box-shadow: inset 0 -3px 0 #4a90d9;
}

.qe-tasgn-next-choose,
.qe-tasgn-next-dir {
    margin-bottom: 0.75rem;
    padding: 0.7rem 0.8rem;
    border-radius: 10px;
    background: #fff;
}

.qe-tasgn-next-choose-title,
.qe-tasgn-next-dir > p {
    margin: 0 0 0.55rem;
    font-weight: 700;
    color: #4a3a24;
}

.qe-tasgn-next-select {
    width: 100%;
    min-height: 42px;
    padding: 0.55rem 0.75rem;
    border: 1px solid #b7e0bd;
    border-radius: 10px;
    background: #e8f5e9;
    color: #3e2a16;
    font-weight: 600;
    cursor: pointer;
}

.qe-tasgn-next-modal.is-rtl .qe-tasgn-next-select {
    text-align: right;
    direction: rtl;
}

.qe-tasgn-next-empty {
    margin: 0.45rem 0 0;
    color: #a33;
    font-size: 0.9rem;
}

.qe-tasgn-next-dir {
    background: #f6d5dc;
}

.qe-tasgn-next-dir-body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
}

.qe-tasgn-next-dir-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    min-width: 0;
}

.qe-tasgn-next-modal.is-rtl .qe-tasgn-next-dir-copy {
    align-items: flex-end;
    text-align: right;
}

.qe-tasgn-next-dir-label {
    display: block;
    font-weight: 700;
    color: #4a3a24;
}

.qe-tasgn-next-dir-opt {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-weight: 600;
}

.qe-tasgn-next-choose-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    gap: 0.1rem;
}

.qe-tasgn-next-choose-hint {
    font-size: 0.72rem;
    color: #6b4a38;
    font-weight: 600;
}

.qe-tasgn-next-choose-btn {
    margin-inline-start: 0;
    padding: 0.35rem 0.9rem;
    border: 0;
    border-radius: 20px;
    background: #c4a574;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.qe-tasgn-next-choose-btn.is-chosen {
    background: #816225;
    color: #fff;
}

.qe-tasgn-next-modal.is-picking,
.qe-tasgn-noassign-modal.is-picking {
    display: none !important;
}

.qe-tasgn-next-chosen {
    margin: 0 0 0.8rem;
    color: #c2185b;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.45;
    text-align: center;
}

.qe-tasgn-pick-bar {
    position: fixed;
    left: 50%;
    bottom: 78px;
    transform: translateX(-50%);
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: min(720px, calc(100% - 1.5rem));
    padding: 0.45rem 0.7rem;
    border-radius: 14px;
    background: #f7f1e4;
    box-shadow: 0 6px 18px rgba(40, 30, 16, 0.28);
}

.qe-tasgn-pick-back,
.qe-tasgn-pick-confirm {
    min-width: 92px;
    padding: 0.45rem 1rem;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.qe-tasgn-pick-back {
    background: #c4a056;
}

.qe-tasgn-pick-confirm {
    background: #2e9b57;
}

.qe-tasgn-pick-label {
    flex: 1;
    text-align: center;
    color: #3e2a16;
    font-weight: 800;
}

.qe-tasgn-pick {
    position: absolute;
    z-index: 28;
    box-sizing: border-box;
    border-radius: 2px;
    cursor: pointer;
    pointer-events: auto;
}

.qe-tasgn-pick.is-selected {
    outline: 2px solid #d32f2f;
    z-index: 29;
}

.qe-tasgn-pick-bracket {
    position: absolute;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 1px;
    pointer-events: none;
    color: #d32f2f;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 0 2px #fff, 0 1px 2px rgba(0, 0, 0, 0.25);
}

.qe-tasgn-pick-bracket-char {
    font-size: 26px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.qe-tasgn-pick-bracket-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #d32f2f;
    color: #fff;
    font-size: 9px;
}

.qe-tasgn-pick-bracket-start {
    transform: translate(-10%, -25%);
}

.qe-tasgn-pick-bracket-end {
    transform: translate(-70%, 10%);
}

.qe-tasgn-next-stars {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin: 0.35rem 0 0.7rem;
    color: #d4a017;
    font-size: 1.25rem;
}

.qe-tasgn-next-assess {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: #fff;
    color: #5c4b2e;
    font-weight: 600;
}

.qe-tasgn-next-modal.is-rtl .qe-tasgn-next-assess {
    flex-direction: row;
}

.qe-tasgn-next-assess i {
    color: #c62828;
    font-size: 1.15rem;
}

.qe-tasgn-next-send {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 8px;
    background: #b0894a;
    color: #fff;
    font-size: 1.02rem;
    font-weight: 800;
    cursor: pointer;
}

.qe-tasgn-next-send:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.qe-tasgn-next-foot {
    padding: 0.65rem 1rem 0.9rem;
    background: #f3ebe0;
    border-top: 1px solid #e5d7bf;
}

.qe-tasgn-next-modal.is-rtl .qe-tasgn-next-foot {
    direction: ltr;
    text-align: left;
}

.qe-tasgn-next-modal.is-ltr .qe-tasgn-next-foot {
    text-align: left;
}

.qe-tasgn-next-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border: 0;
    border-radius: 8px;
    background: #43a047;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

/* Teacher didn't Assign — header matches teacher meeting schedule popups */
.qe-tasgn-noassign-modal {
    position: fixed;
    inset: 0;
    z-index: 1510;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(40, 30, 16, 0.45);
    padding: 1rem;
}

.qe-tasgn-noassign-dialog {
    width: min(720px, 100%);
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fdfaf5;
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.qe-tasgn-noassign-head {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    direction: ltr !important;
    gap: 0.75rem;
    margin: 0;
    padding: 8px 16px;
    border-bottom: none;
    background-color: #1e1007;
    background-image: linear-gradient(172deg, #1e1007 0%, #5c3317 100%);
    color: #fff;
}

.qe-tasgn-noassign-x {
    order: 1;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    opacity: 1;
}

.qe-tasgn-noassign-x:hover,
.qe-tasgn-noassign-x:focus {
    background: rgba(255, 255, 255, 0.22);
    outline: none;
}

.qe-tasgn-noassign-heading {
    order: 2;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: 0;
    width: 100%;
    margin-left: auto;
    text-align: right;
}

.qe-tasgn-noassign-title {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* with direction:rtl this packs to the RIGHT */
    gap: 0.45rem;
    margin: 0;
    margin-left: auto;
    width: auto;
    max-width: 100%;
    color: #fff;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
    text-align: right;
    direction: rtl;
}

.qe-tasgn-noassign-help {
    flex: 0 0 auto;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: #e5b55a;
    color: #1e1007;
    font-weight: 800;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.qe-tasgn-noassign-gold-line {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, #c4a574 0%, #e5b55a 50%, #c4a574 100%);
}

/* English header: title left, close right */
.qe-tasgn-noassign-modal.is-ltr .qe-tasgn-noassign-heading,
.qe-learn-root.qe-lang-en .qe-tasgn-noassign-heading {
    align-items: flex-start;
    margin-left: 0;
    margin-right: auto;
    text-align: left;
}

.qe-tasgn-noassign-modal.is-ltr .qe-tasgn-noassign-title,
.qe-learn-root.qe-lang-en .qe-tasgn-noassign-title {
    justify-content: flex-start;
    margin-left: 0;
    margin-right: auto;
    text-align: left;
    direction: ltr;
}

.qe-tasgn-noassign-modal.is-ltr .qe-tasgn-noassign-x,
.qe-learn-root.qe-lang-en .qe-tasgn-noassign-x {
    order: 2;
}

.qe-tasgn-noassign-modal.is-ltr .qe-tasgn-noassign-heading,
.qe-learn-root.qe-lang-en .qe-tasgn-noassign-heading {
    order: 1;
}

.qe-tasgn-noassign-body {
    padding: 0.85rem 1rem 0.45rem;
    overflow: auto;
}

.qe-tasgn-noassign-modal.is-rtl .qe-tasgn-noassign-body,
.qe-learn-root.qe-lang-ar .qe-tasgn-noassign-body {
    direction: rtl;
    text-align: right;
}

.qe-tasgn-noassign-modal.is-ltr .qe-tasgn-noassign-body,
.qe-learn-root.qe-lang-en .qe-tasgn-noassign-body {
    direction: ltr;
    text-align: left;
}

.qe-tasgn-noassign-desc {
    margin: 0 0 0.7rem;
    color: #5c4a32;
    font-size: 0.92rem;
    line-height: 1.45;
}

.qe-tasgn-noassign-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
    flex-wrap: wrap;
}

.qe-tasgn-noassign-total {
    font-weight: 700;
    color: #5c4a32;
}

.qe-tasgn-noassign-pager {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    direction: ltr;
}

.qe-tasgn-noassign-page-btn {
    width: 1.85rem;
    height: 1.85rem;
    border: 0;
    border-radius: 6px;
    background: #5c3317;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qe-tasgn-noassign-page-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.qe-tasgn-noassign-page-label {
    min-width: 3.2rem;
    text-align: center;
    font-weight: 700;
    color: #3e2a16;
    background: #fffdf8;
    border: 1px solid #d9c7a3;
    border-radius: 6px;
    padding: 0.2rem 0.4rem;
}

.qe-tasgn-noassign-table-wrap {
    overflow: auto;
    border: 1px solid #e0d2b8;
    border-radius: 10px;
    background: #fff;
}

.qe-tasgn-noassign-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.qe-tasgn-noassign-table th,
.qe-tasgn-noassign-table td {
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid #efe4d0;
    text-align: start;
    vertical-align: top;
}

.qe-tasgn-noassign-table th {
    background: #efe4cc;
    color: #5c4b2e;
    font-weight: 800;
    white-space: nowrap;
}

.qe-tasgn-noassign-empty {
    text-align: center !important;
    color: #8a7352;
    padding: 1.1rem 0.6rem !important;
}

.qe-tasgn-noassign-student,
.qe-tasgn-noassign-assign {
    border: 0;
    background: none;
    color: #5c3317;
    font-weight: 700;
    padding: 0;
}

.qe-tasgn-noassign-assign {
    cursor: pointer;
    text-decoration: underline;
}

.qe-tasgn-noassign-asgn {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.qe-tasgn-noassign-asgn-title {
    color: #2d2418;
    font-weight: 700;
}

.qe-tasgn-noassign-asgn-course {
    color: #b0893d;
    font-size: 0.82rem;
}

.qe-tasgn-noassign-foot {
    display: flex;
    gap: 0.65rem;
    padding: 0.75rem 1rem 0.95rem;
    border-top: 1px solid #e5d7bf;
    background: #f3ebe0;
}

/* Arabic: action buttons on the left */
.qe-tasgn-noassign-modal.is-rtl .qe-tasgn-noassign-foot,
.qe-learn-root.qe-lang-ar .qe-tasgn-noassign-foot {
    direction: ltr;
    justify-content: flex-start;
}

.qe-tasgn-noassign-modal.is-ltr .qe-tasgn-noassign-foot,
.qe-learn-root.qe-lang-en .qe-tasgn-noassign-foot {
    direction: ltr;
    justify-content: flex-end;
}

.qe-tasgn-noassign-close,
.qe-tasgn-noassign-refresh {
    min-width: 7.5rem;
    padding: 0.5rem 1rem;
    border: 0;
    border-radius: 8px;
    background: #efe4cc;
    color: #5c3a28;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px #d9c7a3;
}

.qe-tasgn-noassign-refresh {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #5c3317;
    color: #fff;
    box-shadow: none;
}

.qe-tasgn-noassign-close:hover,
.qe-tasgn-noassign-close:focus {
    background: #e4d4b5;
}

.qe-tasgn-noassign-refresh:hover,
.qe-tasgn-noassign-refresh:focus {
    background: #3e2210;
}

.qe-tasgn-noassign-modal.is-loading .qe-tasgn-noassign-body {
    opacity: 0.65;
    pointer-events: none;
}

.qe-teacher-meeting-schedule .qe-ms-reload-row {
    justify-content: flex-end;
}

.qe-ms-slot-row.is-span-follow .qe-ms-slot-gutter {
    border-bottom: 1px solid #cfcfcf;
}

.qe-ms-slot-cell.is-disabled,
.qe-ms-slot-cell.is-available {
    pointer-events: none;
    cursor: default;
}

.qe-ms-slot-cell.is-occupied {
    position: absolute;
    top: 0;
    inset-inline-start: 58px;
    inset-inline-end: 0;
    z-index: 1;
    align-items: flex-start;
    padding-top: 6px;
    padding-bottom: 6px;
    overflow: hidden;
    box-sizing: border-box;
}

.qe-ms-slot-count {
    position: absolute;
    top: 4px;
    inset-inline-end: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 50%;
    background: #fff;
    color: #333;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.qe-ms-slot-names {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.qe-ms-slot-cell.is-occupied .qe-ms-slot-meta {
    padding-inline-end: 22px;
}

/* Teacher booking popups — match Tajweed lessons modal chrome */
.qe-tms-popup.show,
.qe-tms-popup.in {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.qe-tms-popup .qe-tms-dialog,
.qe-tms-popup .qe-tms-dialog.modal-dialog-centered {
    max-width: 480px;
    width: calc(100% - 32px);
    margin: auto !important;
    display: flex;
    align-items: center;
    min-height: auto;
}

.qe-tms-popup .qe-tms-allot-dialog {
    max-width: 560px;
}

.qe-tms-popup .qe-tms-slot-dialog {
    max-width: 400px;
}

.qe-tms-popup .qe-tms-notify-dialog {
    max-width: 420px;
}

.qe-tms-popup .modal-content {
    background: #fdfaf5;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
}

.qe-tms-popup .modal-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    direction: ltr !important;
    margin: 0 !important;
    padding: 8px 16px !important;
    border-bottom: none !important;
    background-color: #1e1007 !important;
    background-image: linear-gradient(172deg, #1e1007 0%, #5c3317 100%) !important;
}

.qe-tms-popup .modal-header .close {
    order: 1 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: static !important;
    opacity: 1 !important;
    color: #fff !important;
    text-shadow: none;
    background: rgba(255, 255, 255, 0.12) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer;
    flex-shrink: 0;
}

.qe-tms-popup .modal-header .close:hover,
.qe-tms-popup .modal-header .close:focus {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.22) !important;
    outline: none;
}

.qe-tms-popup .qe-tms-modal-close-icon {
    display: block;
    width: 15px;
    height: 15px;
}

.qe-tms-popup .qe-tms-modal-heading {
    order: 2 !important;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin: 0;
    padding: 0;
    min-width: 0;
    text-align: right !important;
}

.qe-tms-popup .modal-header .modal-title,
.qe-tms-popup .qe-tms-modal-heading .modal-title {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    color: #fff !important;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 20px;
    text-align: right !important;
}

.qe-tms-popup .qe-tms-modal-sub {
    display: block;
    margin: 2px 0 0;
    color: #e5b55a;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    opacity: 0.85;
    text-align: right !important;
}

.qe-tms-popup .qe-tms-modal-sub:empty {
    display: none;
}

.qe-tms-popup .qe-tms-modal-gold-line {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, #c8922a 0%, #e5b55a 50%, #c8922a 100%);
}

.qe-tms-popup .modal-body {
    background-color: #fdfaf5 !important;
    max-height: min(560px, calc(100vh - 160px));
    overflow: auto;
    padding: 12px 14px 16px !important;
    color: #5c3317;
    font-family: 'Vazirmatn', sans-serif;
}

.qe-tms-popup:not(.is-rtl) .qe-tms-modal-heading {
    order: 1 !important;
    align-items: flex-start !important;
    text-align: left !important;
}

.qe-tms-popup:not(.is-rtl) .modal-header .modal-title,
.qe-tms-popup:not(.is-rtl) .qe-tms-modal-heading .modal-title,
.qe-tms-popup:not(.is-rtl) .qe-tms-modal-sub {
    text-align: left !important;
}

.qe-tms-popup:not(.is-rtl) .modal-header .close {
    order: 2 !important;
}

.qe-tms-slot-body {
    position: relative;
    padding: 8px !important;
}

.qe-tms-popup .qe-ms-slot-list {
    max-height: min(520px, calc(100vh - 220px));
    background: #f7f7f7;
    padding-bottom: 48px;
}

.qe-tms-slot-fab {
    position: absolute;
    bottom: 10px;
    inset-inline-end: 12px;
    z-index: 6;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid #43a047;
    background: #fff;
    color: #2e7d32;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.qe-tms-slot-fab:hover,
.qe-tms-slot-fab:focus {
    background: #f7fff7;
    outline: none;
}

.qe-tms-slot-fab.is-confirm {
    border-color: #c4a574;
    color: #2e7d32;
}

.qe-tms-slot-fab-cal,
.qe-tms-slot-fab-check {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.qe-tms-slot-fab-cal .fa-calendar {
    font-size: 14px;
    color: #43a047;
}

.qe-tms-slot-fab-plus {
    position: absolute;
    right: -4px;
    bottom: -3px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #fff;
    color: #43a047;
    font-size: 7px;
    line-height: 9px;
    text-align: center;
}

.qe-tms-slot-fab-check {
    display: none;
}

.qe-tms-slot-fab-check .fa-check {
    font-size: 14px;
    font-weight: 700;
    color: #43a047;
}

.qe-tms-slot-fab.is-confirm .qe-tms-slot-fab-cal {
    display: none;
}

.qe-tms-slot-fab.is-confirm .qe-tms-slot-fab-check {
    display: inline-flex;
}

#qeTMsSlotModal .qe-ms-slot-cell.is-empty.is-selected {
    background: #81c784;
    border-style: solid;
    border-color: #66bb6a;
}

#qeTMsSlotModal .qe-ms-slot-cell.is-available.is-deselected {
    background: #fff;
    border-style: dashed;
    border-color: #7ba3c9;
}

#qeTMsSlotModal .qe-ms-slot-cell.is-past {
    pointer-events: none !important;
    cursor: default;
    opacity: 0.4;
}

#qeTMsSlotModal.is-selecting .qe-ms-slot-list {
    user-select: none;
    -webkit-user-select: none;
}

#qeTMsSlotModal.is-selecting .qe-ms-slot-cell.is-empty:not(.is-past),
#qeTMsSlotModal.is-selecting .qe-ms-slot-cell.is-available:not(.is-past) {
    pointer-events: auto;
    cursor: pointer;
    touch-action: none;
}

#qeTMsSlotModal.is-selecting .qe-ms-slot-cell.is-occupied {
    pointer-events: none;
    cursor: default;
}

.qe-tms-slot-fab:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

#qeTMsSlotModal:not(.is-selecting) .qe-ms-slot-cell.is-available:not(.is-past),
#qeTMsSlotModal:not(.is-selecting) .qe-ms-slot-cell.is-occupied:not(.is-past) {
    pointer-events: auto;
    cursor: pointer;
}

.qe-tms-duration-dialog {
    max-width: 420px;
}

.qe-tms-duration-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid #e5d4b8;
    border-radius: 10px;
    overflow: hidden;
}

.qe-tms-duration-col-head,
.qe-tms-duration-current {
    background: linear-gradient(172deg, #1e1007 0%, #5c3317 100%);
    color: #fff;
    text-align: center;
    font-weight: 700;
    padding: 8px 4px;
    font-size: 13px;
}

.qe-tms-duration-current {
    background: #5c3317;
    color: #e5b55a;
}

.qe-tms-duration-options {
    max-height: 220px;
    overflow-y: auto;
    background: #fdfaf5;
}

.qe-tms-opt {
    display: block;
    width: 100%;
    border: 0;
    border-bottom: 1px solid #efe4d2;
    background: #fdfaf5;
    color: #5c3317;
    padding: 8px;
    font-weight: 700;
    cursor: pointer;
}

.qe-tms-opt:hover,
.qe-tms-opt:focus {
    background: #f6ead3;
    outline: none;
}

.qe-tms-opt.is-active {
    background: #e5b55a;
    color: #1e1007;
}

.qe-tms-duration-foot {
    display: flex;
    justify-content: flex-end;
    padding: 12px 0 0;
}

.qe-tms-duration-save,
.qe-tms-msg-btn {
    min-width: 88px;
    padding: 8px 18px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(172deg, #1e1007 0%, #5c3317 100%);
    color: #fff;
    font-weight: 700;
    font-family: 'Vazirmatn', sans-serif;
    cursor: pointer;
}

.qe-tms-duration-save:hover,
.qe-tms-duration-save:focus,
.qe-tms-msg-btn:hover,
.qe-tms-msg-btn:focus {
    background: #5c3317;
    color: #fff;
    outline: none;
}

.qe-tms-msg-text {
    margin: 8px 0 16px;
    font-size: 14px;
    line-height: 1.55;
    text-align: center;
    color: #5c3317;
}

.qe-tms-msg-actions {
    display: flex;
    justify-content: center;
}

.qe-tms-allot-dialog {
    max-width: 560px;
}

.qe-tms-allot-section-head {
    padding: 8px 12px;
    color: #fff;
    font-weight: 700;
    border-radius: 8px;
    margin: 8px 0 6px;
}

.qe-tms-allot-section-head.is-green {
    background: linear-gradient(172deg, #1e1007 0%, #5c3317 100%);
}

.qe-tms-allot-section-head.is-dark {
    background: #5c3317;
}

.qe-tms-allotted-body,
.qe-tms-allotted-modal-body {
    min-height: 44px;
    padding: 4px 0 8px;
    background: transparent;
}

.qe-tms-none-allotted {
    margin: 8px 0;
    color: #c62828;
    text-align: center;
    font-weight: 700;
}

.qe-tms-allotted-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #efe4d2;
    border-radius: 10px;
    margin-bottom: 6px;
}

.qe-tms-allotted-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #efe4d2;
    flex: 0 0 22px;
}

.qe-tms-allotted-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.qe-tms-allotted-name {
    font-size: 13px;
    font-weight: 700;
}

.qe-tms-allotted-course {
    font-size: 11px;
    font-weight: 600;
    color: #5c3317;
}

.qe-tms-cam {
    color: #c8922a;
    width: 22px;
    text-align: center;
}

.qe-tms-allot-course-row,
.qe-tms-allot-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    flex-wrap: wrap;
    font-size: 13px;
}

.qe-tms-allot-select,
.qe-tms-allot-search {
    flex: 1 1 140px;
    min-width: 120px;
    height: 34px;
    border: 1px solid #e5d4b8;
    border-radius: 8px;
    background: #fff;
    padding: 0 8px;
    color: #5c3317;
}

.qe-tms-allot-refresh {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(172deg, #1e1007 0%, #5c3317 100%);
    color: #e5b55a;
    cursor: pointer;
}

.qe-tms-allot-refresh:hover,
.qe-tms-allot-refresh:focus {
    color: #fff;
    outline: none;
}

.qe-tms-radio {
    margin: 0 6px 0 0;
    font-weight: 600;
}

.qe-tms-allot-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    flex-wrap: wrap;
}

.qe-tms-add-students {
    min-width: 72px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(172deg, #1e1007 0%, #5c3317 100%);
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
}

.qe-tms-add-students .fa-plus {
    font-size: 18px;
    color: #e5b55a;
}

.qe-tms-type-box {
    background: #fff;
    border: 1px solid #e5d4b8;
    border-radius: 8px;
    padding: 6px 10px;
}

.qe-tms-all-check {
    font-size: 12px;
    font-weight: 700;
}

.qe-tms-student-table-wrap {
    max-height: 240px;
    overflow: auto;
    border: 1px solid #e5d4b8;
    border-radius: 10px;
    background: #fff;
}

.qe-tms-student-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.qe-tms-student-table th {
    background: #efe4d2;
    color: #5c3317;
    padding: 8px 6px;
    text-align: center;
}

.qe-tms-student-table td {
    padding: 6px;
    border-bottom: 1px solid #f3eadc;
    text-align: center;
}

.qe-tms-student-table tr.is-checked {
    background: #f6ead3;
}

.qe-tms-allot-status {
    margin: 0;
    padding: 6px 0;
    font-size: 12px;
}

.qe-tms-allot-status.is-error {
    color: #c62828;
}

.qe-tms-allotted-dialog {
    max-width: 420px;
}

.qe-tms-allotted-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.qe-tms-allotted-edit {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(92, 51, 23, 0.12);
    color: #5c3317;
    cursor: pointer;
}

.qe-tms-allotted-edit:hover,
.qe-tms-allotted-edit:focus {
    background: #5c3317;
    color: #e5b55a;
    outline: none;
}

.qe-tms-allotted-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 14px;
}

.qe-tms-start-call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 0.4rem 1.25rem;
    border: 1px solid #4B3000;
    border-radius: 8px;
    background: #4B3000;
    color: #fff;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.qe-tms-start-call:hover,
.qe-tms-start-call:focus {
    background: #3a2500;
    border-color: #3a2500;
    color: #fff;
    outline: none;
}

.qe-tms-start-call:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.qe-tms-start-call-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: #816225;
    text-align: center;
}

.qe-adhoc-popup .qe-adhoc-dialog {
    max-width: 460px;
}

.qe-adhoc-popup .modal-header {
    justify-content: flex-start !important;
}

.qe-adhoc-popup .qe-adhoc-refresh {
    order: 1 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0 0 0 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.qe-adhoc-popup .modal-header .close {
    order: 0 !important;
}

.qe-adhoc-popup .qe-tms-modal-heading {
    order: 2 !important;
    margin-inline-start: auto;
}

.qe-adhoc-popup .qe-adhoc-refresh:hover,
.qe-adhoc-popup .qe-adhoc-refresh:focus {
    background: rgba(255, 255, 255, 0.22);
    outline: none;
    color: #fff;
}

.qe-adhoc-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px 18px;
}

.qe-adhoc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    color: #5c3317;
    font-size: 14px;
    font-weight: 600;
}

.qe-adhoc-select {
    width: 100%;
    min-height: 40px;
    padding: 6px 10px;
    border: 1px solid #c4a574;
    border-radius: 8px;
    background: #fff;
    color: #3a2500;
    font-family: inherit;
    font-size: 14px;
}

.qe-adhoc-students-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    color: #5c3317;
    font-size: 14px;
    font-weight: 600;
}

.qe-adhoc-duration {
    width: auto;
    min-width: 148px;
    max-width: 180px;
    font-weight: 500;
}

.qe-adhoc-select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    padding: 8px 10px;
    border: 1px solid #e4d3b4;
    border-radius: 8px;
    background: #fff;
    color: #5c3317;
    font-weight: 600;
}

.qe-adhoc-students {
    max-height: 280px;
    overflow: auto;
    border: 1px solid #e4d3b4;
    border-radius: 8px;
    background: #fff;
}

.qe-adhoc-student {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 12px;
    border-bottom: 1px solid #f0e4cf;
    background: #fbf6ec;
    color: #3a2500;
    cursor: pointer;
}

.qe-adhoc-student:last-child {
    border-bottom: 0;
}

.qe-adhoc-student.is-checked {
    background: #f6ead3;
}

.ijtama .btn-primary.qe-student-adhoc-open {
    width: auto;
    white-space: nowrap;
}

.qe-adhoc-empty {
    margin: 0;
    padding: 14px 12px;
    color: rgba(56, 52, 51, 0.72);
    text-align: center;
}

.qe-adhoc-status {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #5c3317;
}

.qe-adhoc-status.is-error {
    color: #c62828;
}

.qe-adhoc-start {
    width: 100%;
    min-height: 44px;
    border: 1px solid #4B3000;
    border-radius: 8px;
    background: #4B3000;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.qe-adhoc-start:hover,
.qe-adhoc-start:focus {
    background: #3a2500;
    color: #fff;
    outline: none;
}

.qe-adhoc-start:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.qe-adhoc-running-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 420px;
    overflow: auto;
}

.qe-adhoc-running-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e4d3b4;
    border-radius: 8px;
    background: #fbf6ec;
}

.qe-adhoc-running-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    color: #3a2500;
    font-size: 13px;
}

.qe-adhoc-running-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.qe-adhoc-running-row em {
    flex: 0 0 auto;
    color: #816225;
    font-style: normal;
    font-weight: 600;
}

.qe-adhoc-running-row b {
    font-weight: 600;
    text-align: end;
}

.qe-adhoc-join,
.qe-student-adhoc-join,
.qe-adhoc-end,
.qe-adhoc-skip {
    min-height: 40px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.qe-adhoc-running-actions {
    display: flex;
    gap: 8px;
}

.qe-adhoc-join,
.qe-student-adhoc-join,
.qe-adhoc-end {
    width: 100%;
    padding: 0 14px;
    border: 1px solid #4B3000;
    background: #4B3000;
    color: #fff;
}

.qe-adhoc-running-actions .qe-adhoc-join,
.qe-adhoc-running-actions .qe-adhoc-end {
    flex: 1 1 0;
    width: auto;
}

.qe-adhoc-end {
    border-color: #b42318;
    background: #fff;
    color: #b42318;
}

.qe-adhoc-end:hover,
.qe-adhoc-end:focus {
    background: #b42318;
    color: #fff;
    outline: none;
}

.qe-adhoc-end:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.qe-adhoc-end-confirm {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 2px;
}

.qe-adhoc-end-confirm[hidden] {
    display: none !important;
}

.qe-adhoc-end-confirm p {
    margin: 0;
    color: #5c3317;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.qe-adhoc-end-confirm-actions {
    display: flex;
    gap: 8px;
}

.qe-adhoc-end-yes,
.qe-adhoc-end-no {
    flex: 1 1 0;
    min-height: 36px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.qe-adhoc-end-yes {
    border: 1px solid #b42318;
    background: #b42318;
    color: #fff;
}

.qe-adhoc-end-no {
    border: 1px solid #c4a574;
    background: #fff;
    color: #4B3000;
}

.qe-adhoc-end-yes:hover,
.qe-adhoc-end-yes:focus,
.qe-adhoc-end-no:hover,
.qe-adhoc-end-no:focus {
    outline: none;
}

.qe-adhoc-end-yes:disabled,
.qe-adhoc-end-no:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.qe-adhoc-join:hover,
.qe-adhoc-join:focus,
.qe-student-adhoc-join:hover,
.qe-student-adhoc-join:focus {
    background: #3a2500;
    color: #fff;
    outline: none;
}

.qe-adhoc-skip {
    width: 100%;
    border: 1px solid #c4a574;
    background: #fff;
    color: #4B3000;
}

.qe-adhoc-skip:hover,
.qe-adhoc-skip:focus {
    background: #fbf6ec;
    outline: none;
}

.qe-adhoc-popup.is-rtl .qe-adhoc-body,
.qe-adhoc-popup.is-rtl .qe-adhoc-field,
.qe-adhoc-popup.is-rtl .qe-adhoc-students-head,
.qe-adhoc-popup.is-rtl .qe-adhoc-running-card,
.qe-adhoc-popup.is-rtl .qe-adhoc-running-copy,
.qe-adhoc-popup.is-rtl .qe-adhoc-select-all,
.qe-adhoc-popup.is-rtl .qe-adhoc-student {
    direction: rtl;
    text-align: right;
}

.qe-classroom-shell {
    position: fixed;
    inset: 0;
    z-index: 10800;
    background: rgba(30, 16, 7, 0.45);
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 16px;
    pointer-events: auto;
}

.qe-classroom-shell[hidden] {
    display: none !important;
}

.qe-classroom-shell.is-minimized {
    inset: auto;
    background: transparent;
    padding: 0;
    width: 0;
    height: 0;
    overflow: visible;
    pointer-events: none;
}

body.qe-classroom-open {
    overflow: hidden;
}

body.qe-classroom-webview .qe-classroom-shell {
    padding: 0;
}

body.qe-classroom-webview .qe-classroom-panel {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
}

body.qe-classroom-minimized {
    overflow: auto;
}

.qe-classroom-panel {
    display: flex;
    flex-direction: column;
    width: min(1200px, 100%);
    height: 100%;
    background: #F3F3F3;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    position: relative;
}

.qe-classroom-shell.is-minimized .qe-classroom-panel {
    position: fixed;
    z-index: 10801;
    width: 360px;
    height: 240px;
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    left: 16px;
    bottom: 16px;
    top: auto;
    right: auto;
    pointer-events: auto;
    cursor: default;
}

.qe-classroom-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    direction: ltr;
    flex: 0 0 auto;
    padding: 12px 16px;
    background: #4B3000;
    color: #fff;
    gap: 10px;
}

.qe-classroom-shell.is-minimized .qe-classroom-header {
    position: relative;
    z-index: 40;
    padding: 8px 10px;
    cursor: move;
    pointer-events: auto;
}

body.qe-classroom-student-locked .qe-classroom-shell {
    z-index: 10840;
}

body.qe-classroom-student-locked .qe-classroom-shell.is-minimized .qe-classroom-panel,
body.qe-classroom-student-locked .qe-classroom-shell.is-minimized .qe-classroom-leave {
    pointer-events: auto;
}

.qe-classroom-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.qe-classroom-icon-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.qe-classroom-icon-btn:hover,
.qe-classroom-icon-btn:focus {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.qe-classroom-leave {
    background: #c62828;
    border-color: #c62828;
}

.qe-classroom-leave i {
    transform: rotate(135deg);
}

body.qe-classroom-ending {
    overflow: auto;
}

html.qe-classroom-leaving,
body.qe-classroom-leaving {
    background-color: #F0F0E6 !important;
    background-image: none !important;
}

body.qe-classroom-leaving #qeClassroomVideo {
    overflow: hidden;
    transform: translateZ(0);
}

body.qe-classroom-leaving > [class*="MuiBackdrop"],
body.qe-classroom-leaving > [class*="MuiModal"],
body.qe-classroom-leaving > [class*="MuiDialog"],
body.qe-classroom-leaving > [class*="ReactModal"],
body.qe-classroom-leaving > #zmmtg-root,
body.qe-classroom-leaving > video-player,
body.qe-classroom-leaving > video-player-container {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    background: transparent !important;
}

.qe-classroom-shell.is-ending {
    background: transparent;
    pointer-events: none;
}

.qe-classroom-shell.is-ending:not(.is-minimized) {
    inset: auto;
    width: 0;
    height: 0;
    padding: 0;
    overflow: visible;
}

.qe-classroom-shell.is-ending:not(.is-minimized) .qe-classroom-panel {
    position: fixed;
    z-index: 10801;
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    width: min(440px, calc(100vw - 32px));
    height: 260px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    transform: translate(-50%, -50%);
    pointer-events: auto;
    overflow: hidden;
}

.qe-classroom-shell.is-ending.is-minimized .qe-classroom-panel {
    pointer-events: auto;
    overflow: hidden;
}

.qe-classroom-ending {
    position: absolute;
    inset: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: rgba(30, 16, 7, 0.82);
    color: #fff;
    text-align: center;
    pointer-events: auto;
}

.qe-classroom-ending[hidden] {
    display: none !important;
}

.qe-classroom-ending p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.qe-classroom-ending.is-rtl p {
    direction: rtl;
}

.qe-classroom-ending-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #f7e7c6;
    border-radius: 50%;
    animation: qe-classroom-ending-spin 0.75s linear infinite;
}

@keyframes qe-classroom-ending-spin {
    to { transform: rotate(360deg); }
}

.qe-classroom-leave-choice {
    position: fixed;
    inset: 0;
    z-index: 10950;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(30, 16, 7, 0.55);
}

.qe-classroom-leave-choice[hidden] {
    display: none !important;
}

.qe-classroom-leave-panel {
    width: min(420px, 100%);
    padding: 18px 18px 16px;
    border-radius: 16px;
    background: #fdfaf5;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    text-align: center;
}

.qe-classroom-leave-panel h3 {
    margin: 0 0 8px;
    color: #4B3000;
    font-size: 18px;
}

.qe-classroom-leave-panel > p {
    margin: 0 0 14px;
    color: #3a2500;
    font-size: 14px;
    line-height: 1.5;
}

.qe-classroom-leave-only,
.qe-classroom-leave-end,
.qe-classroom-leave-cancel {
    display: block;
    width: 100%;
    min-height: 42px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.qe-classroom-leave-only {
    border: 1px solid #4B3000;
    background: #fff;
    color: #4B3000;
}

.qe-classroom-leave-end {
    border: 1px solid #c62828;
    background: #c62828;
    color: #fff;
}

.qe-classroom-leave-cancel {
    margin-top: 8px;
    border: 0;
    background: transparent;
    color: #816225;
}

.qe-classroom-leave-hint {
    margin: 6px 0 12px;
    color: #816225;
    font-size: 12px;
    line-height: 1.4;
}

.qe-classroom-leave-choice.is-rtl .qe-classroom-leave-panel {
    direction: rtl;
}

.qe-classroom-leave:hover,
.qe-classroom-leave:focus {
    background: #b71c1c;
}

.qe-classroom-title {
    margin: 0;
    flex: 1 1 auto;
    text-align: right;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qe-learn-root.qe-lang-en .qe-classroom-title {
    text-align: left;
}

.qe-classroom-body {
    display: flex;
    flex-direction: row;
    direction: ltr;
    flex: 1 1 auto;
    min-height: 0;
    gap: 12px;
    padding: 12px;
}

.qe-classroom-shell.is-minimized .qe-classroom-body {
    padding: 0;
    gap: 0;
}

.qe-classroom-video-wrap {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    background: #1e1007;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.qe-classroom-av-bar {
    flex: 0 0 auto;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 18;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 12px 12px;
    pointer-events: auto;
    background: linear-gradient(180deg, rgba(30, 16, 7, 0) 0%, rgba(30, 16, 7, 0.55) 100%);
}

.qe-classroom-av-btn {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.qe-classroom-av-btn:hover,
.qe-classroom-av-btn:focus {
    background: rgba(0, 0, 0, 0.75);
    outline: none;
}

.qe-classroom-av-btn.is-off,
.qe-classroom-av-btn.is-students-minimized {
    background: #c62828;
}

body.qe-classroom-student-locked #qeClassroomLeave {
    display: none !important;
    pointer-events: none !important;
}

body.qe-classroom-student-locked #qeClassroomMinMax {
    display: none !important;
    pointer-events: none !important;
}

.qe-classroom-rec-btn,
#qeClassroomRecordStart,
#qeClassroomRecordPause,
#qeClassroomRecordStop {
    display: none !important;
}

.qe-classroom-rec-btn.is-record {
    color: #ff5252;
}

.qe-classroom-rec-btn.is-record i {
    font-size: 14px;
}

.qe-classroom-rec-btn.is-stop {
    background: #c62828;
}

.qe-classroom-shell.is-minimized .qe-classroom-video-wrap {
    border-radius: 0;
}

.qe-classroom-mini-focus {
    position: absolute;
    inset: 0;
    z-index: 12;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px 56px;
    background: #1e1007;
    color: #f7e7c6;
    pointer-events: none;
}

.qe-classroom-mini-focus[hidden] {
    display: none !important;
}

.qe-classroom-mini-focus-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #c8922a;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.qe-classroom-mini-focus.is-talking .qe-classroom-mini-focus-avatar {
    box-shadow: 0 0 0 3px #c8922a;
}

.qe-classroom-mini-focus-name {
    max-width: 100%;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qe-classroom-video {
    width: 100%;
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
    position: relative;
    overflow: hidden;
    display: block;
}

#qeClassroomVideo .qe-zoom-top-chrome,
#qeClassroomVideo .zoom-MuiToolbar-root,
#qeClassroomVideo [class*="MuiToolbar"] {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

#qeClassroomVideo .qe-zoom-footer-chrome {
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    bottom: 0 !important;
    inset-inline-start: 0 !important;
    flex: none !important;
}

.qe-classroom-overflow {
    flex: 0 0 auto;
    z-index: 20;
    background: rgba(20, 12, 6, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 48px;
}

.qe-classroom-overflow[hidden] {
    display: none !important;
}

.qe-classroom-overflow-list {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px;
    scrollbar-width: thin;
}

.qe-classroom-overflow-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 160px;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.qe-classroom-overflow-chip.is-talking {
    background: rgba(200, 146, 42, 0.28);
    box-shadow: 0 0 0 2px #c8922a;
}

.qe-classroom-overflow-chip.is-active {
    border: 1px solid rgba(255, 255, 255, 0.55);
}

.qe-classroom-overflow-chip.is-camera-off .qe-classroom-overflow-avatar {
    filter: grayscale(1);
    opacity: 0.65;
}

.qe-classroom-overflow-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #c8922a;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qe-classroom-overflow-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
}

.qe-classroom-shell.is-minimized .qe-classroom-overflow {
    display: none !important;
}

.qe-classroom-av-btn.is-on {
    background: #2e7d32;
}

/* Zoom owns participant video geometry inside #qeClassroomVideo. Do not
   reposition, crop, or resize video-player / canvas nodes from CSS. */

.qe-classroom-shell.is-sharing #qeClassroomVideo [class*="ribbon"] {
    display: none !important;
}

/* Keep mic/camera/audio; hide share and Zoom chrome that opens extra overlays. */
body.qe-classroom-open button[aria-label="View"],
body.qe-classroom-minimized button[aria-label="View"],
body.qe-classroom-open button[aria-label*="View options" i],
body.qe-classroom-minimized button[aria-label*="View options" i],
body.qe-classroom-open button[aria-label*="Change view" i],
body.qe-classroom-minimized button[aria-label*="Change view" i],
body.qe-classroom-open button[aria-label*="Encrypt" i],
body.qe-classroom-minimized button[aria-label*="Encrypt" i],
body.qe-classroom-open button[aria-label*="encrypted" i],
body.qe-classroom-minimized button[aria-label*="encrypted" i],
body.qe-classroom-open button[aria-label*="Speaker view" i],
body.qe-classroom-minimized button[aria-label*="Speaker view" i],
body.qe-classroom-open button[aria-label*="Gallery" i],
body.qe-classroom-minimized button[aria-label*="Gallery" i],
body.qe-classroom-open button[aria-label*="Meeting information" i],
body.qe-classroom-minimized button[aria-label*="Meeting information" i],
body.qe-classroom-open button[aria-label*="Security" i],
body.qe-classroom-minimized button[aria-label*="Security" i],
body.qe-classroom-open button[aria-label*="Settings" i],
body.qe-classroom-minimized button[aria-label*="Settings" i],
body.qe-classroom-open button[aria-label="More"],
body.qe-classroom-minimized button[aria-label="More"],
body.qe-classroom-open button[aria-label*="More options" i],
body.qe-classroom-minimized button[aria-label*="More options" i],
body.qe-classroom-open button[aria-label*="Accessibility" i],
body.qe-classroom-minimized button[aria-label*="Accessibility" i],
body.qe-classroom-open button[title="View"],
body.qe-classroom-minimized button[title="View"],
body.qe-classroom-open button[aria-label="عرض"],
body.qe-classroom-minimized button[aria-label="عرض"],
body.qe-classroom-open button[aria-label*="معلومات الاجتماع"],
body.qe-classroom-minimized button[aria-label*="معلومات الاجتماع"],
body.qe-classroom-open button[aria-label*="الأمان"],
body.qe-classroom-minimized button[aria-label*="الأمان"],
body.qe-classroom-open button[aria-label*="إعدادات"],
body.qe-classroom-minimized button[aria-label*="إعدادات"],
body.qe-classroom-open button[aria-label="المزيد"],
body.qe-classroom-minimized button[aria-label="المزيد"],
body.qe-classroom-open button[aria-label*="Share" i],
body.qe-classroom-minimized button[aria-label*="Share" i],
body.qe-classroom-open button[title*="Share" i],
body.qe-classroom-minimized button[title*="Share" i],
body.qe-classroom-open button[aria-label*="مشاركة"],
body.qe-classroom-minimized button[aria-label*="مشاركة"],
body.qe-classroom-open button[title*="مشاركة"],
body.qe-classroom-minimized button[title*="مشاركة"] {
    display: none !important;
}

.qe-classroom-shell.is-student .qe-classroom-roster,
.qe-classroom-shell.is-minimized .qe-classroom-roster {
    display: none;
}

.qe-classroom-roster {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 3px 0 #00000026;
    padding: 12px;
    order: 0;
}

.qe-classroom-roster-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: #4B3000;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.qe-learn-root.qe-lang-en .qe-classroom-roster-title {
    justify-content: flex-start;
}

.qe-classroom-roster-list {
    flex: 1 1 auto;
    overflow: auto;
}

.qe-classroom-roster-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px 4px;
    border-bottom: 1px solid #f0e6d8;
    font-size: 13px;
    color: #383433;
}

.qe-classroom-roster-row.is-reciting {
    background: #fff8ee;
}

.qe-classroom-roster-main {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
    min-height: 28px;
}

.qe-classroom-roster-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c4b8a5;
    justify-self: center;
}

.qe-classroom-roster-row.is-joined .qe-classroom-roster-dot {
    background: #2e7d32;
}

.qe-classroom-roster-row.is-absent {
    opacity: 0.72;
}

.qe-classroom-roster-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: start;
}

.qe-classroom-roster-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.qe-classroom-roster-flag {
    flex: 0 0 auto;
    color: #4B3000;
    font-weight: 700;
    font-size: 11px;
}

.qe-classroom-roster-actions {
    display: flex;
    gap: 4px;
    flex: none;
    margin: 0;
}

.qe-classroom-action,
.qe-classroom-host-btn {
    border: 1px solid #d7c4a3;
    background: #fff;
    color: #4B3000;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-family: 'Vazirmatn', sans-serif;
    cursor: pointer;
}

.qe-classroom-action {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    position: relative;
    z-index: 2;
}

.qe-classroom-action.is-danger {
    border-color: #e7b4b4;
    color: #b71c1c;
}

.qe-classroom-action.is-muted {
    background: #c62828;
    border-color: #c62828;
    color: #fff;
}

.qe-classroom-action:hover,
.qe-classroom-host-btn:hover {
    background: #f7f0e4;
}

.qe-classroom-host-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.qe-classroom-roster-empty,
.qe-classroom-status {
    margin: 8px 0 0;
    font-size: 13px;
    color: #816225;
}

.qe-classroom-status.is-error {
    color: #c62828;
}

.qe-learn-root.qe-lang-ar .qe-classroom-roster,
.qe-learn-root.qe-lang-ar .qe-tms-allotted-actions,
.qe-learn-root.qe-lang-ar .qe-tms-start-call-hint {
    text-align: right;
}

.qe-classroom-roster[hidden],
.qe-classroom-host-bar[hidden] {
    display: none !important;
}

.qe-classroom-shell.is-student .qe-classroom-roster,
.qe-classroom-shell.is-minimized .qe-classroom-roster {
    display: none !important;
}

[data-qe-zoom-hidden] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

@media (max-width: 900px) {
    .qe-classroom-body {
        flex-direction: column;
    }

    .qe-classroom-roster {
        flex: 0 0 auto;
        max-height: 180px;
    }

    .qe-classroom-shell.is-minimized .qe-classroom-panel {
        width: min(320px, calc(100vw - 16px));
        height: 200px;
    }
}

/* Dynamic left study panels + Settings → Panel layout */
.qe-learn-root .sidebar-content .qe-study-panels-host {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.qe-learn-root .sidebar-content .qe-study-panel {
    display: flex;
    flex-direction: column;
    flex: 1 0 220px;
    min-height: 220px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.qe-learn-root .sidebar-content .qe-study-panel.qe-panel-collapsed {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
}

.qe-learn-root .sidebar-content .qe-study-panel > .qe-study-panel-body.qe-expandable-panel {
    position: relative;
    height: auto !important;
    padding: 12px;
    padding-bottom: 40px;
    background: #fff;
    border-radius: 0 0 6px 6px;
    box-shadow: rgba(100, 100, 111, 0.2) 0 7px 29px 0;
    min-height: 0;
    overflow: hidden;
    flex: 1 1 auto;
}

.qe-learn-root .sidebar-content .qe-study-panel .radio-selections + div.qe-expandable-panel {
    height: auto !important;
}

.qe-learn-root .sidebar-content .qe-study-pane {
    display: none !important;
    min-height: 0;
}

.qe-learn-root .sidebar-content .qe-study-pane.is-active {
    display: block !important;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.qe-learn-root .sidebar-content .qe-study-pane.is-active[data-pane="text"] {
    display: flex !important;
    flex-direction: column;
}

.qe-learn-root .sidebar-content .qe-study-panel.qe-panel-collapsed > .qe-study-panel-body {
    display: none !important;
}

.qe-learn-root .sidebar-content .qe-study-panel.qe-panel-collapsed > .qe-study-panel-header {
    border-radius: 6px;
}

.qe-learn-root .sidebar-content .qe-panel-collapse-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    order: 0 !important;
    align-self: center;
    flex: 0 0 28px !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px;
    margin: 0 6px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    background: #fff !important;
    color: #4B3000;
    font-size: 0.75rem;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.qe-learn-root .sidebar-content .qe-panel-collapse-toggle:hover,
.qe-learn-root .sidebar-content .qe-panel-collapse-toggle:focus {
    background: rgba(75, 48, 0, 0.08) !important;
    color: #4B3000;
    outline: none;
}

.qe-learn-root .sidebar-content .qe-panel-collapse-toggle i {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    width: 1em;
    height: 1em;
    transition: transform 0.2s ease;
}

.qe-learn-root .sidebar-content .qe-panel-collapse-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.qe-learn-root.qe-lang-en .sidebar-content .radio-selections > .qe-tt-tabs-scroll,
.qe-learn-root.qe-lang-en .sidebar-content .qe-study-panel-header > .qe-tt-tabs-scroll {
    order: 0 !important;
}

.qe-learn-root.qe-lang-en .sidebar-content .radio-selections > .qe-panel-settings-wrap,
.qe-learn-root.qe-lang-en .sidebar-content .qe-study-panel-header > .qe-panel-settings-wrap {
    order: 1 !important;
    margin-left: 4px;
    margin-right: 0;
}

.qe-learn-root.qe-lang-en .sidebar-content .radio-selections > .qe-panel-collapse-toggle,
.qe-learn-root.qe-lang-en .sidebar-content .qe-study-panel-header > .qe-panel-collapse-toggle,
.qe-learn-root.qe-lang-en .sidebar-content .qe-panel-collapse-toggle {
    order: 2 !important;
    margin-left: 6px;
    margin-right: 4px;
}

.qe-learn-root.qe-lang-ar .sidebar-content .qe-tt-tabs-scroll {
    direction: rtl;
}

.qe-learn-root.qe-lang-en .sidebar-content .qe-tt-tabs-scroll {
    direction: ltr;
}

.qe-learn-root.qe-lang-en .sidebar-content .qe-study-text-body,
.qe-learn-root.qe-lang-en .sidebar-content .qe-study-pane {
    direction: ltr;
    text-align: left;
}

.qe-settings-style-modal .qe-panel-layout-help {
    font-size: 13px;
    line-height: 1.6;
    color: #5c4a32;
    margin-bottom: 1rem;
}

.qe-settings-style-modal .qe-panel-layout-card {
    border: 1px solid rgba(75, 48, 0, 0.18);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.55);
}

.qe-settings-style-modal .qe-panel-layout-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #4B3000;
    margin: 0 0 10px;
}

.qe-settings-style-modal .qe-panel-layout-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.qe-settings-style-modal .qe-panel-layout-chip {
    display: inline-flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
}

.qe-settings-style-modal .qe-panel-layout-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.qe-settings-style-modal .qe-panel-layout-chip span {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid rgba(75, 48, 0, 0.25);
    background: #fff;
    color: #4B3000;
    font-size: 13px;
    line-height: 1.4;
}

.qe-settings-style-modal .qe-panel-layout-chip.is-active span,
.qe-settings-style-modal .qe-panel-layout-chip input:checked + span {
    background: #4B3000;
    color: #fff;
    border-color: #4B3000;
}

.qe-learn-root.qe-lang-ar .qe-settings-style-modal .qe-panel-layout-help,
.qe-learn-root.qe-lang-ar .qe-settings-style-modal .qe-panel-layout-card-title {
    text-align: right;
}

body.qe-classroom-lobby-open {
    overflow: hidden;
}

.qe-classroom-lobby {
    position: fixed;
    inset: 0;
    z-index: 10850;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(30, 16, 7, 0.5);
}

.qe-classroom-lobby[hidden] {
    display: none !important;
}

.qe-classroom-lobby-panel {
    width: min(760px, 100%);
    max-height: calc(100vh - 32px);
    overflow: auto;
    background: #fdfaf5;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.qe-classroom-lobby-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
    background-image: linear-gradient(172deg, #1e1007 0%, #5c3317 100%);
    color: #fff;
}

.qe-classroom-lobby-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.qe-classroom-lobby-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.qe-classroom-lobby-close:hover,
.qe-classroom-lobby-close:focus {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.qe-classroom-lobby-body {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr);
    gap: 16px;
    padding: 16px 18px 8px;
}

.qe-classroom-lobby-preview {
    position: relative;
    min-height: 220px;
    background: #1e1007;
    border-radius: 12px;
    overflow: hidden;
}

.qe-classroom-lobby-preview video {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    background: #1e1007;
    transform: scaleX(-1);
}

.qe-classroom-lobby-media-toggles {
    position: absolute;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.qe-classroom-lobby-media-btn {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.qe-classroom-lobby-media-btn:hover,
.qe-classroom-lobby-media-btn:focus {
    background: rgba(0, 0, 0, 0.75);
}

.qe-classroom-lobby-media-btn.is-off {
    background: #c62828;
}

.qe-classroom-lobby.is-cam-off #qeClassroomLobbyVideo {
    visibility: hidden;
}

.qe-classroom-lobby-meter {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    overflow: hidden;
}

.qe-classroom-lobby-meter span {
    display: block;
    height: 100%;
    width: 0;
    background: #c8922a;
    transition: width 80ms linear;
}

.qe-classroom-lobby-side {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.qe-classroom-lobby-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #efe4d2;
    border-radius: 10px;
}

.qe-classroom-lobby-detail {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
}

.qe-classroom-lobby-detail span {
    color: #816225;
    font-weight: 600;
}

.qe-classroom-lobby-detail strong {
    color: #1e1007;
    text-align: end;
}

.qe-classroom-lobby-none {
    margin: 0;
    color: #5c3317;
    font-size: 13px;
}

.qe-classroom-lobby-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #5c3317;
}

.qe-classroom-lobby-field select {
    width: 100%;
    height: 34px;
    border: 1px solid #e5d4b8;
    border-radius: 8px;
    background: #fff;
    color: #1e1007;
    padding: 0 8px;
}

.qe-classroom-lobby-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.qe-classroom-lobby-row select {
    flex: 1 1 auto;
}

.qe-classroom-lobby-test {
    flex: 0 0 auto;
    height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: #efe4d2;
    color: #5c3317;
    font-weight: 700;
    cursor: pointer;
}

.qe-classroom-lobby-test:hover,
.qe-classroom-lobby-test:focus {
    background: #e3d2b4;
    outline: none;
}

.qe-classroom-lobby-status {
    margin: 0;
    font-size: 12px;
    color: #5c3317;
}

.qe-classroom-lobby-status.is-error {
    color: #b42318;
}

.qe-classroom-lobby-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px 16px;
}

.qe-classroom-lobby.is-rtl .qe-classroom-lobby-actions {
    justify-content: flex-start;
}

.qe-classroom-lobby-cancel,
.qe-classroom-lobby-join {
    min-width: 96px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.qe-classroom-lobby-cancel {
    background: #efe4d2;
    color: #5c3317;
}

.qe-classroom-lobby-join {
    background: linear-gradient(172deg, #1e1007 0%, #5c3317 100%);
    color: #fff;
}

.qe-classroom-lobby-join:disabled {
    opacity: 0.6;
    cursor: wait;
}

@media (max-width: 700px) {
    .qe-classroom-lobby-body {
        grid-template-columns: 1fr;
    }
}

/* Teacher Create Assignment */
.qe-ca-entry {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.qe-ca-entry-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid #e0d0b8;
    border-radius: 10px;
    background: #fdfaf5;
    color: #5c3317;
    font-weight: 700;
    text-align: start;
    cursor: pointer;
}

.qe-learn-root.qe-lang-ar .qe-ca-entry,
.qe-learn-root.qe-lang-ar .qe-ca-entry-btn {
    direction: rtl;
    text-align: right;
}

.qe-learn-root.qe-lang-ar .qe-ca-entry-btn {
    justify-content: flex-start;
}

.qe-ca-entry-btn:hover,
.qe-ca-entry-btn:focus {
    border-color: #c8922a;
    background: #fff8ec;
}

.qe-ca-entry-ico {
    width: 64px;
    height: 38px;
    flex: 0 0 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
    background: transparent;
}

.qe-ca-entry-ico img {
    display: block;
    width: 64px;
    height: 38px;
    min-width: 0;
    max-width: none;
    object-fit: contain;
    object-position: center;
}

.qe-ca-overlay {
    position: fixed;
    inset: 0;
    z-index: 1525;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(40, 30, 16, 0.5);
    padding: 1rem;
}

.qe-ca-dialog {
    width: min(520px, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    background: #fdfaf5;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.qe-ca-dialog--sheet {
    width: min(920px, 100%);
}

.qe-ca-dialog--range {
    width: min(720px, 96vw);
}

.qe-ca-dialog--students {
    width: min(640px, 100%);
}

.qe-ca-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 8px 16px;
    background-image: linear-gradient(172deg, #1e1007 0%, #5c3317 100%);
    color: #fff;
    direction: ltr;
}

.qe-learn-root.qe-lang-en .qe-ca-head {
    flex-direction: row-reverse;
}

.qe-learn-root.qe-lang-ar .qe-ca-head {
    flex-direction: row;
}

.qe-ca-head h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
    color: #fff;
}

.qe-learn-root.qe-lang-ar .qe-ca-head h5 {
    flex: 1;
    text-align: right;
}

.qe-learn-root.qe-lang-ar .qe-ca-field,
.qe-learn-root.qe-lang-ar .qe-ca-field > span:first-child {
    text-align: right;
}

.qe-ca-dialog .qe-learn-modal-gold-line {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, #c8922a 0%, #e5b55a 50%, #c8922a 100%);
}

.qe-ca-head .qe-ca-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.qe-ca-body {
    padding: 1rem 1.15rem;
}

.qe-ca-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
    font-weight: 600;
    color: #5c3317;
}

.qe-ca-select-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.qe-ca-select-row select,
.qe-ca-field input,
.qe-ca-field select {
    flex: 1;
    min-height: 38px;
    border: 1px solid #d7c4a3;
    border-radius: 8px;
    background: #fff;
    padding: 0.25rem 0.5rem;
}

.qe-ca-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    margin: 0;
    padding: 0;
    border: 1px solid #d7c4a3;
    border-radius: 8px;
    background: #efe4d2;
    color: #5c3317;
    line-height: 1;
    cursor: pointer;
}

.qe-ca-icon-btn .fa {
    display: block;
    width: 1em;
    line-height: 1;
    text-align: center;
}

.qe-ca-dialog--appt {
    width: min(640px, 100%);
}

.qe-ca-appt-next-wrap {
    text-align: center;
    margin: 0.5rem 0 1rem;
}

.qe-ca-appt-today-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.qe-ca-appt-today-table td {
    border: 1px solid #e8e0d4;
    padding: 0.55rem 0.45rem;
    vertical-align: middle;
    color: #3a2a12;
}

.qe-ca-appt-no {
    width: 2rem;
    text-align: center;
}

.qe-ca-appt-dot {
    width: 1.6rem;
    text-align: center;
}

.qe-ca-appt-dot span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c8c0b4;
}

.qe-ca-appt-names {
    min-width: 8rem;
}

.qe-ca-appt-name + .qe-ca-appt-name {
    margin-top: 0.2rem;
}

.qe-ca-appt-time {
    width: 4.2rem;
    text-align: center;
    white-space: nowrap;
}

.qe-ca-appt-video {
    width: 6.5rem;
    text-align: center;
}

.qe-ca-appt-video-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #6b4e2e;
    font-size: 1.15rem;
    cursor: pointer;
}

.qe-ca-appt-video-btn:hover,
.qe-ca-appt-video-btn:focus {
    color: #3a2a12;
}

.qe-ca-appt-group {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #6b4e2e;
}

.qe-ca-notice-over {
    z-index: 1600;
}

.qe-ca-notice-info {
    width: 28px;
    height: 28px;
    margin: 0 auto 0.55rem;
    border-radius: 50%;
    border: 2px solid #c9ae7c;
    color: #8a6a3b;
    font-weight: 800;
    font-style: italic;
    line-height: 24px;
    text-align: center;
}

.qe-ca-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.4rem;
    padding: 4px 12px;
    background-color: #1e1007;
    background-image: linear-gradient(172deg, #1e1007 0%, #5c3317 100%);
    border-radius: 8px;
}

.qe-ca-section-head .qe-ca-icon-btn {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.qe-ca-empty-red {
    color: #c62828;
    font-weight: 700;
    text-align: center;
    margin: 0.75rem 0;
}

.qe-ca-muted {
    color: #7a6244;
    margin: 0.5rem 0;
}

.qe-ca-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1.15rem 1.1rem;
}

.qe-ca-btn-green {
    background: #2e9e6b;
    color: #fff;
    border: 0;
    font-weight: 700;
    padding: 0.45rem 0.9rem;
}

#qeCaRecordedMeetings {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 38px;
    margin: 0;
    padding: 0 22px !important;
    border-radius: 22px;
    line-height: 1 !important;
    text-align: center !important;
    direction: ltr;
}

#qeCaRecordedMeetings > span,
#qeCaApptClear > span {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 1;
    text-align: center;
}

#qeCaRecordedMeetings:hover,
#qeCaRecordedMeetings:focus,
#qeCaRecordedMeetings:active {
    background: #2e9e6b;
    color: #fff;
    outline: none;
    box-shadow: none;
}

.qe-ca-btn-gold {
    background: #c9ae7c;
    color: #3a2a12;
    border: 0;
    font-weight: 700;
    padding: 0.45rem 0.9rem;
}

#qeCaApptClear {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 38px;
    min-width: 96px;
    margin: 0;
    padding: 0 22px !important;
    border-radius: 28px;
    color: #fff;
    line-height: 1 !important;
    text-align: center !important;
    direction: ltr;
}

#qeCaApptClear:hover,
#qeCaApptClear:focus,
#qeCaApptClear:active {
    background: #c9ae7c;
    color: #fff;
    outline: none;
    box-shadow: none;
}

.qe-ca-sheet-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-sizing: border-box;
    height: 48px;
    padding: 8px 16px;
    background-image: linear-gradient(172deg, #1e1007 0%, #5c3317 100%);
}

.qe-ca-sheet-toolbar .qe-ca-icon-btn {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 6px;
    font-size: 12px;
}

.qe-ca-sheet-toolbar .qe-ca-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.qe-ca-sheet-toolbar .qe-ca-x .qe-tasgn-modal-close-icon {
    display: block;
    width: 15px;
    height: 15px;
}

.qe-ca-sheet-date {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-inline: auto;
    direction: ltr;
}

.qe-ca-sheet-date input {
    width: 140px;
    text-align: center;
    border-radius: 8px;
    border: 0;
    height: 30px;
    font-weight: 700;
}

.qe-ca-sheet-date-field {
    position: relative;
    display: inline-block;
    width: 140px;
    height: 30px;
}

.qe-ca-sheet-date-field #qeCaSheetDate {
    width: 100%;
    pointer-events: none;
}

.qe-ca-sheet-date-picker {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.qe-ca-sheet-wrap {
    overflow: auto;
    max-height: calc(100vh - 8rem);
    background: #fff;
}

.qe-ca-sheet {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.qe-ca-sheet th,
.qe-ca-sheet td {
    border: 1px solid #ddd;
    padding: 0.35rem 0.4rem;
    text-align: center;
}

.qe-ca-sheet .qe-ca-name {
    text-align: start;
    color: #1565c0;
    font-weight: 600;
}

.qe-ca-sheet th.is-memo,
.qe-ca-sheet td.is-memo {
    background: #d7ecfb;
}

.qe-ca-sheet th.is-revi,
.qe-ca-sheet td.is-revi {
    background: #fff3b0;
}

.qe-ca-sheet th.is-recit,
.qe-ca-sheet td.is-recit {
    background: #f8c7c7;
}

.qe-ca-sheet th.is-attend,
.qe-ca-sheet td.is-attend {
    background: #7cb342;
    color: #1b3d0a;
    width: 72px;
}

.qe-ca-sheet th.is-upload,
.qe-ca-sheet td.is-upload {
    background: #c9ae7c;
    width: 64px;
}

.qe-ca-attend-cell,
.qe-ca-upload-cell {
    cursor: pointer;
}

.qe-ca-attend-cell.is-on {
    color: #fff;
    font-size: 16px;
}

.qe-ca-type-cell .fa-check {
    color: #2e7d32;
    display: inline-block;
    font-size: 16px;
    line-height: 1;
    vertical-align: middle;
}

.qe-ca-type-cell .fa-check + .fa-check {
    margin-inline-start: 2px;
}

.qe-ca-upload-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8d8d8d;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qe-ca-upload-btn .qe-ca-upload-icon {
    display: block;
    width: 30px;
    height: 30px;
    max-width: none;
    object-fit: contain;
}

#qeCaSheetModal.is-behind {
    display: none;
}

.qe-ca-overlay--nested {
    z-index: 1535;
}

.qe-ca-dialog--pending {
    width: min(420px, 100%);
}

.qe-ca-pending {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
}

.qe-ca-pending th,
.qe-ca-pending td {
    border: 1px solid #ddd;
    padding: 0.45rem 0.5rem;
    text-align: center;
}

.qe-ca-pending-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.75rem;
}

.qe-ca-dialog--choose {
    width: min(420px, 100%);
    background: #fff;
    overflow: hidden;
}

.qe-ca-dialog--session-confirm {
    width: min(420px, 100%);
    background: #fff;
    overflow: hidden;
}

.qe-ca-choose-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 16px;
    background: #f4ead0;
    border-bottom: 1px solid #e2d4b0;
}

.qe-ca-choose-head h5 {
    flex: 1;
    margin: 0;
    text-align: center;
    font-size: 16px;
    line-height: 20px;
    font-weight: 700;
    color: #5c3a28;
}

.qe-ca-choose-head .qe-ca-notice-info {
    margin: 0;
    flex: 0 0 28px;
}

.qe-ca-choose-head .qe-ca-x {
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.qe-ca-choose-nav {
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #5c3a28;
    font-size: 1.1rem;
    cursor: pointer;
}

.qe-learn-root.qe-lang-ar .qe-ca-choose-nav i {
    transform: scaleX(-1);
}

.qe-ca-choose-body {
    display: flex;
    justify-content: center;
    gap: 2.25rem;
    padding: 1.6rem 1.2rem 1.75rem;
    background: #fff;
}

.qe-ca-choose-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    width: 8.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #222;
    cursor: pointer;
}

.qe-ca-choose-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 64px;
    border: 2px solid #222;
    background: #fff;
}

.qe-ca-choose-doc {
    display: block;
    width: 28px;
    height: 32px;
    border: 2px solid #222;
    border-radius: 2px;
    background:
        linear-gradient(#222, #222) 6px 8px / 14px 2px no-repeat,
        linear-gradient(#222, #222) 6px 14px / 14px 2px no-repeat,
        linear-gradient(#222, #222) 6px 20px / 10px 2px no-repeat,
        #fff;
}

.qe-ca-choose-rec {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 3px solid #222;
    border-radius: 50%;
}

.qe-ca-choose-rec span {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e53935;
}

.qe-ca-choose-label {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
}

.qe-ca-confirm-body {
    flex-direction: column;
    align-items: center;
    gap: 1.15rem;
    padding: 1.35rem 1.2rem 1.45rem;
}

.qe-ca-confirm-msg {
    margin: 0;
    color: #333;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
}

.qe-ca-confirm-actions {
    display: flex;
    justify-content: center;
    gap: 1.1rem;
    width: 100%;
}

.qe-ca-confirm-btn {
    min-width: 7.5rem;
    padding: 0.55rem 1.2rem;
    border: 1px solid #e2d4b0;
    border-radius: 6px;
    background: #f4ead0;
    color: #3a2a12;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
}

.qe-ca-confirm-btn:hover,
.qe-ca-confirm-btn:focus {
    background: #ead9b0;
}

.qe-ca-dialog--marks {
    width: min(640px, 100%);
    background: #fff;
    overflow: hidden;
}

.qe-ca-marks-body {
    padding: 0.85rem 1rem 1.1rem;
    background: #fff;
}

.qe-ca-marks-heading {
    margin: 0.35rem 0 0.7rem;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    color: #222;
}

.qe-ca-marks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 1.1rem;
}

.qe-ca-marks-table th,
.qe-ca-marks-table td {
    border: 1px solid #d7d7d7;
    padding: 0.35rem 0.3rem;
    text-align: center;
    vertical-align: middle;
}

.qe-ca-marks-table thead th {
    background: #fff;
    font-weight: 600;
    color: #444;
}

.qe-ca-marks-session td {
    background: #fff;
    font-weight: 700;
    text-align: center;
}

.qe-ca-marks-total {
    background: #ffe6ea;
}

.qe-ca-marks-count {
    background: #e8f4ff;
}

.qe-ca-marks-asgn {
    cursor: pointer;
}

.qe-ca-marks-title {
    text-align: start;
    font-weight: 600;
}

.qe-ca-marks-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-inline-end: 0.25rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #e53935;
    font-size: 16px;
    cursor: pointer;
}

.qe-ca-marks-page {
    display: none;
}

.qe-ca-marks-page.is-open {
    display: table-row;
}

.qe-ca-marks-page td:last-child {
    background: #ececec;
}

.qe-ca-marks-empty {
    color: #7a6244;
    font-weight: 600;
    padding: 0.8rem !important;
}

.qe-ca-set-marks {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: min(280px, 100%);
    margin: 0 auto 1rem;
}

.qe-ca-set-mark {
    display: grid;
    grid-template-columns: 42px 28px 1fr;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    cursor: pointer;
}

.qe-ca-set-num,
.qe-ca-set-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border: 1px solid #c9b48a;
    background: #fff;
    font-weight: 700;
}

.qe-ca-set-label.is-poor {
    color: #e53935;
}

.qe-ca-set-label.is-average {
    color: #ef6c00;
}

.qe-ca-set-label.is-good,
.qe-ca-set-label.is-very-good,
.qe-ca-set-label.is-excellent {
    color: #2e7d32;
}

.qe-ca-marks-save-wrap {
    display: flex;
    justify-content: flex-end;
}

.qe-ca-type-cell {
    cursor: pointer;
    min-width: 72px;
    min-height: 28px;
    white-space: nowrap;
}

.qe-ca-type-cell:hover {
    outline: 2px solid #5c3317;
}

#qeCaTooltip.qe-ca-tooltip {
    display: none;
    position: fixed;
    z-index: 1400;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: #fff;
    direction: ltr;
    text-align: center;
    pointer-events: auto;
}

#qeCaTooltip.qe-ca-tooltip.is-visible {
    display: block;
    padding-right: 18px;
}

.qe-learn-root.qe-lang-ar #qeCaTooltip.qe-ca-tooltip.is-visible {
    padding-right: 0;
    padding-left: 16px;
}

#qeCaTooltip.qe-ca-tooltip.is-dragging {
    cursor: grabbing;
}

.qe-ca-tip-rail {
    position: relative;
    width: 80px;
    padding: 8px 5px 10px;
    background: #996a31;
    color: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

.qe-ca-tip-student {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 1px;
    width: 100%;
    margin: 0;
    padding: 0 2px 6px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
    cursor: pointer;
}

.qe-ca-tip-student span {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.qe-ca-tip-student .fa {
    align-self: flex-end;
    margin-right: 1px;
    font-size: 13px;
    line-height: 1;
    opacity: 0.95;
}

.qe-ca-tip-student-menu {
    position: absolute;
    top: 48px;
    left: 50%;
    z-index: 3;
    min-width: 148px;
    max-height: 220px;
    overflow: auto;
    padding: 4px 0;
    background: #fff;
    color: #5c3317;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
    transform: translateX(-50%);
    text-align: start;
}

.qe-ca-tip-student-option,
.qe-ca-tip-student-empty {
    display: block;
    width: 100%;
    padding: 0.4rem 0.7rem;
    border: 0;
    background: transparent;
    color: #5c3317;
    font-size: 13px;
    text-align: start;
}

.qe-ca-tip-student-option {
    cursor: pointer;
    border-bottom: 1px solid #ead9b8;
}

.qe-ca-tip-student-option:last-child {
    border-bottom: 0;
}

.qe-ca-tip-student-option:hover,
.qe-ca-tip-student-option.is-current {
    background: #f4ead8;
}

.qe-ca-tip-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
}

.qe-ca-tip-actions > button {
    width: 100%;
    padding: 7px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.55);
}

.qe-ca-tip-pending,
.qe-ca-tip-select,
.qe-ca-tip-icon,
.qe-ca-tip-type,
.qe-ca-tip-next-page,
.qe-ca-tip-close {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
}

.qe-ca-tip-pending {
    gap: 1px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.05;
}

.qe-ca-tip-pending img,
.qe-ca-tip-icon img,
.qe-ca-tip-type img,
.qe-ca-tip-close img,
.qe-ca-tip-next-page img,
#qeCaTooltip #qeCaTipRefresh img {
    display: block;
    max-width: none;
    object-fit: contain;
    background: transparent;
}

.qe-ca-tip-pending img {
    width: 34px;
    height: 26px;
}

.qe-ca-tip-select {
    width: 100%;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.12;
    white-space: normal;
}

.qe-ca-tip-flag {
    color: #e53935;
    font-size: 22px;
    line-height: 1;
}

.qe-ca-tip-actions > .qe-ca-tip-next-page,
.qe-ca-tip-actions > .qe-ca-tip-type,
.qe-ca-tip-actions > .qe-ca-tip-close,
.qe-ca-tip-actions > .qe-ca-tip-icon.is-record,
.qe-ca-tip-actions > .qe-ca-tip-icon.is-new,
#qeCaTooltip #qeCaTipRefresh {
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
}

.qe-ca-tip-next-page {
    height: auto;
}

.qe-ca-tip-next-page img {
    width: 40px;
    height: 34px;
}

.qe-ca-tip-type,
#qeCaTooltip #qeCaTipRefresh {
    height: auto;
}

.qe-ca-tip-type img,
#qeCaTooltip #qeCaTipRefresh img {
    display: block;
    width: 34px;
    height: 34px;
    max-width: none;
    object-fit: contain;
    background: transparent;
}

.qe-ca-tip-icon {
    height: 36px;
    font-size: 20px;
}

.qe-ca-tip-icon.is-record,
.qe-ca-tip-icon.is-new {
    height: auto;
    border-radius: 0;
    background: transparent;
}

.qe-ca-tip-icon.is-record.is-on {
    box-shadow: 0 0 0 3px #e53935;
    border-radius: 50%;
    animation: qe-ca-rec-pulse 1.2s ease-in-out infinite;
}

@keyframes qe-ca-rec-pulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.95); }
    50% { box-shadow: 0 0 0 6px rgba(229, 57, 53, 0.28); }
}

.qe-ca-tip-close {
    height: auto;
    color: transparent;
    font-size: 0;
    line-height: 0;
}

.qe-ca-tip-handle {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 10px;
    border-radius: 8px;
    background: #996a31;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
    cursor: grab;
}

.qe-ca-tip-handle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #996a31;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    transform: translate(-50%, -50%);
}

.qe-learn-root.qe-lang-ar .qe-ca-tip-handle {
    right: auto;
    left: 0;
}

#qeCaTooltip.qe-ca-tooltip.is-dragging .qe-ca-tip-handle {
    cursor: grabbing;
}

body.qe-ca-open #page_mapEven area,
body.qe-ca-open #page_mapOdd area {
    cursor: default;
}

body.qe-ca-open:not(.qe-ca-created) #page_mapEven area,
body.qe-ca-open:not(.qe-ca-created) #page_mapOdd area {
    cursor: pointer;
}

.qe-ca-selected-ayah {
    margin: 0 0 0.75rem;
    padding: 0.45rem 0.7rem;
    background: #f4ead8;
    border: 1px solid #ead9b8;
    border-radius: 8px;
    color: #5c3317;
    font-weight: 700;
}

.qe-ca-type-radios {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.qe-ca-type-opt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-weight: 600;
    color: #5c3317;
    cursor: pointer;
}

.qe-ca-type-opt input[type="radio"] {
    flex: 0 0 auto;
    margin: 0;
}

.qe-learn-root.qe-lang-ar .qe-ca-type-radios,
.qe-learn-root.qe-lang-ar .qe-ca-label {
    direction: rtl;
    text-align: right;
}

.qe-learn-root.qe-lang-ar .qe-ca-type-opt {
    flex-direction: row;
    direction: rtl;
    justify-content: flex-start;
}

.qe-learn-root.qe-lang-en .qe-ca-type-opt {
    flex-direction: row;
    direction: ltr;
}

.qe-ca-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
    font-weight: 600;
    color: #5c3317;
}

.qe-ca-student-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 280px;
    overflow: auto;
}

.qe-ca-student-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.35rem 0.45rem;
    border: 1px solid #ead9b8;
    border-radius: 8px;
}

.qe-ca-wait {
    font-weight: 700;
    color: #5c3317;
}

.qe-ca-label {
    font-weight: 700;
    color: #5c3317;
    margin: 0 0 0.5rem;
}

#qeCaRangeModal .samaa-repeat-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#qeCaRangeModal .samaa-repeat-mode-row[data-mode="surah"],
#qeCaRangeModal .samaa-repeat-mode-row[data-mode="juz"],
#qeCaRangeModal .samaa-repeat-mode-row[data-mode="rub"] {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    column-gap: 16px;
    margin: 0;
}

#qeCaRangeModal .samaa-repeat-mode-row[data-mode="surah"] > [class*="col-"],
#qeCaRangeModal .samaa-repeat-mode-row[data-mode="juz"] > [class*="col-"],
#qeCaRangeModal .samaa-repeat-mode-row[data-mode="rub"] > [class*="col-"] {
    flex: 1 1 0;
    max-width: 50%;
    width: auto;
    padding-left: 0;
    padding-right: 0;
}

#qeCaRangeModal .samaa-repeat-mode-choice {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-weight: 600;
    color: #5c3317;
    white-space: nowrap;
}

#qeCaRangeModal .js-ca-mode-select {
    width: 100%;
    min-height: 38px;
}

#qeCaRangeModal .js-ca-mode-select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#qeCaRangeModal .samaa-repeat-mode-row[data-mode="range"] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 4px 0 0;
}

#qeCaRangeModal .samaa-repeat-range-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    width: 100%;
}

#qeCaRangeModal .samaa-repeat-range-block h6 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #5c3317;
}

#qeCaRangeModal .samaa-repeat-range-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#qeCaRangeModal .samaa-repeat-range-fields .form-group {
    margin-bottom: 0;
}

#qeCaRangeModal .samaa-repeat-range-fields label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #5c3317;
}

@media (max-width: 560px) {
    #qeCaRangeModal .samaa-repeat-mode-row[data-mode="surah"],
    #qeCaRangeModal .samaa-repeat-mode-row[data-mode="juz"],
    #qeCaRangeModal .samaa-repeat-mode-row[data-mode="rub"] {
        flex-wrap: wrap;
    }

    #qeCaRangeModal .samaa-repeat-mode-row[data-mode="surah"] > [class*="col-"],
    #qeCaRangeModal .samaa-repeat-mode-row[data-mode="juz"] > [class*="col-"],
    #qeCaRangeModal .samaa-repeat-mode-row[data-mode="rub"] > [class*="col-"] {
        max-width: 100%;
        flex: 1 1 100%;
    }

    #qeCaRangeModal .samaa-repeat-range-grid {
        grid-template-columns: 1fr;
    }
}

/* Student live class: teacher minimize lock, assignment boundary, hifz cover, correction words */
.qe-classroom-stay-notice {
    position: fixed;
    top: 16px;
    left: 50%;
    z-index: 10900;
    max-width: min(440px, calc(100% - 32px));
    padding: 12px 16px;
    border-radius: 8px;
    background: #c62828;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translate(-50%, -12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.qe-classroom-stay-notice.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.qe-classroom-cmd-notice {
    position: fixed;
    top: 64px;
    left: 50%;
    z-index: 10900;
    max-width: min(440px, calc(100% - 32px));
    padding: 12px 16px;
    border-radius: 8px;
    background: #263238;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translate(-50%, -12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.qe-classroom-cmd-notice.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.qe-classroom-cmd-notice.is-rtl {
    direction: rtl;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

.qe-classroom-student-lock {
    position: fixed;
    inset: 0;
    z-index: 10790;
    background: transparent;
    cursor: not-allowed;
}

.qe-classroom-student-lock[hidden] {
    display: none !important;
}

.qe-live-bracket {
    position: absolute;
    z-index: 24;
    color: #d32f2f;
    font-weight: 800;
    font-size: 28px;
    line-height: 1;
    pointer-events: none;
    text-shadow: 0 0 2px #fff, 0 1px 2px rgba(0, 0, 0, 0.25);
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.qe-live-bracket-start {
    transform: translate(-30%, -15%);
}

.qe-live-bracket-end {
    transform: translate(-20%, -10%);
}

.qe-live-hifz-mask {
    position: absolute;
    z-index: 18;
    background: #000;
    pointer-events: none;
    box-sizing: border-box;
}

.qe-live-corr {
    position: absolute;
    z-index: 22;
    background: rgba(229, 57, 53, 0.48);
    border: 1.5px solid rgba(183, 28, 28, 0.95);
    border-radius: 2px;
    pointer-events: none;
    box-sizing: border-box;
}

.qe-ca-wordrow {
    position: absolute;
    z-index: 28;
    background: transparent;
    pointer-events: auto;
    cursor: text;
    touch-action: none;
}

.qe-ca-word {
    position: absolute;
    z-index: 29;
    box-sizing: border-box;
    border: 1px solid rgba(120, 120, 120, 0.55);
    background: transparent;
    pointer-events: none;
    cursor: text;
}

.qe-ca-hl {
    position: absolute;
    z-index: 30;
    box-sizing: border-box;
    background: rgba(244, 143, 143, 0.48);
    border: 1.5px solid rgba(211, 47, 47, 0.88);
    border-radius: 2px;
    pointer-events: auto;
    cursor: pointer;
    touch-action: none;
}

.qe-ca-hl.is-live {
    pointer-events: none;
}

.qe-incoming-call {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(30, 16, 7, 0.55);
    box-sizing: border-box;
}

.qe-incoming-call[hidden] {
    display: none !important;
}

.qe-incoming-card {
    position: relative;
    width: min(380px, 100%);
    padding: 28px 22px 20px;
    border-radius: 18px;
    background: #fdfaf5;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    text-align: center;
    box-sizing: border-box;
    font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif;
}

body.qe-lang-ar .qe-incoming-card {
    direction: rtl;
}

body.qe-lang-en .qe-incoming-card {
    direction: ltr;
}

.qe-incoming-badge {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 4px auto 14px;
}

.qe-incoming-pulse {
    position: absolute;
    left: 0;
    top: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(46, 125, 50, 0.28);
    opacity: 0;
    transform-origin: center center;
    animation: qe-incoming-pulse 1.6s ease-out infinite;
    pointer-events: none;
}

.qe-incoming-pulse.is-delayed {
    animation-delay: 0.8s;
}

@keyframes qe-incoming-pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.75);
        opacity: 0;
    }
}

.qe-incoming-avatar {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    margin: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(172deg, #1e1007 0%, #5c3317 100%);
    color: #f7e7c6;
}

.qe-incoming-avatar .fi {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    font-size: 30px;
    line-height: 1;
}

.qe-incoming-avatar .fi::before {
    display: block;
    line-height: 1;
}

.qe-incoming-kicker {
    margin: 0 0 4px;
    color: #816225;
    font-size: 13px;
    font-weight: 700;
}

.qe-incoming-title {
    margin: 0 0 6px;
    color: #1e1007;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

.qe-incoming-sub {
    margin: 0 0 16px;
    color: #5c3317;
    font-size: 14px;
    line-height: 1.5;
}

.qe-incoming-error {
    margin: 0 0 12px;
    color: #b42318;
    font-size: 13px;
    line-height: 1.4;
}

.qe-incoming-error[hidden] {
    display: none !important;
}

.qe-incoming-actions {
    display: flex;
    gap: 10px;
}

.qe-incoming-btn {
    flex: 1 1 0;
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
}

.qe-incoming-btn.is-reject {
    background: #c62828;
}

.qe-incoming-btn.is-reject:hover,
.qe-incoming-btn.is-reject:focus {
    background: #b71c1c;
    outline: none;
}

.qe-incoming-btn.is-accept {
    background: #2e7d32;
}

.qe-incoming-btn.is-accept:hover,
.qe-incoming-btn.is-accept:focus {
    background: #1b5e20;
    outline: none;
}

.qe-incoming-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}



