.leadya-assistant {
    position: fixed !important;
    right: 24px !important;
    bottom: 24px !important;
    z-index: 2147483000 !important;
    display: block;
    visibility: visible;
    font-family: inherit;
}

.leadya-assistant--website {
    bottom: 96px !important;
}

.leadya-assistant__launcher {
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: #1b6a68;
    color: #fff;
    box-shadow: 0 12px 30px rgba(19, 37, 43, 0.28);
    font-size: 22px;
    cursor: pointer;
}

.leadya-assistant__panel {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: min(380px, calc(100vw - 32px));
    height: min(560px, calc(100vh - 120px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(23, 43, 54, 0.14);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(19, 37, 43, 0.24);
}

.leadya-assistant__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #12343f;
    color: #fff;
}

.leadya-assistant__header strong,
.leadya-assistant__header span {
    display: block;
    line-height: 1.25;
}

.leadya-assistant__header span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

.leadya-assistant__close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
}

.leadya-assistant__messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: #f5f7f8;
}

.leadya-assistant__message {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.leadya-assistant__message--user {
    align-items: flex-end;
}

.leadya-assistant__message--assistant {
    align-items: flex-start;
}

.leadya-assistant__bubble-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 92%;
}

.leadya-assistant__bubble {
    max-width: 86%;
    padding: 10px 12px;
    border-radius: 8px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.4;
}

.leadya-assistant__message--user .leadya-assistant__bubble {
    background: #1b6a68;
    color: #fff;
}

.leadya-assistant__message--assistant .leadya-assistant__bubble {
    background: #fff;
    color: #182b34;
    border: 1px solid rgba(23, 43, 54, 0.1);
}

.leadya-assistant__loading-bubble {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4f6570;
    font-size: 13px;
}

.leadya-assistant__typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.leadya-assistant__typing-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #1b6a68;
    opacity: 0.35;
    animation: leadya-assistant-typing 1s infinite ease-in-out;
}

.leadya-assistant__typing-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.leadya-assistant__typing-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes leadya-assistant-typing {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.35;
    }
    40% {
        transform: translateY(-3px);
        opacity: 1;
    }
}

.leadya-assistant__source-help {
    position: relative;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-top: 4px;
    border: 1px solid rgba(27, 106, 104, 0.28);
    border-radius: 50%;
    background: #eef6f6;
    color: #1b6a68;
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    cursor: help;
}

.leadya-assistant__source-tooltip {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 2;
    display: none;
    width: min(260px, calc(100vw - 64px));
    padding: 10px;
    border: 1px solid rgba(23, 43, 54, 0.14);
    border-radius: 8px;
    background: #fff;
    color: #263b44;
    box-shadow: 0 12px 26px rgba(19, 37, 43, 0.18);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
}

.leadya-assistant__source-tooltip span {
    display: block;
    overflow-wrap: anywhere;
}

.leadya-assistant__source-help:hover .leadya-assistant__source-tooltip,
.leadya-assistant__source-help:focus .leadya-assistant__source-tooltip,
.leadya-assistant__source-help:focus-within .leadya-assistant__source-tooltip {
    display: block;
}

.leadya-assistant__form {
    display: grid;
    grid-template-columns: 1fr 44px;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid rgba(23, 43, 54, 0.12);
    background: #fff;
}

.leadya-assistant__input {
    min-height: 44px;
    max-height: 110px;
    resize: vertical;
    border: 1px solid rgba(23, 43, 54, 0.18);
    border-radius: 8px;
    padding: 9px 10px;
    line-height: 1.35;
}

.leadya-assistant__send {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    background: #a94438;
    color: #fff;
    cursor: pointer;
}

.leadya-assistant__send:disabled {
    cursor: progress;
    opacity: 0.6;
}

@media (max-width: 520px) {
    .leadya-assistant {
        right: 16px;
        bottom: 16px;
    }

    .leadya-assistant--website {
        bottom: 84px !important;
    }

    .leadya-assistant__panel {
        bottom: 68px;
        width: calc(100vw - 32px);
        height: min(520px, calc(100vh - 104px));
    }
}
