.course-assessment-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.course-assessment-modal.is-visible {
    display: flex;
}

.course-assessment-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
}

.course-assessment-modal__dialog {
    position: relative;
    width: 470px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 5px;
    box-shadow: 0 18px 48px rgba(7, 10, 14, 0.22);
}

.course-assessment-modal__header {
    min-height: 53px;
    background: #3431C6;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 44px;
}

.course-assessment-modal__header h2 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
}

.course-assessment-modal__close {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.course-assessment-modal__body {
    display: flex;
    background: #fff;
    flex-direction: column;
    justify-content: center;
    padding: 22px 32px 30px;
    overflow-x: hidden;
}

.course-assessment-modal__body p {
    margin: 0 auto 28px;
    max-width: 360px;
    color: #070A0E;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.45;
    text-align: center;
}

.external-course-organization-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.external-course-organization-label {
    color: #192335;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.external-course-organization-dropdown {
    position: relative;
}

.external-course-organization-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid #e6e3f1;
    border-radius: 6px;
    background: #fff;
    color: #192335;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
}

.external-course-organization-toggle:focus,
.external-course-organization-toggle.is-open {
    outline: 0;
    border-color: var(--color-primary, #2f57ef);
    box-shadow: 0 0 0 0.2rem rgba(47, 87, 239, 0.12);
}

.external-course-organization-arrow {
    width: 9px;
    height: 9px;
    border-right: 2px solid #6b7385;
    border-bottom: 2px solid #6b7385;
    transform: rotate(45deg);
    margin: -4px 4px 0 16px;
    flex: 0 0 auto;
}

.external-course-organization-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 5;
    max-height: 220px;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e6e3f1;
    border-radius: 6px;
    box-shadow: 0 12px 30px rgba(25, 35, 53, 0.14);
    list-style: none;
}

.external-course-organization-menu.is-open { display: block; }

.external-course-organization-option {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #192335;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
}

.external-course-organization-option:hover,
.external-course-organization-option:focus {
    outline: 0;
    background-color: rgba(47, 87, 239, 0.08);
    color: var(--color-primary, #2f57ef);
}

.external-course-organization-option.is-selected {
    background-color: rgba(47, 87, 239, 0.12);
    color: var(--color-primary, #2f57ef);
    font-weight: 700;
}

.external-course-organization-help {
    color: #6b7385;
    font-size: 13px;
    line-height: 1.45;
}

.course-assessment-modal__validation {
    min-height: 20px;
    margin: 6px 0 14px !important;
    color: #dc3545;
    font-size: 13px !important;
    line-height: 1.4 !important;
    text-align: left !important;
}

.course-assessment-modal__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.course-assessment-modal__actions--single {
    grid-template-columns: 1fr;
}

.course-assessment-modal__btn {
    min-width: 0;
    min-height: 46px;
    border-radius: 6px;
    border: 1px solid #3431C6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.course-assessment-modal__btn--outline {
    background: #fff;
    color: #3431C6;
}

.course-assessment-modal__btn--outline:hover {
    background: #F0EFFF;
    color: #3431C6;
}

.course-assessment-modal__btn--primary {
    background: #3431C6;
    color: #fff;
}

.course-assessment-modal__btn--primary:hover {
    background: #2924ad;
    border-color: #2924ad;
    color: #fff;
}

@media (prefers-reduced-motion: no-preference) {
    .course-assessment-modal.is-visible .course-assessment-modal__backdrop {
        animation: courseCustomPopupBackdropIn 180ms ease-out both;
    }

    .course-assessment-modal.is-visible .course-assessment-modal__dialog {
        animation: courseCustomPopupDialogIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }
}

@keyframes courseCustomPopupBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes courseCustomPopupDialogIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
