.site-ai-launcher {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9998;
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #1f4784, #2bcfd3);
    color: #fff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.22);
    font-size: 24px;
    cursor: pointer;
}

.site-ai-panel {
    position: fixed;
    right: 18px;
    bottom: 92px;
    z-index: 9998;
    width: min(390px, calc(100vw - 24px));
    height: min(620px, calc(100vh - 120px));
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.24);
    border: 1px solid rgba(31, 71, 132, 0.12);
}

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

.site-ai-header {
    padding: 16px 18px;
    background: linear-gradient(135deg, #173c73, #2bcfd3);
    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.92;
    margin-top: 4px;
}

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

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

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

.site-ai-message.assistant {
    margin-right: auto;
    background: #fff;
    color: #10233f;
    border: 1px solid rgba(31, 71, 132, 0.1);
    border-bottom-left-radius: 6px;
}

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

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

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

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

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

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

.site-ai-submit {
    border: 0;
    border-radius: 999px;
    background: #1f4784;
    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;
    }
}
