/* Модальное окно */
/* .prompter-container-modal {
    display: flex;
    width: 95%;
    height: 90%;
} */

/* Модальное окно */
.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    /* background: linear-gradient(135deg,
            rgba(var(--primary-dark), 0.5),
            rgba(var(--secondary-color), 0.5)); */
    background: rgba(var(--secondary-color), 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(var(--accent-color-back), 0.1);
    border: 1px solid rgba(var(--accent-color-back), 0.2);
    width: 90%;
    display: flex;
    overflow: hidden;
}

.prompter-container-modal {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Левая панель */
.prompter-left-panel {
    width: 20%;
    /* background: rgba(var(--secondary-color), 0.7); */
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Градиентная полоса вместо border-right */
.prompter-left-panel::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 1px;
    background: linear-gradient(to bottom,
            rgba(var(--accent-color-back), 0),
            rgba(var(--accent-color-back), 0.7) 50%,
            rgba(var(--accent-color-back), 0) 100%);
    pointer-events: none;
    /* Игнорирует события мыши */
}

.menu-option {
    padding: 40px;
    border-bottom: 1px solid rgba(var(--accent-color), 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: white;
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    font-size: 16px;
    text-align: start;
}

.menu-option:hover {
    background: rgba(var(--accent-color-back), 0.15);
}

.menu-option.active {
    background: rgba(var(--accent-color-back), 0.25);
}

.menu-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: rgba(var(--accent-color-back), 0.8);
    transition: height 0.3s ease;
}

.menu-option.active::before {
    height: 100%;
}

/* Правая панель */
.prompter-right-panel {
    width: 80%;
    /* background: rgba(var(--primary-dark), 0.85); */
    padding-right: 30px;
    padding-left: 30px;
    display: flex;
    flex-direction: column;
    height: 95%;
}

.content-header {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-color);
    border-bottom: 1px solid rgba(var(--accent-color-back), 0.3);
    padding-bottom: 10px;
}

.content-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    flex-grow: 1;
    overflow-y: hidden;
    scrollbar-gutter: stable;
}

.content-text:hover {
    overflow-y: auto;
}

.content-text::-webkit-scrollbar {
    width: 2px;
}

.content-text::-webkit-scrollbar-track {
    background: rgba(var(--text-color), 0.1);
    border-radius: 3px;
}

.content-text::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

.functionality-content {
    display: none;
}

.ai-content {
    display: none;
    overflow: hidden;
}

.survey-content {
    display: none;
}

.chat-content {
    display: none;
}

.active-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.active-content::-webkit-scrollbar {
    width: 2px;
}

.active-content::-webkit-scrollbar-track {
    background: rgba(var(--text-color), 0.1);
    border-radius: 3px;
}

.active-content::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.active-content {
    animation: fadeIn 0.4s ease-out forwards;
}

/* AI */
/* Стили карточек рекомендаций */

.full-content {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    text-align: justify;
    hyphens: auto;
    padding: 0 10px;
    position: relative;
    z-index: 1;
}

.full-content p {
    margin-bottom: 0.9em;
    position: relative;
    padding-left: 20px;
}

.full-contentt p::before {
    content: "•";
    color: rgba(var(--accent-color-back), 0.7);
    position: absolute;
    left: 0;
    font-size: 1rem;
    top: -0.1em;
}

.full-content strong {
    color: rgba(var(--accent-color-back), 0.9);
    font-weight: 600;
    background: rgba(var(--accent-color-back), 0.1);
    padding: 0 4px;
    border-radius: 3px;
}

.stat-highlight {
    display: inline-block;
    background: linear-gradient(90deg,
            rgba(var(--accent-color-back), 0.2),
            transparent);
    color: rgba(var(--accent-color-back), 1);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin: 0 2px;
    font-size: 0.9rem;
    border-left: 2px solid rgba(var(--accent-color-back), 0.6);
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(var(--accent-color-back), 0.4),
            transparent);
    margin: 2em 0;
    width: 80%;
    align-self: center;
}

.section-title {
    font-size: 1rem;
    color: rgba(var(--accent-color-back), 0.7);
    font-weight: 900;
    display: inline-block;
}

.footnote {
    font-size: 0.9rem;
    color: rgba(var(--accent-color), 0.7);
    margin-top: 2em;
    padding-top: 10px;
    border-top: 1px solid rgba(var(--accent-color), 0.2);
}

/* Стили заголовков групп */
.group-title {
    margin: 30px 0 15px 0;
    font-size: 1.5em;
    font-weight: bold;
    color: var(--text-color);
    padding-bottom: 5px;
    /* border-bottom: 1px solid var(--success-color); */
}

/* Контейнер для строки с квадратами */
.recommendations-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    /* height: 300px; */
}

/* Стили квадратных блоков */
.ai-recommendation {
    width: 220px;
    height: 100px;
    border-radius: 8px;
    padding: 15px;
    box-sizing: border-box;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
    background: rgba(var(--background-primary-box), 0.2);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(var(--shadow-color));
}

/* Эффект при наведении */
.ai-recommendation:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Стили внутренних элементов */
/* .content-text-ai-note {
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 1.1em;
} */

.content-text-ai-date {
    color: var(--success-color);
    font-size: 0.8em;
    margin-bottom: 8px;
}

.content-text-ai-period {
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 1.1em;
    font-size: 0.9em;
    margin-bottom: 12px;
    padding-bottom: 12px;
}

.content-text-ai-text {
    font-size: 0.9em;
    line-height: 1.4;
    color: #444;
    max-height: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: none;
}

.detail-view {
    padding: 20px;
    /* background: rgba(var(--background-primary-box), 0.3); */
    /* border-radius: 8px; */
    /* box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1); */
    margin-top: 20px;
}

.detail-content {
    font-size: 1.1em;
    line-height: 1.6;
    color: var(--text-color);
    padding: 15px 0;
}

.back-button {
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
}

.back-button:hover {
    background: var(--success-color);
}

.back-button::before {
    content: "←";
    margin-right: 5px;
    font-size: 1.2em;
}

/* Стили для скрытия/показа элементов */
.hidden {
    display: none;
}

.visible {
    display: block;
}

/* Добавляем стили для детального просмотра */
/* .detail-content .stat-highlight {
    color: #4a90e2;
    font-weight: bold;
}

.detail-content .section-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 20px 0;
}

.detail-content .section-title {
    font-weight: bold;
    display: block;
    margin-bottom: 15px;
    color: #333;
} */

.mobile-menu-toggle {
    display: none; /* Скрыто на десктопе */
}

/* Мобильные стили для Центра принятия решений */
@media (max-width: 768px) {
    #prompterModal .modal-content {
        width: 95vw !important;
        max-width: 100vw;
        height: 90vh !important;
        margin: 5vh auto !important;
        padding: 0;
    }

    .prompter-container-modal {
        flex-direction: column;
        width: 100%;
        height: 100%;
    }

    /* Мобильное меню */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        padding: 15px;
        background: rgba(var(--accent-color-back), 0.6);
        border-bottom: 1px solid rgba(var(--accent-color), 0.1);
        cursor: pointer;
    }

    .menu-icon {
        font-size: 24px;
        margin-right: 10px;
    }

    .current-menu-title {
        font-size: 16px;
        font-weight: 600;
    }

    /* Левая панель - скрываем обычное меню */
    .prompter-left-panel {
        display: none;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        z-index: 10;
        background: rgba(var(--secondary-color), 0.95);
    }

    .prompter-left-panel.active {
        display: flex;
    }

    .menu-option {
        padding: 20px;
        font-size: 14px;
        border-bottom: 1px solid rgba(var(--accent-color), 0.1);
    }

    /* Правая панель */
    .prompter-right-panel {
        width: 100%;
        padding: 15px;
        height: calc(100% - 60px);
    }

    .content-header {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    .content-text {
        font-size: 14px;
        width: 90%;
    }

    /* Адаптация AI-контента */
    .recommendations-row {
        flex-direction: column;
    }

    .ai-recommendation {
        width: 40%;
        height: auto;
        margin-bottom: 10px;
    }

    /* Анимации */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .prompter-left-panel.active {
        animation: slideDown 0.3s ease-out forwards;
    }
}
