.student-test-profile-switcher[hidden] {
    display: none !important;
}

.student-test-profile-switcher,
.student-test-profile-switcher * {
    box-sizing: border-box;
}

.student-test-profile-switcher__toggle {
    position: fixed;
    top: 220px;
    right: 8px;
    z-index: 2060;
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(145deg, #0875d1, #0057a8);
    color: #fff;
    box-shadow: 0 12px 25px rgba(0, 71, 153, .28);
    transition: transform .18s ease, box-shadow .18s ease;
}

.student-test-profile-switcher__toggle::after {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 6px;
    height: 6px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 50%;
    background: #f4b41a;
    content: '';
}

.student-test-profile-switcher__toggle:hover,
.student-test-profile-switcher__toggle.is-open {
    transform: translateX(-3px);
    box-shadow: 0 14px 28px rgba(0, 71, 153, .36);
}

.student-test-profile-switcher__toggle i {
    width: 19px;
    height: 19px;
}

.student-test-profile-switcher__backdrop {
    position: fixed;
    inset: 0;
    z-index: 2043;
    visibility: hidden;
    background: rgba(15, 23, 42, .22);
    opacity: 0;
    transition: opacity .2s ease, visibility .2s ease;
}

.student-test-profile-switcher__backdrop.is-open {
    visibility: visible;
    opacity: 1;
}

.student-test-profile-switcher__panel {
    position: fixed;
    top: 116px;
    right: 24px;
    z-index: 2044;
    display: flex;
    width: min(380px, calc(100vw - 32px));
    max-height: calc(100vh - 140px);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #d9e7f5;
    border-radius: 18px;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 24px 60px rgba(15, 52, 96, .24);
    opacity: 0;
    pointer-events: none;
    transform: translateX(calc(100% + 48px));
    transition: opacity .2s ease, transform .22s ease;
}

.student-test-profile-switcher__panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.student-test-profile-switcher__header,
.student-test-profile-switcher__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px;
}

.student-test-profile-switcher__header {
    border-bottom: 1px solid #e5edf6;
    background: linear-gradient(135deg, #f7fbff, #eef6ff);
}

.student-test-profile-switcher__title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.student-test-profile-switcher__title-icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #dceeff;
    color: #0875d1;
}

.student-test-profile-switcher__title-icon i {
    width: 18px;
    height: 18px;
}

.student-test-profile-switcher__title strong,
.student-test-profile-switcher__title small {
    display: block;
}

.student-test-profile-switcher__title strong {
    font-size: 15px;
    font-weight: 800;
}

.student-test-profile-switcher__title small {
    margin-top: 2px;
    color: #64748b;
    font-size: 11px;
}

.student-test-profile-switcher__close {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dce7f2;
    border-radius: 10px;
    background: #fff;
    color: #475569;
}

.student-test-profile-switcher__close i {
    width: 17px;
    height: 17px;
}

.student-test-profile-switcher__body {
    display: grid;
    gap: 14px;
    padding: 15px 16px;
    overflow-y: auto;
}

.student-test-profile-switcher__section {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 13px;
    border: 1px solid #e5edf6;
    border-radius: 14px;
    background: #fbfdff;
}

.student-test-profile-switcher__section h2 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #00337c;
    font-size: 12px;
    font-weight: 800;
}

.student-test-profile-switcher__section h2 i {
    width: 15px;
    height: 15px;
}

.student-test-profile-switcher__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.student-test-profile-switcher__field {
    display: grid;
    min-width: 0;
    gap: 5px;
    margin: 0;
}

.student-test-profile-switcher__field > span {
    color: #475569;
    font-size: 10.5px;
    font-weight: 700;
}

.student-test-profile-switcher__field select {
    width: 100%;
    height: 39px;
    padding: 0 10px;
    border: 1px solid #cfdeed;
    border-radius: 10px;
    outline: 0;
    background: #fff;
    color: #172033;
    font-size: 12px;
    font-weight: 600;
}

.student-test-profile-switcher__field select.is-customized {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

.student-test-profile-switcher__select-trigger {
    position: relative;
    display: block;
    width: 100%;
    height: 39px;
    padding: 0 34px 0 10px;
    overflow: hidden;
    border: 1px solid #cfdeed;
    border-radius: 10px;
    background: linear-gradient(180deg, #fff 0%, #f7fbff 100%);
    color: #172033;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 39px;
    text-align: start;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

html[dir="rtl"] .student-test-profile-switcher__select-trigger {
    padding-right: 10px;
    padding-left: 34px;
}

.student-test-profile-switcher__select-trigger::after {
    position: absolute;
    top: 50%;
    right: 13px;
    width: 7px;
    height: 7px;
    border-right: 2px solid #07569e;
    border-bottom: 2px solid #07569e;
    content: '';
    transform: translateY(-65%) rotate(45deg);
    transition: transform .18s ease;
}

html[dir="rtl"] .student-test-profile-switcher__select-trigger::after {
    right: auto;
    left: 13px;
}

.student-test-profile-switcher__select-trigger:hover:not(:disabled),
.student-test-profile-switcher__select-trigger:focus-visible,
.student-test-profile-switcher__select-trigger[aria-expanded="true"] {
    border-color: #1384e3;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(19, 132, 227, .13);
    outline: 0;
}

.student-test-profile-switcher__select-trigger[aria-expanded="true"]::after {
    transform: translateY(-20%) rotate(225deg);
}

.student-test-profile-switcher__select-trigger:disabled {
    border-color: #e1e8ef;
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.student-test-profile-switcher__select-menu {
    position: fixed;
    z-index: 2050;
    padding: 5px;
    overflow-y: auto;
    border: 1px solid #b9d2e9;
    border-radius: 11px;
    background: rgba(255, 255, 255, .99);
    box-shadow: 0 18px 42px rgba(0, 51, 124, .22), 0 2px 8px rgba(15, 23, 42, .08);
    scrollbar-width: thin;
    scrollbar-color: #b8cde1 transparent;
}

.student-test-profile-switcher__select-option {
    position: relative;
    display: block;
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #17324f;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
    text-align: start;
    cursor: pointer;
}

.student-test-profile-switcher__select-option:hover,
.student-test-profile-switcher__select-option:focus-visible {
    background: #edf6ff;
    color: #004b98;
    outline: 0;
}

.student-test-profile-switcher__select-option.is-selected {
    padding-inline-end: 30px;
    background: #e6f2ff;
    color: #005eb8;
}

.student-test-profile-switcher__select-option.is-selected::after {
    position: absolute;
    top: 50%;
    inset-inline-end: 10px;
    color: #0875d1;
    content: '✓';
    font-size: 14px;
    font-weight: 800;
    transform: translateY(-50%);
}

.student-test-profile-switcher__field select:focus {
    border-color: #1384e3;
    box-shadow: 0 0 0 3px rgba(19, 132, 227, .13);
}

.student-test-profile-switcher__field select:disabled {
    background: #f1f5f9;
    color: #94a3b8;
}

.student-test-profile-switcher__footer {
    min-height: 64px;
    border-top: 1px solid #e5edf6;
    background: #fff;
}

.student-test-profile-switcher__save {
    display: inline-flex;
    min-width: 104px;
    height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #0875d1, #0057a8);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.student-test-profile-switcher__save:disabled {
    cursor: wait;
    opacity: .65;
}

.student-test-profile-switcher__save i {
    width: 15px;
    height: 15px;
}

.student-test-profile-switcher__status {
    min-width: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .student-test-profile-switcher__toggle {
        top: auto;
        /* Keep account switching at the top of the page; the assistant owns
           the bottom floating action slot. */
        top: calc(var(--student-header-height, 68px) + 14px);
        bottom: auto;
        right: 12px;
        width: 42px;
        height: 42px;
        border-radius: 13px;
        opacity: 1;
    }

    .student-test-profile-switcher__toggle i {
        width: 15px;
        height: 15px;
    }

    .student-test-profile-switcher__panel {
        top: auto;
        top: calc(var(--student-header-height, 68px) + 14px);
        bottom: auto;
        right: 12px;
        width: calc(100vw - 24px);
        max-height: calc(100vh - 110px);
    }
}

@media (max-width: 420px) {
    .student-test-profile-switcher__row {
        grid-template-columns: 1fr;
    }
}
