.in7-ai-widget {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9999;
    font-family: var(--font-body), Arial, sans-serif;
}

.in7-ai-toggle {
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 22px;
    background: linear-gradient(135deg, #e1bf7f 0%, var(--color-accent) 48%, #ae833e 100%);
    color: var(--text-on-accent);
    box-shadow: 0 18px 40px rgba(197, 160, 89, .30);
    font-size: 20px;
    cursor: pointer;
}

.in7-ai-panel {
    position: absolute;
    right: 0;
    bottom: 74px;
    width: min(390px, calc(100vw - 32px));
    height: 520px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: 28px;
    background: var(--bg-card);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
}

.in7-ai-widget.is-open .in7-ai-panel {
    display: flex;
}

.in7-ai-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    color: #fff;
    background: linear-gradient(135deg, #e1bf7f 0%, var(--color-accent) 48%, #ae833e 100%);
}

.in7-ai-head strong,
.in7-ai-head span {
    display: block;
}

.in7-ai-head strong {
    font-size: 15px;
    font-weight: 800;
}

.in7-ai-head span {
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, .76);
}

.in7-ai-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.in7-ai-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    overflow-y: auto;
    background: #f7faf9;
}

.in7-ai-suggestions {
    display: flex;
    gap: 8px;
    padding: 10px 14px 0;
    overflow-x: auto;
    background: #fff;
    border-top: 1px solid rgba(2, 44, 34, .06);
}

.in7-ai-suggestions button {
    flex: 0 0 auto;
    min-height: 32px;
    border: 1px solid rgba(2, 44, 34, .09);
    border-radius: 999px;
    padding: 0 11px;
    background: rgba(2, 44, 34, .04);
    color: #14312a;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.in7-ai-message {
    max-width: 86%;
    padding: 12px 14px;
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.55;
    color: #14312a;
    background: #fff;
    border: 1px solid rgba(2, 44, 34, .08);
}

.in7-ai-message.user {
    align-self: flex-end;
    color: #fff;
    background: #0a5d4a;
}

.in7-ai-message.bot.error {
    color: #9f2f24;
    background: rgba(192, 57, 43, .08);
}

.in7-ai-form {
    display: flex;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid rgba(2, 44, 34, .08);
    background: #fff;
}

.in7-ai-form input {
    flex: 1;
    min-height: 44px;
    border: 1px solid var(--border-default);
    border-radius: 16px;
    padding: 0 14px;
    outline: none;
    font-size: 13px;
}

.in7-ai-form button {
    width: 46px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    background: var(--color-accent);
    cursor: pointer;
}

@media (max-width: 768px) {
    .in7-ai-widget {
        bottom: calc(60px + env(safe-area-inset-bottom, 0px) + 10px);
    }
}
