/* responsive.css — адаптивный дизайн для AVIST.AI */

@media (max-width: 1215px) {
    .p4-card-wrapper {
        width: 100% !important;
        padding: 8px 4px !important;
    }
}

/* Планшеты и маленькие экраны (до 1024px) */
@media (max-width: 1024px) {
    .c-toolbar {
        padding: 16px !important;
    }
    .c-title {
        font-size: 36px !important;
    }
    .c-pretitle {
        font-size: 20px !important;
    }
    .p4-card-wrapper {
        width: 100% !important;
        padding: 8px 4px !important;
    }
    .p4-card {
        padding: 12px !important;
    }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
    /* Панели друг под другом */
    .page-wrapper {
        flex-direction: column !important;
        height: auto !important;
    }
    .page-wrapper .c-panel-left,
    .page-wrapper .c-panel-right {
        width: 100% !important;
        position: relative !important;
        height: auto !important;
        padding: 16px !important;
    }
    .page-wrapper .c-panel-right {
        min-height: 800px;
    }
    .page-container {
        height: auto !important;
        overflow-y: scroll !important;
    }

    .page-wrapper.page-0 .c-panel-right {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        min-height: 600px !important;
        height: 600px !important;
    }

    /* Скрываем точечную навигацию */
    .left-sidebar {
        display: none !important;
    }

    /* Тулбар */
    .c-toolbar {
        padding: 8px 12px !important;
        gap: 8px !important;
    }
    .c-toolbar .c-test-stend {
        display: none !important;
    }

    /* Шрифты и отступы */
    .c-title {
        font-size: 28px !important;
        margin-bottom: 16px !important;
    }
    .c-pretitle {
        font-size: 18px !important;
        margin-bottom: 16px !important;
    }
    .c-text-muted {
        font-size: 16px !important;
        margin: 4px 0 !important;
    }
    .c-btn {
        font-size: 16px !important;
        padding: 12px 24px !important;
    }
    .c-list-item td {
        font-size: 16px !important;
        padding: 0 4px 16px 0 !important;
    }
    .c-list-title {
        font-size: 16px !important;
    }
    .c-list-text {
        font-size: 14px !important;
    }


    .p0-title1 {
        font-size:24px !important;
    }

    .p0-title2 {
        line-height: 1.3 !important;
        font-size:20px !important;
    }


    /* Статистика на странице 4 */
    .p4-stats {
        flex-wrap: wrap !important;
        gap: 16px !important;
    }
    .p4-stat-value {
        font-size: 40px !important;
    }
    .p4-stat-label {
        font-size: 12px !important;
    }

    /* Карточки на странице 4 */
    .p4-cards-grid {
        padding: 8px !important;
    }
    .p4-card-wrapper {
        width: 100% !important;
        padding: 4px !important;
    }
    .p4-card {
        padding: 12px !important;
    }
    .p4-card-title {
        font-size: 16px !important;
    }
    .p4-card-text {
        font-size: 14px !important;
    }

    /* Форма на странице 5 */
    .p5-form {
        max-width: 100% !important;
        margin: 16px 0 !important;
        gap: 12px !important;
    }
    .p5-form-input,
    .p5-form-textarea {
        font-size: 14px !important;
        padding: 6px 8px !important;
    }
    .p5-form-success-text {
        font-size: 16px !important;
    }
    .p5-form-success-icon {
        width: 48px !important;
    }

    /* Контакты на странице 5 */
    .p5-contacts-panel {
        padding: 8px !important;
    }
    .p5-contacts-logo {
        max-width: 100px !important;
    }
    .p5-contacts-name {
        font-size: 14px !important;
    }
    .p5-contacts-addr,
    .p5-contacts-phone,
    .p5-contacts-country,
    .p5-contacts-mail {
        font-size: 12px !important;
    }

    /* Чат */
    .c-chat {
        padding: 12px !important;
        gap: 8px !important;
    }
    .c-chat-scroll {
        border-radius: 12px !important;
        /* min-height: 200px !important; */
    }
    .c-chat-empty-text {
        font-size: 14px !important;
        padding: 0 16px !important;
    }
    .c-chat-input-wrapper {
        padding: 12px !important;
    }
    .c-label {
        font-size: 11px !important;
    }
    .c-chat-inputbox {
        flex-wrap: wrap !important;
        gap: 4px !important;
    }
    .c-chat-input {
        width: 100% !important;
        flex-grow: 0 !important;
    }
    .c-chat-input input {
        font-size: 14px !important;
    }
    .c-send-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 18px !important;
    }
    .c-chip-row {
        gap: 4px !important;
        margin: 8px 0 0 0 !important;
    }
    .c-chip {
        font-size: 11px !important;
        padding: 4px 10px !important;
    }

    /* Сообщения чата */
    .chat-log {
        padding: 8px !important;
        gap: 8px !important;
    }
    .msg-user,
    .msg-ai {
        font-size: 13px !important;
        padding: 6px 12px !important;
        max-width: 90% !important;
    }

    /* Меню */
    .c-menu-panel {
        width: 80vw !important;
        max-width: 80vw !important;
        padding: 16px !important;
    }
    .c-menu-items a {
        font-size: 16px !important;
        padding: 10px 0 !important;
    }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .c-title {
        font-size: 22px !important;
    }
    .c-pretitle {
        font-size: 16px !important;
    }
    .c-text-muted {
        font-size: 14px !important;
    }
    .c-btn {
        font-size: 14px !important;
        padding: 10px 20px !important;
    }
    .p4-stat-value {
        font-size: 28px !important;
    }
    .p4-stat-label {
        font-size: 11px !important;
    }
    .p5-form-success-text {
        font-size: 14px !important;
    }
    .p5-form-success-icon {
        width: 40px !important;
    }
    .msg-user,
    .msg-ai {
        font-size: 12px !important;
        padding: 4px 10px !important;
    }
}