/* Плавающий ИИ-консультант (справа). Для всех посетителей. */

.vegosm-aic {
    --vegosm-aic-red: #e30613;
    --vegosm-aic-red-dark: #c20510;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-sizing: border-box;
}

.vegosm-aic *,
.vegosm-aic *::before,
.vegosm-aic *::after {
    box-sizing: inherit;
}

.vegosm-aic__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.vegosm-aic__btn {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 100050;
    width: 85px;
    height: 85px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--vegosm-aic-red);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(227, 6, 19, 0.38), 0 2px 6px rgba(0, 0, 0, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.vegosm-aic__btn:hover,
.vegosm-aic__btn:focus-visible {
    background: var(--vegosm-aic-red-dark);
    transform: scale(1.04);
    outline: none;
    box-shadow: 0 8px 22px rgba(227, 6, 19, 0.46), 0 2px 8px rgba(0, 0, 0, 0.18);
}

.vegosm-aic__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
}

.vegosm-aic__icon svg {
    width: 42px;
    height: 42px;
}

.vegosm-aic__icon--close {
    display: none;
    width: 28px;
    height: 28px;
}

.vegosm-aic__icon--close svg {
    width: 28px;
    height: 28px;
}

.vegosm-aic--open .vegosm-aic__icon--chat {
    display: none;
}

.vegosm-aic--open .vegosm-aic__icon--close {
    display: flex;
}

.vegosm-aic__panel {
    position: fixed;
    right: 20px;
    bottom: 124px;
    z-index: 100049;
    width: 380px;
    height: min(640px, calc(100vh - 160px));
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 12px 40px rgba(15, 20, 30, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.vegosm-aic__panel[hidden] {
    display: none !important;
}

.vegosm-aic__frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

@media (max-width: 640px) {
    .vegosm-aic__btn {
        width: 64px;
        height: 64px;
        right: 12px;
        bottom: 16px;
    }

    .vegosm-aic__icon,
    .vegosm-aic__icon svg {
        width: 32px;
        height: 32px;
    }

    .vegosm-aic__panel {
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
        border: none;
    }

    .vegosm-aic--open .vegosm-aic__btn {
        display: none;
    }
}
