.splicer-assistant {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: Poppins, "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
}

.splicer-assistant__fab {
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 14px rgba(77, 122, 238, 0.32));
}

.splicer-assistant__fab img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    display: block;
}

.splicer-assistant__fab--open {
    background: #f0f2f7;
    filter: none;
}

.splicer-assistant__fab-x {
    width: 18px;
    height: 18px;
    stroke: #82868b;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

.splicer-assistant__fab--wait {
    visibility: hidden;
}

.splicer-assistant__panel[hidden] {
    display: none;
}

.splicer-assistant__panel {
    display: flex;
    flex-direction: column;
    width: min(380px, calc(100vw - 32px));
    height: min(520px, calc(100vh - 110px));
    margin-bottom: 14px;
    background: #fff;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.13), 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.splicer-assistant__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    background: #fafafa;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    font-weight: 600;
}

.splicer-assistant__header img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.splicer-assistant__log {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.splicer-assistant__msg {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 16px;
}

.splicer-assistant__msg img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.splicer-assistant__msg--user {
    flex-direction: row-reverse;
}

.splicer-assistant__bubble {
    max-width: calc(100% - 38px);
    font-size: 13.5px;
    line-height: 1.65;
    word-break: break-word;
}

.splicer-assistant__msg--user .splicer-assistant__bubble {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 18px 18px 4px 18px;
    color: #fff;
    background: linear-gradient(135deg, #4D7AEE, #4CB5ED);
}

.splicer-assistant__msg--assistant .splicer-assistant__bubble {
    padding: 4px 0;
    color: #111827;
}

.splicer-assistant__bubble a {
    color: #4D7AEE;
}

.splicer-assistant__msg--user .splicer-assistant__bubble a {
    color: #fff;
}

.splicer-assistant__typing {
    display: flex;
    gap: 5px;
    padding: 8px 2px;
}

.splicer-assistant__typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d1d5db;
    animation: splicer-bounce 1.3s infinite ease-in-out;
}

.splicer-assistant__typing span:nth-child(2) { animation-delay: 0.15s; }
.splicer-assistant__typing span:nth-child(3) { animation-delay: 0.3s; }

.splicer-assistant__cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 16px 12px 54px;
}

.splicer-assistant__card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: #111827;
    text-decoration: none;
}

.splicer-assistant__card img,
.splicer-assistant__card-fallback {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.splicer-assistant__card-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #4D7AEE;
    font-size: 14px;
    font-weight: 600;
}

.splicer-assistant__card-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.splicer-assistant__card-copy strong {
    font-size: 13px;
    font-weight: 600;
}

.splicer-assistant__card-copy span,
.splicer-assistant__card-copy em {
    font-size: 12px;
    font-style: normal;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.splicer-assistant__form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #f3f4f6;
    background: #fff;
}

.splicer-assistant__input {
    flex: 1;
    resize: none;
    max-height: 120px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 9px 12px;
    background: #f9fafb;
    color: #111827;
    font: inherit;
    font-size: 13.5px;
    line-height: 1.5;
}

.splicer-assistant__input:focus {
    outline: none;
    border-color: #4D7AEE;
    background: #fff;
}

.splicer-assistant__send {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #e5e7eb;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.splicer-assistant__send svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.splicer-assistant__send--ready {
    background: linear-gradient(135deg, #4D7AEE, #4CB5ED);
    color: #fff;
}

@keyframes splicer-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}
