/* Модалка выбора формы обучения и филиала перед вступительным онлайн-тестом */

.intro-test-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.intro-test-modal.hidden {
    display: none;
}

/* Страховка от глобальных сбросов [hidden] в стилях сайта */
.intro-test-hint[hidden] {
    display: none;
}

body.intro-test-modal-open {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

.intro-test-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(23, 33, 61, 0.55);
}

.intro-test-dialog {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 100%;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.intro-test-dialog--open {
    opacity: 1;
    transform: translateY(0);
}

.intro-test-card {
    position: relative;
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    box-sizing: border-box;
    box-shadow: 0 24px 60px rgba(23, 33, 61, 0.25);
}

.intro-test-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.intro-test-close-icon,
.intro-test-close-icon::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    background: #8b93a7;
    content: '';
}

.intro-test-close-icon {
    transform: translate(-50%, -50%) rotate(45deg);
}

.intro-test-close-icon::after {
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.intro-test-close:hover .intro-test-close-icon,
.intro-test-close:hover .intro-test-close-icon::after {
    background: #17213d;
}

.intro-test-header {
    margin-bottom: 28px;
    padding-right: 30px;
}

.intro-test-title {
    margin: 0 0 12px;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
    color: #17213d;
}

.intro-test-subtitle {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: #6b7590;
}

.intro-test-field {
    margin-bottom: 22px;
}

.intro-test-label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #17213d;
}

.intro-test-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.intro-test-radio-option {
    position: relative;
    flex: 1 1 140px;
    margin: 0;
    padding: 14px 18px;
    border: 1px solid #dfe3ec;
    border-radius: 14px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.intro-test-radio-option:hover {
    border-color: #7b61ff;
}

.intro-test-radio-option--active {
    border-color: #7b61ff;
    background: rgba(123, 97, 255, 0.08);
}

.intro-test-radio-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.intro-test-radio-label {
    font-size: 15px;
    font-weight: 600;
    color: #17213d;
}

.intro-test-select {
    display: block;
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid #dfe3ec;
    border-radius: 14px;
    background: #fff;
    box-sizing: border-box;
    font-size: 15px;
    color: #17213d;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.intro-test-select:focus {
    outline: none;
    border-color: #7b61ff;
}

.intro-test-select:disabled {
    background: #f5f6fa;
    color: #8b93a7;
    cursor: default;
}

.intro-test-error {
    display: none;
    margin-top: 8px;
    font-size: 13px;
    color: #ff5858;
}

.intro-test-error--visible {
    display: block;
}

.intro-test-hint {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: #6b7590;
}

.intro-test-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.intro-test-button {
    flex: 1 1 auto;
    min-height: 52px;
    padding: 14px 24px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.intro-test-button--primary {
    background: #7b61ff;
    color: #fff;
}

.intro-test-button--primary:hover {
    background: #6a4dff;
}

@media (max-width: 575px) {
    .intro-test-modal {
        padding: 12px;
    }

    .intro-test-card {
        padding: 28px 20px;
        border-radius: 18px;
    }

    .intro-test-title {
        font-size: 22px;
    }

    .intro-test-actions {
        flex-direction: column;
    }
}
