.assistant-widget {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1200;
    font-family: "Segoe UI", Arial, sans-serif;
}

.assistant-fab {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #1f9bff 0%, #1977e6 100%);
    color: #fff;
    min-width: 136px;
    height: 48px;
    padding: 0 16px;
    box-shadow: 0 12px 24px rgba(25, 119, 230, 0.32);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.assistant-fab:hover {
    filter: brightness(1.03);
}

.assistant-panel {
    width: min(440px, calc(100vw - 32px));
    max-height: calc(100vh - 90px);
    display: none;
    flex-direction: column;
    border-radius: 14px;
    border: 1px solid rgba(30, 64, 175, 0.2);
    background: #fff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.22);
    overflow: hidden;
}

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

.assistant-widget.is-open .assistant-fab {
    display: none;
}

.assistant-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.26);
    background: linear-gradient(180deg, #eff6ff, #e4edff);
}

.assistant-panel-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.assistant-panel-title {
    font-size: 14px;
    color: #0f172a;
}

.assistant-panel-subtitle {
    font-size: 11px;
    color: #475569;
}

.assistant-close {
    border: 0;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    background: rgba(15, 23, 42, 0.08);
    color: #334155;
    cursor: pointer;
}

.assistant-status {
    min-height: 18px;
    padding: 2px 14px 0;
    font-size: 11px;
    color: #64748b;
}

.assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    background: #f8fbff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.assistant-message {
    max-width: 92%;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.assistant-message.user {
    align-self: flex-end;
    background: linear-gradient(180deg, #2f80ff, #256ad3);
    color: #fff;
}

.assistant-message.bot {
    align-self: flex-start;
    background: #fff;
    color: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.assistant-suggestions {
    padding: 8px 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.assistant-chip {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #fff;
    border-radius: 999px;
    height: 28px;
    padding: 0 10px;
    font-size: 11px;
    color: #1e3a8a;
    cursor: pointer;
}

.assistant-form {
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
}

.assistant-input {
    width: 100%;
    resize: vertical;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.4;
    min-height: 72px;
}

.assistant-send {
    align-self: flex-end;
    border: 0;
    border-radius: 8px;
    min-width: 110px;
    height: 34px;
    background: linear-gradient(180deg, #16a34a, #15803d);
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 760px) {
    .assistant-widget {
        right: 10px;
        bottom: 10px;
    }

    .assistant-panel {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 22px);
    }
}
