.site-ai-launcher {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9998;
    width: 62px;
    height: 62px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #11786f, #0f3d4d 58%, #b47b35);
    color: #fff;
    box-shadow: 0 18px 42px rgba(15, 39, 48, 0.28);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
}

.site-ai-panel {
    position: fixed;
    right: 18px;
    bottom: 94px;
    z-index: 9998;
    width: min(400px, calc(100vw - 24px));
    height: min(640px, calc(100vh - 120px));
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 28px 60px rgba(15, 39, 48, 0.24);
    border: 1px solid rgba(17, 120, 111, 0.14);
}

.site-ai-hidden {
    display: none !important;
}

.site-ai-header {
    padding: 16px 18px;
    background: linear-gradient(135deg, #0f3d4d, #11786f 56%, #b47b35);
    color: #fff;
}

.site-ai-header strong,
.site-ai-header span {
    display: block;
}

.site-ai-header strong {
    font-size: 18px;
}

.site-ai-header span {
    font-size: 13px;
    opacity: 0.94;
    margin-top: 4px;
}

.site-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f6f4ef;
}

.site-ai-message {
    max-width: 88%;
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    line-height: 1.55;
    white-space: pre-wrap;
    font-size: 14px;
}

.site-ai-message.user {
    margin-left: auto;
    background: #0f3d4d;
    color: #fff;
    border-bottom-right-radius: 6px;
}

.site-ai-message.assistant {
    margin-right: auto;
    background: #fff;
    color: #16333f;
    border: 1px solid rgba(15, 61, 77, 0.1);
    border-bottom-left-radius: 6px;
}

.site-ai-sources {
    margin-top: 8px;
    font-size: 12px;
    color: #466271;
}

.site-ai-sources a {
    color: #11786f;
    text-decoration: underline;
    margin-right: 8px;
}

.site-ai-form {
    border-top: 1px solid rgba(15, 61, 77, 0.08);
    background: #fff;
    padding: 12px;
}

.site-ai-form textarea {
    width: 100%;
    min-height: 84px;
    resize: none;
    border: 1px solid rgba(15, 61, 77, 0.16);
    border-radius: 14px;
    padding: 12px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.site-ai-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    gap: 10px;
}

.site-ai-form small {
    color: #5c6f77;
    font-size: 11px;
}

.site-ai-submit {
    border: 0;
    border-radius: 999px;
    background: #11786f;
    color: #fff;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 767px) {
    .site-ai-panel {
        right: 10px;
        left: 10px;
        width: auto;
        bottom: 82px;
        height: min(72vh, 620px);
        border-radius: 18px;
    }

    .site-ai-launcher {
        right: 12px;
        bottom: 12px;
        width: 56px;
        height: 56px;
    }
}
