/* Обновленные стили для модального окна с фиксированным заголовком */

/* Контейнер модального окна с измененной структурой */
.modal-test-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 80%;
    max-width: 1000px;
    max-height: 80vh;
    background-color: #fff;
    border-radius: 16px;
    z-index: 1001;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Убираем общий скролл контейнера */
}

.modal-test-container.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Фиксированный заголовок */
.test-modal-header {
    position: sticky;
    top: 0;
    margin-left: 1px;
    margin-right: 1px;
    background-color: #fff;
    padding: 32px 32px 0;
    z-index: 1003;
    border-radius: 25px 25px 0 0;
    /* Добавляем тень для визуального отделения при скролле */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Кнопка закрытия теперь в header */
.modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 1004;
    transition: transform 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-close::before,
.modal-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-dark-blue-900, #002248);
    border-radius: 1px;
}

.modal-close::before {
    transform: rotate(45deg);
}

.modal-close::after {
    transform: rotate(-45deg);
}

/* Стили заголовка */
.test-modal-title {
    color: #212121;
    font-family: var(--h5-font-family, "Montserrat", sans-serif);
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 15px;
    padding-right: 40px; /* Отступ для кнопки закрытия */
}

/* Контейнер для прокрутки содержимого */
.test-modal-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /*padding: 0 30px 30px;*/
    padding-left: 24px;
    padding-right: 24px;
    margin-bottom: 80px;
}

/* Стили содержимого */
.test-modal-section {
    flex: 1;
    flex-direction: column;
    gap: 24px;
    margin-top: 16px;
    margin-bottom: 24px;
}
.test-modal-section.questions {
    gap: 16px;
}

.test-modal-section-title {
    color: var(--test-font-color, #212121);
    font-family: var(--h3-font-family, "Montserrat", sans-serif), serif;
    font-size: 18px;
    font-weight: 600;
    margin-top: 16px;
}

.topics-chips-container {
    display: flex;
    flex-wrap: wrap;
    margin-top: 16px;
    gap: 12px;
    width: 100%;
}
.topic-chip {
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;

    background: var(--neutral-800-300, #f6efe4);
    color: var(--test-font-color, #212121);

    font-family: var(--button-font-family, "Montserrat", sans-serif);
    font-size: 14px;
    font-weight: 500;
}
.topic-chip:hover {
    background: var(--extra-selected-text-400, #FFB872);
    color: var(--white, #ffffff);

}
.topic-chip.selected {
    background: var(--extra-selected-text-800-900, #ff8d00);
    color: var(--white, #ffffff);
}
.topic-chip.selected:hover {
    background: var(--extra-selected-text-400, #FFB872);
    color: var(--test-font-color, #212121);
}

.current-question-row {
    display: flex;
    width: 100%;
    gap: 8px; /* spacing between columns */
    align-items: center; /* vertically center content */
}
.current-question-col-fixed {
    flex-shrink: 0; /* don't shrink */
    width: 160px; /* specific width */
    /*background: #f0f0f0;*/
    border-radius: 8px;
}
.current-question-col-flexible {
    flex: 1; /* takes all available space */
    background: #E7EEF7;
    height: 2px;
}
.current-question-col-middle {
    flex-shrink: 0;
    width: auto; /* specific width for middle column */
    border-radius: 8px;
}

.current-question-number-bg {
    flex-shrink: 0;
    background-color: var(--extra-selected-text-800-900, #ff8d00);
    width: 50px;
    height: 50px;
    border-radius: 16px;
    position: relative;
    overflow: visible;
    aspect-ratio: 1;
}
.current-question-number-bg.current {
    background-color: var(--extra-selected-text-800-900, #ff8d00);
    margin-left: 110px;
}
.current-question-number-bg.total {
    background-color: #E7EEF7;
    margin-right: 110px;
}
.divider-svg {
    height: 1px;
    width: 100%;
}

.current-question-number-text {
    color: var(--white, #ffffff);
    text-align: center;
    font-family: var(--no-english-card-number-font-family, "Montserrat", sans-serif);
    font-size: var(--no-english-card-number-font-size, 20px);
    line-height: var(--no-english-card-number-line-height, 100%);
    font-weight: var(--no-english-card-number-font-weight, 600);

    align-self: center;
    overflow: visible;
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
}
.current-question-number-text.current {
    color: var(--white, #ffffff);

    /* animation */
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.test-modal-question-title.current.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}
.current-question-number-text.total {
    color: var(--primary-dark-blue-900, #002248);
}

.test-modal-question-title {
    color: var(--primary-dark-blue-900, #002248);
    font-family: var(--h3-font-family, "Montserrat", sans-serif), serif;
    font-size: 24px;
    font-weight: 700;
    margin-top: 16px;

    /* animation */
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.test-modal-question-title.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

.test-modal-question-answer_box {
    margin-top: 16px;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;

    /* animation */
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.test-modal-question-answer_box.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

.test-modal-question-type {
    color: var(--primary-dark-blue-900, #002248);
    font-family: var(--h3-font-family, "Montserrat", sans-serif), serif;
    font-size: 18px;
    font-weight: 600;
}

.variants-checkboxes-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.variant-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s;
    height: 54px;
}

.variant-checkbox-item:hover {
    background: #f5f5f5;
}

/* Hide default radio button */
.variant-checkbox-item input[type="radio"] {
    display: none;
}

/* Custom checkbox style */
.variant-checkbox-item .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #002248;
    border-radius: 50%; /* Changed from 4px to 50% for circle */
    position: relative;
    transition: all 0.3s;
}

/* Checked state */
.variant-checkbox-item input[type="radio"]:checked + .checkmark {
    border-color: #002248;
    background: transparent; /* Remove background */
}

/* Checkmark icon */
.variant-checkbox-item input[type="radio"]:checked + .checkmark::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: #002248; /* Colored dot instead of white */
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.variant-checkbox-item label {
    cursor: pointer;
    user-select: none;

    color: var(--primary-dark-blue-900, #002248);
    font-family: var(--no-english-card-number-font-family, "Montserrat", sans-serif);
    font-size: 16px;
    line-height: 100%;
    font-weight: 400;

    /* animation */
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.variant-checkbox-item label.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

.frame-answer-input-area {
    flex-shrink: 0;
    width: 100%;
    height: 200px;
    position: relative;
}
.answer-input-text-area-border {
    border-radius: 12px;
    border-style: solid;
    border-color: rgb(74, 74, 141);
    border-width: 1px;
    padding: 16px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    height: 180px;
    position: absolute;
    left: 0;
    overflow: hidden;
    box-sizing: border-box;
}
.answer-input-text-area-border.bg {
    border-color: transparent;
    border-radius: 16px;
    background-color: rgb(230, 238, 246);
}
.input-area-dark {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    /*height: 100%;*/
    margin-top: 4px;
    height: calc(100% - 4px);
    color: var(--primary-dark-blue-900, #002248);
    text-align: left;
    font-family: var(--body-2-font-family, "Montserrat", sans-serif);
    font-size: 16px;
    line-height: 130%;
    font-weight: 400;
    position: relative;
}
.input-area-dark.full-height {
    margin-top: 0;
    height: 100%;
}
.input-area-dark .bg {
    background: #E6EEF6;
}
.input-area-dark::placeholder {
    color: rgba(44, 44, 98, 0.5); /* Цвет placeholder */
    opacity: 1; /* Firefox требует этой настройки для правильного отображения цвета */
}
/* Для старых версий браузеров нужно добавить вендорные префиксы */
.input-area-dark::-webkit-input-placeholder { /* WebKit, Blink, Edge */
    color: rgba(44, 44, 98, 0.5);
}
.input-area-dark:-moz-placeholder { /* Mozilla Firefox 4-18 */
    color: rgba(44, 44, 98, 0.5);
    opacity: 1;
}
.input-area-dark::-moz-placeholder { /* Mozilla Firefox 19+ */
    color: rgba(44, 44, 98, 0.5);
    opacity: 1;
}
.input-area-dark:-ms-input-placeholder { /* Internet Explorer 10-11 */
    color: rgba(44, 44, 98, 0.5);
}
.input-area-dark::-ms-input-placeholder { /* Microsoft Edge */
    color: rgba(44, 44, 98, 0.5);
}
.char-counter {
    position: absolute;
    bottom: 0px;
    right: 0px;
    color: #212121;
    font-size: 14px;
    font-family: var(--body-2-font-family, "Montserrat", sans-serif);
    pointer-events: none; /* Click-through to textarea */
}
/* Optional: change color when near limit */
.char-counter.warning {
    color: #ff9800;
}
.char-counter.limit {
    color: #f44336;
}

.form-client-data {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: flex-start;
    justify-content: flex-start;
    flex-shrink: 0;
    width: 100%;
    position: relative;
    /*margin-top: 16px;*/
}
.form-client-data-inputs {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    justify-content: flex-start;
    align-self: stretch;
    flex-shrink: 0;
    position: relative;
}
.frame-client-data-input-text {
    align-self: stretch;
    flex-shrink: 0;
    height: auto;
    position: relative;
    width: 100%;
}
.frame-client-data-input-text-field {
    border-radius: 16px;
    background-color: rgb(230, 238, 246);
    padding: 12px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 56px;
    position: relative;
    box-sizing: border-box;
}
.frame-client-data-input-text-field.error {
    border-radius: 16px;
    border-color: var(--error-color, #d32f2f);
    border-style: solid;
    border-width: 1px;
}
.input-field {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    height: 100%;
    color: var(--primary-dark-blue-900, #002248);
    font-family: var(--body-2-font-family, "Montserrat", sans-serif);
    font-size: 16px;
    line-height: 100%;
    font-weight: 400;
    position: relative;
    z-index: 2;
    padding-left: 8px;
    padding-right: 8px;
}
.input-field::placeholder {
    color: rgba(0, 34, 72, 0.5); /* Цвет placeholder */
    opacity: 1; /* Firefox требует этой настройки для правильного отображения цвета */
}
/* Для старых версий браузеров нужно добавить вендорные префиксы */
.input-field::-webkit-input-placeholder { /* WebKit, Blink, Edge */
    color: rgba(0, 34, 72, 0.5);
}
.input-field:-moz-placeholder { /* Mozilla Firefox 4-18 */
    color: rgba(0, 34, 72, 0.5);
    opacity: 1;
}
.input-field::-moz-placeholder { /* Mozilla Firefox 19+ */
    color: rgba(0, 34, 72, 0.5);
    opacity: 1;
}
.input-field:-ms-input-placeholder { /* Internet Explorer 10-11 */
    color: rgba(0, 34, 72, 0.5);
}
.input-field::-ms-input-placeholder { /* Microsoft Edge */
    color: rgba(0, 34, 72, 0.5);
}

.floating-placeholder {
    position: absolute;
    left: 12px;
    top: 4px;
    pointer-events: none;
    transition: all 0.2s ease;

    font-family: "Montserrat", sans-serif;
    font-size: 12px;
    color: rgba(0, 34, 72, 0.5);
    display: none;
    z-index: 3;
}
.floating-placeholder.changing {
    opacity: 0;
    transform: scale(0.9);
}

.current-question-from-text {
    color: var(--primary-dark-blue-900, #002248);
    text-align: center;
    font-family: var(--no-english-card-number-font-family, "Montserrat", sans-serif);
    font-size: 18px;
    line-height: 100%;
    font-weight: 400;

    align-self: center;
}

.test_select_topic_note {
    color: var(--test-font-color, #212121);
    font-family: var(--body-3-font-family, "Montserrat", sans-serif);
    font-size: 16px;
    line-height: 1.6;
    /*margin-top: 24px;*/
}

.test-modal-section p {
    color: var(--extra-dark-purple, #2c2c62);
    font-family: var(--body-3-font-family, "Montserrat", sans-serif);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.test-modal-list {
    padding-left: 15px;
    margin-bottom: 15px;
}

.test-modal-list li {
    color: var(--extra-dark-purple, #2c2c62);
    font-family: var(--body-3-font-family, "Montserrat", sans-serif);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 8px;
    position: relative;
    padding-left: 22px;
}

.test-modal-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background-color: var(--primary-dark-blue-900, #002248);
    border-radius: 50%;
}

.test-modal-list li strong {
    color: var(--dark-purple, #4a4a8d);
    font-weight: 700;
}

.test-modal-link {
    color: var(--primary-dark-blue-900, #002248);
    text-decoration: none;
    border-bottom: 1px solid var(--primary-dark-blue-900, #002248);
    transition: all 0.3s ease;
}

.test-modal-link:hover {
    color: #5a5ad9;
    border-bottom-color: #5a5ad9;
}

/* Стилизация полосы прокрутки в модальном окне */
.test-modal-content::-webkit-scrollbar {
    width: 8px;
}

.test-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.test-modal-content::-webkit-scrollbar-thumb {
    /*background: var(--primary-dark-blue-900, #002248);*/
    background: #FFB872;
    border-radius: 4px;
}

.test-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--extra-selected-text-800-900, #ff8d00);
}

.checkbox-row-info {
    display: flex;
    flex-direction: row;
    width: 100%;
    margin-top: 8px;
    gap: 15px;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    position: relative;
}

.form-bonuses {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: flex-start;
    justify-content: flex-start;
    flex-shrink: 0;
    width: 100%;
    position: relative;
    margin-top: 16px;
}

.cards-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.mystery-card {
    width: 150px;
    height: 200px;
    background: linear-gradient(135deg, #FFB872 0%, #FF8D00 100%);
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mystery-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.mystery-card::before {
    content: "?";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.mystery-card.selecting {
    animation: shake 0.5s ease-in-out;
}

.mystery-card.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

.mystery-card.selected {
    width: 250px;
    height: 200px;
    background: linear-gradient(135deg, #f6efe4 0%, #FFB872 100%);
    cursor: default;
    animation: reveal 0.6s ease forwards;
}

.mystery-card.selected::before {
    display: none;
}

.bonus-content {
    display: none;
    padding: 16px;
    text-align: center;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mystery-card.selected .bonus-content {
    display: flex;
    animation: showContent 0.6s ease 0.3s forwards;
    opacity: 0;
}

.bonus-icon {
    font-size: 48px;
    /*margin-bottom: 16px;*/
}

.bonus-title {
    color: var(--primary-dark-blue-900, #002248);
    font-family: var(--text-font-family, "Montserrat", sans-serif);
    font-size: 24px;
    line-height: 130%;
    font-weight: 600;
    margin-bottom: 10px;
}

.bonus-description {
    color: var(--textdark, #2c2c62);
    font-family: var(--text-font-family, "Montserrat", sans-serif);
    font-size: 16px;
    line-height: 100%;
    font-weight: 400;
}
.bonus-description.hidden {
    display: none;
}

.select-bonus-instruction {
    color: var(--textdark, #2c2c62);
    text-align: left;
    font-family: var(--text-font-family, "Montserrat", sans-serif);
    line-height: 100%;
    font-weight: 400;
}

.bonus-button {
    background: var(--primary-dark-blue-900, #002248);
    border-radius: 16px;
    height: 44px;
    width: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}
.teacher-button {
    background: var(--primary-dark-blue-900, #002248);
    border-radius: 16px;
    height: 44px;
    width: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}
.teacher-button2 {
    background: var(--primary-dark-blue-900, #002248);
    border-radius: 16px;
    height: 44px;
    width: auto;
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}
.manager-button {
    background: var(--primary-dark-blue-900, #002248);
    border-radius: 16px;
    height: 44px;
    width: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}
.manager-button2 {
    background: var(--primary-dark-blue-900, #002248);
    border-radius: 16px;
    height: 44px;
    width: 100%;
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
    margin-top: 16px;
}
.bonus-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(114, 114, 236, 0.3);
}
.bonus-button-text {
    padding: 0 24px;
    color: var(--white, #ffffff);
    text-align: center;
    font-family: var(--button-font-family, "Montserrat", sans-serif);
    font-size: var(--button-font-size, 14px);
    line-height: var(--button-font-height, 100%);
    font-weight: var(--button-font-weight, 600);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(0.5);
    }
}

@keyframes reveal {
    0% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(90deg);
    }
    100% {
        transform: rotateY(0deg);
    }
}

@keyframes showContent {
    to {
        opacity: 1;
    }
}

.result-container {
    margin-top: 16px;
    padding-left: 32px;
    padding-right: 32px;
    padding-bottom: 8px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 0.8s ease 0.3s;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.result-title {
    margin-bottom: 15px;
    animation: fadeIn 0.6s ease 0.4s both;
    color: var(--primary-dark-blue-900, #002248);
    font-family: var(--h3-font-family, "Montserrat", sans-serif), serif;
    font-size: 32px;
    font-weight: bold;
}

.result-percentage {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    animation: fadeIn 0.6s ease 0.5s both;
    color: var(--textdark, #2c2c62);
    font-family: var(--h3-font-family, "Montserrat", sans-serif), serif;
}
.result-percentage-card {
    font-size: 48px;
    font-weight: bold;
    animation: fadeIn 0.6s ease 0.5s both;
    color: var(--textdark, #2c2c62);
    font-family: var(--h3-font-family, "Montserrat", sans-serif), serif;
}
.result-percentage-card2 {
    font-size: 36px;
    font-weight: bold;
    animation: fadeIn 0.6s ease 0.5s both;
    color: var(--textdark, #2c2c62);
    font-family: var(--h3-font-family, "Montserrat", sans-serif), serif;
    display: none;

    margin-bottom: 4px;
    vertical-align: middle; /* align with surrounding text */
}

.result-description {
    font-size: 16px;
    line-height: 1.6;
    color: #212121;
    margin-bottom: 30px;
    animation: fadeIn 0.6s ease 0.6s both;
    font-family: var(--h3-font-family, "Montserrat", sans-serif), serif;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Progress bar */
.progress-container {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
}

.progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
    animation: fillProgress 1.5s ease 0.3s;
}

@keyframes fillProgress {
    from { width: 0; }
}

/* Result level colors */
.result-container.veryBad .result-title { color: #d32f2f; }
.result-container.veryBad .result-percentage { color: #d32f2f; }
.result-container.veryBad .progress-bar { background: linear-gradient(90deg, #d32f2f, #f44336); }

.result-container.bad .result-title { color: #f57c00; }
.result-container.bad .result-percentage { color: #f57c00; }
.result-container.bad .progress-bar { background: linear-gradient(90deg, #f57c00, #ff9800); }

.result-container.good .result-title { color: #1976d2; }
.result-container.good .result-percentage { color: #1976d2; }
.result-container.good .progress-bar { background: linear-gradient(90deg, #1976d2, #2196f3); }

.result-container.veryGood .result-title { color: #388e3c; }
.result-container.veryGood .result-percentage { color: #388e3c; }
.result-container.veryGood .progress-bar { background: linear-gradient(90deg, #388e3c, #4caf50); }


.selected-bonus-container {
    background: white;
    border-radius: 16px;
    padding: 16px;
    width: 100%;
    /*margin-top: 16px;*/
    margin-top: -8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.6s ease;

    display: flex;
    gap: 24px;
    align-items: center; /* Vertically center all columns */
}
.selected-bonus-col-fixed-left {
    flex-shrink: 0;
    width: 48px; /* Specific width */
}
.selected-bonus-col-flexible {
    flex: 1; /* Takes all available space */
}
.selected-bonus-col-auto-right {
    flex-shrink: 0;
    width: auto; /* Width based on content */
    text-align: center;
}

.selected-teacher-container {
    background: white;
    border-radius: 16px;
    padding: 16px;
    width: 100%;
    /*margin-top: 16px;*/
    margin-top: -8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.6s ease;

    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 24px;
}
.selected-teacher-info {
     width: 100%;
     display: flex;
     gap: 24px;
     align-items: center; /* Vertically center all columns */
 }
.selected-teacher-feedback {
    width: 100%;
    display: flex;
    overflow-x: hidden;
}
.teacher-img {
    flex-shrink: 0;
    width: 60px; /* Specific width */
    height: 60px; /* Specific width */
    border-radius: 16px;
    display: block;
    object-fit: cover;
}

.test-buttons {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: auto;
    padding: 24px;

    /* Add flex properties */
    display: flex;
    flex-direction: row;
    gap: 16px; /* spacing between columns */
    align-items: center; /* vertically center content */
}
.test-buttons-note {
    flex: 1; /* Takes all available space */
}
.test-buttons-note-text {
    width: 100%; /* Takes all available space */

    color: var(--error-color, #d32f2f);
    font-family: var(--body-3-font-family, "Montserrat", sans-serif);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 600;
}
.test-button-next {
    background: var(--extra-selected-text-800-900, #ff8d00);
    border-radius: 16px;
    height: 44px;
    width: 250px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}
.test-button-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 141, 0, 0.3);
}
.test-button-next-text {
    color: var(--white, #ffffff);
    text-align: center;
    font-family: var(--button-font-family, "Montserrat", sans-serif);
    font-size: var(--button-font-size, 14px);
    line-height: var(--button-font-height, 100%);
    font-weight: var(--button-font-weight, 600);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Styles 1300px */
@media screen and (max-width: 1300px) {
    /* no any changes */
}

/* Responsive Styles 1165px */
@media screen and (max-width: 1165px) {
    /* no any changes */
}

/* Responsive Styles 1024px */
@media screen and (max-width: 1024px) {
    /* no any changes */
}

/* Responsive Styles 860px */
@media screen and (max-width: 860px) {
    .current-question-col-fixed {
        width: 120px; /* specific width */
    }
    .current-question-number-bg.current {
        margin-left: 70px;
    }
    .current-question-number-bg.total {
        margin-right: 70px;
    }

    .manager-button {
        display: none;
    }
    .manager-button2 {
        display: flex;
    }
}

/* Responsive Styles 767px */
@media screen and (max-width: 767px) {
    .modal-test-container {
        width: 90%;
        max-height: 90%;
    }

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

    .test-modal-content {
        padding-left: 24px;
        padding-right: 24px;
        margin-bottom: 110px;
    }

    .test-modal-section {
        margin-top: 16px;
        margin-bottom: 0px;
        gap: 16px;
    }

    .test-modal-section-title {
        font-size: 16px;
    }

    .current-question-col-fixed {
        width: 100px; /* specific width */
    }
    .current-question-number-bg.current {
        margin-left: 50px;
    }
    .current-question-number-bg.total {
        margin-right: 50px;
    }

    .form-bonuses {
        margin-bottom: 4px;
    }

    .selected-teacher-container {
        margin-bottom: 16px;
    }

    .test-buttons {
        position: fixed;

        padding: 16px;
        flex-direction: column;
    }

    .test-buttons-note {
        flex: 1; /* Takes all available space */
        width: 100%;
        height: auto;
    }
    .test-buttons-note-text {
        font-size: 14px;
    }

    .test-button-next {
        width: 100%;
    }
}

@media screen and (max-width: 610px) {
    .modal-test-container {
        width: 95%;
        max-height: 95%;
    }

    .test-modal-title {
        font-size: 20px;
    }

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

    .result-percentage-card {
        display: none;
    }
    .result-percentage-card2 {
        display: flex;
    }

    .teacher-button {
        display: none;
    }
    .teacher-button2 {
        display: flex;
    }

    .test-buttons-note-text {
        font-size: 12px;
    }
}

@media screen and (max-width: 480px) {

    .test-modal-section {
        gap: 8px;
    }
    .test-modal-question-answer_box {
        margin-top: 8px;
        gap: 8px;
    }

    .current-question-col-fixed {
        width: 70px; /* specific width */
    }
    .current-question-number-bg.current {
        margin-left: 20px;
    }
    .current-question-number-bg.total {
        margin-right: 20px;
    }

    .test-modal-question-title {
        font-size: 20px;
    }
    .test-modal-question-type {
        font-size: 16px;
    }
    .variants-checkboxes-column {
        gap: 4px;
    }

    .form-bonuses {
        max-height: 270px;
    }

    .test-buttons {
        /*background: #1B7A41;*/
        gap: 8px;
    }
    .test-buttons-note {
        padding-left: 4px;
    }
}

/* Оверлей модального окна и другие стили без изменений */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: block;
    opacity: 1;
}

/* Предотвращение прокрутки основной страницы */
body.modal-open {
    overflow: hidden;
    padding-right: var(--scrollbar-width, 0px);
}