#acb-widget {
    --acb-brand: #1150D4;
    --acb-brand-deep: #0A2E7A;
    --acb-accent: #7BB0FF;
    --acb-surface: #F7FAFF;
    --acb-line: #E4ECFA;
    --acb-line-strong: #CBDCF7;
    --acb-text: #111A2B;
    --acb-muted: #6B7C93;
    font-family: 'Inter', sans-serif;
}

.acb-launcher {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1040;
    display: flex;
    align-items: center;
    gap: 9px;
    height: 40px;
    padding: 0 16px 0 0;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--acb-brand) 0%, var(--acb-brand-deep) 100%);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .1px;
    line-height: 1;
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, .9),
        0 4px 14px rgba(10, 46, 122, .28);
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.acb-launcher:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 0 2px #fff,
        0 8px 20px rgba(10, 46, 122, .36);
}

.acb-launcher:focus-visible {
    outline: 2px solid #FFC24B;
    outline-offset: 3px;
}

.acb-launcher-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, .14);
}

.acb-launcher-icon svg {
    display: block;
    width: 19px;
    height: 19px;
}

#acb-widget.acb-active .acb-launcher {
    opacity: 0;
    transform: scale(.9);
    pointer-events: none;
}

.acb-panel {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1041;
    display: none;
    flex-direction: column;
    width: 396px;
    max-width: calc(100vw - 28px);
    height: 570px;
    max-height: calc(100vh - 40px);
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow:
        0 2px 8px rgba(17, 26, 43, .06),
        0 24px 60px rgba(10, 46, 122, .24);
}

.acb-panel.acb-open {
    display: flex;
    animation: acb-rise .22s cubic-bezier(.2, .8, .3, 1);
}

@keyframes acb-rise {
    from { opacity: 0; transform: translateY(14px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

.acb-panel.acb-full {
    height: calc(100vh - 40px);
    max-height: calc(100vh - 40px);
    animation: none;
}

.acb-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 12px 12px 18px;
    background: linear-gradient(135deg, var(--acb-brand) 0%, var(--acb-brand-deep) 100%);
    color: #fff;
}

.acb-header-title {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.acb-header-title svg {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
}

.acb-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .1px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acb-icon-btn {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: rgba(255, 255, 255, .82);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.acb-icon-btn:hover {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

.acb-icon-btn:focus-visible {
    outline: 2px solid #FFC24B;
    outline-offset: 1px;
}

.acb-close {
    font-size: 19px;
}

.acb-icon-btn svg {
    width: 15px;
    height: 15px;
    display: block;
}

.acb-expand .acb-ic-collapse,
.acb-panel.acb-full .acb-expand .acb-ic-expand {
    display: none;
}

.acb-panel.acb-full .acb-expand .acb-ic-collapse {
    display: block;
}

.acb-notice {
    display: none;
    background: #FFF9E9;
    border-bottom: 1px solid #F3E3B8;
}

.acb-notice.acb-shown {
    display: block;
}

.acb-notice-inner {
    padding: 12px 18px;
    color: #6A5520;
    font-size: 12px;
    line-height: 1.55;
}

.acb-notice strong {
    display: block;
    margin-bottom: 3px;
    color: #4A3A10;
    font-size: 12.5px;
}

.acb-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    background: var(--acb-surface);
    scrollbar-width: thin;
    scrollbar-color: var(--acb-line-strong) transparent;
}

.acb-body::-webkit-scrollbar {
    width: 8px;
}

.acb-body::-webkit-scrollbar-thumb {
    background: var(--acb-line-strong);
    border-radius: 4px;
}

.acb-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 10px;
}

.acb-row-user {
    align-items: flex-end;
}

.acb-time {
    margin: 3px 6px 0;
    color: var(--acb-muted);
    font-size: 10px;
    line-height: 1;
    opacity: .75;
}

.acb-msg {
    max-width: 88%;
    padding: 11px 14px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.6;
    white-space: pre-line;
    word-wrap: break-word;
}

.acb-msg-bot {
    background: #fff;
    border: 1px solid var(--acb-line);
    color: var(--acb-text);
    border-bottom-left-radius: 5px;
    box-shadow: 0 1px 2px rgba(17, 26, 43, .04);
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

.acb-msg-user {
    background: linear-gradient(135deg, var(--acb-brand) 0%, #0C3EA8 100%);
    color: #fff;
    border-bottom-right-radius: 5px;
    box-shadow: 0 2px 6px rgba(17, 80, 212, .22);
}

.acb-msg-error {
    background: #FEF2F2;
    border: 1px solid #F6CDCD;
    color: #97231F;
}

.acb-typing {
    display: inline-flex;
    gap: 4px;
    padding: 13px 14px;
}

.acb-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--acb-brand);
    opacity: .4;
    animation: acb-blink 1.3s infinite both;
}

.acb-typing span:nth-child(2) { animation-delay: .18s; }
.acb-typing span:nth-child(3) { animation-delay: .36s; }

@keyframes acb-blink {
    0%, 80%, 100% { opacity: .22; transform: translateY(0); }
    40%           { opacity: 1; transform: translateY(-2px); }
}

.acb-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 4px 0 10px;
}

.acb-suggestion {
    padding: 8px 13px;
    border: 1px solid var(--acb-line-strong);
    border-radius: 14px;
    background: #fff;
    color: var(--acb-brand);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.acb-suggestion:hover {
    background: #EDF4FF;
    border-color: var(--acb-brand);
    transform: translateY(-1px);
}

.acb-footer {
    border-top: 1px solid var(--acb-line);
    background: #fff;
    padding: 12px 18px 14px;
}

.acb-form {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.acb-input {
    flex: 1;
    resize: none;
    max-height: 96px;
    padding: 11px 15px;
    border: 1px solid var(--acb-line-strong);
    border-radius: 21px;
    background: var(--acb-surface);
    color: var(--acb-text);
    font-family: inherit;
    font-size: 13.5px;
    line-height: 1.45;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.acb-input::placeholder {
    color: #9AAABF;
}

.acb-input:focus {
    outline: none;
    border-color: var(--acb-brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(17, 80, 212, .12);
}

.acb-send {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--acb-brand) 0%, var(--acb-brand-deep) 100%);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(17, 80, 212, .3);
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.acb-send:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(17, 80, 212, .38);
}

.acb-send:disabled {
    background: #C3D2E6;
    box-shadow: none;
    cursor: not-allowed;
}

.acb-hint {
    margin: 9px 2px 0;
    color: var(--acb-muted);
    font-size: 10.5px;
    line-height: 1.45;
    text-align: center;
}

.acb-hint button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--acb-brand);
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 560px) {
    .acb-launcher {
        right: 12px;
        bottom: 12px;
        height: 38px;
        padding-right: 14px;
        font-size: 12.5px;
    }

    .acb-launcher-icon {
        width: 38px;
        height: 38px;
    }

    .acb-panel {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .acb-expand {
        display: none;
    }
}
