﻿:root {
    --reabot-coral: #EB6753;
    --reabot-coral-light: #ff8a7a;
    --reabot-coral-dark: #d95843;
    --reabot-black: #181A20;
    --reabot-charcoal: #303137;
    --reabot-ink: #2b2c31;
    --reabot-body: #565a63;
    --reabot-muted: #9aa0a8;
    --reabot-faint: #b7bcc4;
    --reabot-line: #ecedf0;
    --reabot-surface: #ffffff;
    --reabot-surface-2: #f8f9fb;
    --reabot-good: #16a34a;
    --reabot-bad: #ef4444;
    --reabot-tf: "Poppins", sans-serif;
    --reabot-bf: "DM Sans", sans-serif;
}

.reabot-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0.4s;
}
.reabot-overlay.reabot-open {
    visibility: visible;
    transition: visibility 0s;
}

.reabot-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    will-change: backdrop-filter;
}
.reabot-overlay.reabot-open::before {
    opacity: 1;
}

.reabot-orbs {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.reabot-overlay.reabot-open .reabot-orbs { opacity: 1; }
.reabot-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    will-change: transform;
}
.reabot-orb-1 {
    width: 480px;
    height: 480px;
    top: -140px;
    left: -120px;
    background: radial-gradient(circle at 30% 30%, rgba(235,103,83,0.35), rgba(235,103,83,0) 70%);
    animation: reabotOrbFloat1 22s ease-in-out infinite;
}
.reabot-orb-2 {
    width: 520px;
    height: 520px;
    bottom: -180px;
    right: -140px;
    background: radial-gradient(circle at 60% 60%, rgba(48,49,55,0.22), rgba(48,49,55,0) 70%);
    animation: reabotOrbFloat2 28s ease-in-out infinite;
}
.reabot-orb-3 {
    width: 340px;
    height: 340px;
    top: 40%;
    left: 60%;
    background: radial-gradient(circle at 50% 50%, rgba(255,138,122,0.22), rgba(255,138,122,0) 70%);
    animation: reabotOrbFloat3 26s ease-in-out infinite;
}
@keyframes reabotOrbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(70px, 50px) scale(1.08); }
}
@keyframes reabotOrbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-60px, -40px) scale(1.06); }
}
@keyframes reabotOrbFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-40px, 60px) scale(0.94); }
}
@media (prefers-reduced-motion: reduce) {
    .reabot-orb { animation: none !important; }
}

.reabot-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.reabot-overlay.reabot-open .reabot-scrim {
    opacity: 1;
}

.reabot-floathead {
    position: relative;
    z-index: 3;
    align-self: center;
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px 9px 14px;
    pointer-events: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 12px;
    color: #fff;
    width: 760px;
    max-width: calc(100vw - 24px);
    transform: translateY(-12px);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
    filter: drop-shadow(0 12px 28px rgba(16, 24, 40, 0.5)) drop-shadow(0 2px 6px rgba(16, 24, 40, 0.18));
}

.reabot-floathead::before,
.reabot-floathead::after {
    content: "";
    position: absolute;
    z-index: -1;
    background: rgba(48,49,55,1);
}

.reabot-floathead::before {
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px 0 0 12px;
    transform: skewX(-9deg);
    transform-origin: bottom left;
    clip-path: inset(0 50% 0 0);
}

.reabot-floathead::after {
    top: 0;
    bottom: 0;
    left: 50%;
    right: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-left: none;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.reabot-overlay.reabot-open .reabot-floathead {
    transform: translateY(0);
    opacity: 1;
}
.reabot-floathead-avatar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.reabot-floathead-avatar img {
    object-fit: contain;
    display: block;
}
.reabot-floathead-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    flex: 1;
    min-width: 0;
    padding-right: 4px;
}
.reabot-floathead-title {
    font-family: var(--reabot-tf);
    font-weight: 700;
    font-size: 14.5px;
    letter-spacing: -0.01em;
    line-height: 1.2;
    white-space: nowrap;
}
.reabot-floathead-address {
    font-family: var(--reabot-bf);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    width: 100%;
    padding: 0px;
}
.reabot-floathead-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-family: var(--reabot-bf);
    font-size: 10.5px;
    color: rgba(255,255,255,0.65);
}
.reabot-floathead-status .reabot-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 6px rgba(74,222,128,0.9);
    animation: reabotPulseDot 2.2s ease-in-out infinite;
}
.reabot-floathead-status.reabot-offline .reabot-dot {
    background: #f87171;
    box-shadow: 0 0 6px rgba(248,113,113,0.9);
    animation: none;
}
@keyframes reabotPulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.7; }
}
.reabot-floathead-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    border-left: 1px solid rgba(255,255,255,0.12);
    margin-left: auto;
    padding-left: 8px;
}
.reabot-floathead-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 200;
    transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}
.reabot-floathead-btn:hover {
    background: rgba(235, 103, 83, 0.9);
    color: #fff;
    transform: translateY(-1px);
}
.reabot-floathead-btn:active { transform: scale(0.92); }

.reabot-floathead-btn.reabot-think-active,
.reabot-floathead-btn.reabot-followups-active,
.reabot-floathead-btn.reabot-pins-active {
    background: linear-gradient(135deg, var(--reabot-coral) 0%, var(--reabot-coral-dark) 100%);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 0 0 3px rgba(235, 103, 83, 0.25);
}

#reabotPinsBtn { position: relative; }
.reabot-pins-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--reabot-coral) 0%, var(--reabot-coral-dark) 100%);
    color: #fff;
    font-family: var(--reabot-tf);
    font-weight: 700;
    font-size: 9.5px;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 2px 6px -1px rgba(235,103,83,0.6);
    display: none;
}
.reabot-pins-count.reabot-pins-count-show { display: block; }
.reabot-floathead-btn.reabot-pins-active .reabot-pins-count {
    background: #fff;
    color: var(--reabot-coral-dark);
}

.reabot-floathead-btn.reabot-think-hidden {
    display: none !important;
}

@media (max-width: 575.98px) {
    .reabot-floathead {
        margin-top: 0;
        gap: 0px 10px;
        padding: 10px 12px 0px 14px;
        align-self: stretch;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        filter: drop-shadow(0 6px 16px rgba(16, 24, 40, 0.35));
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        align-items: center;
    }
    .reabot-floathead::before {
        inset: 0;
        border-radius: 0;
        transform: none;
        clip-path: none;
        border-left: none;
        border-right: none;
        border-top: none;
    }
    .reabot-floathead::after {
        display: none;
    }
    .reabot-floathead-avatar {
        grid-column: 1;
        grid-row: 1;
        align-self: start;
    }
    .reabot-floathead-avatar img {
        width: 120px;
    }
    .reabot-floathead-meta {
        grid-column: 1 / -1;
        grid-row: 2;
        align-self: center;
        justify-self: center;
        padding-right: 0;
        width: 100%;
    }
    .reabot-floathead-address {
        max-width: none;
        text-align: center;
        width: 100%;
    }
    .reabot-floathead-actions {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: center;
        border-left: none;
        margin-left: 0;
        padding-left: 0;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

.reabot-messages {
    position: relative;
    z-index: 2;
    flex: 1;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 22px 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    pointer-events: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(235,103,83,0.6) transparent;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 26px, #000 calc(100% - 14px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 26px, #000 calc(100% - 14px), transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
    .reabot-messages { scroll-behavior: auto; }
}
.reabot-overlay.reabot-open .reabot-messages {
    opacity: 1;
}

.reabot-messages::-webkit-scrollbar { width: 6px; }
.reabot-messages::-webkit-scrollbar-track { background: transparent; }
.reabot-messages::-webkit-scrollbar-thumb {
    background: rgba(235, 103, 83, 0.5);
    border-radius: 4px;
}
.reabot-messages::-webkit-scrollbar-thumb:hover { background: var(--reabot-coral); }

.reabot-welcome {
    text-align: center;
    padding: 30px 26px 26px;
    margin: auto;
    max-width: 520px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    box-shadow: 0 20px 50px -20px rgba(16, 24, 40, 0.35);
}
.reabot-welcome-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(235,103,83,0.18) 0%, rgba(255,138,122,0.18) 100%);
    color: var(--reabot-coral);
    font-size: 30px;
    animation: reabotWelcomePulse 3s ease-in-out infinite;
}
@keyframes reabotWelcomePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(235,103,83,0.25); }
    50% { box-shadow: 0 0 0 14px rgba(235,103,83,0); }
}
@media (prefers-reduced-motion: reduce) {
    .reabot-welcome-ico { animation: none; }
}
.reabot-welcome h3 {
    font-family: var(--reabot-tf);
    font-weight: 700;
    font-size: 19px;
    color: var(--reabot-ink);
    margin: 0 0 8px;
}
.reabot-welcome p {
    font-family: var(--reabot-bf);
    font-size: 13.5px;
    color: var(--reabot-body);
    max-width: 400px;
    margin: 0 auto 18px;
    line-height: 1.7;
}
.reabot-welcome-group {
    margin-top: 14px;
    text-align: left;
}
.reabot-welcome-group-label {
    font-family: var(--reabot-tf);
    font-weight: 700;
    font-size: 10.5px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--reabot-coral-dark);
    margin: 0 0 7px 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.reabot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}
.reabot-suggestion-chip {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--reabot-line);
    border-radius: 12px;
    padding: 9px 15px;
    font-family: var(--reabot-tf);
    font-weight: 600;
    font-size: 12px;
    color: var(--reabot-body);
    cursor: pointer;
    transition: all 0.22s ease;
}
.reabot-suggestion-chip:hover {
    border-color: var(--reabot-coral);
    color: var(--reabot-coral);
    background: rgba(235, 103, 83, 0.08);
    transform: translateY(-1px);
}

.reabot-msg {
    display: flex;
    gap: 11px;
    max-width: 100%;
    animation: reabotMsgIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes reabotMsgIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.reabot-msg-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 4px 12px -4px rgba(16, 24, 40, 0.3);
    border: 1px solid rgba(255,255,255,0.4);
}
.reabot-msg-bot .reabot-msg-avatar {
    background: linear-gradient(135deg, var(--reabot-coral) 0%, var(--reabot-coral-dark) 100%);
    color: #fff;
}
.reabot-msg-user .reabot-msg-avatar {
    background: linear-gradient(135deg, rgba(24,26,32,0.85) 0%, rgba(48,49,55,0.8) 100%);
    color: #fff;
}
.reabot-msg-col {
    gap: 5px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.reabot-msg-user .reabot-msg-col { align-items: flex-end; }
.reabot-msg-bubble {
    position: relative;
    padding: 13px 17px;
    border-radius: 12px;
    font-family: var(--reabot-bf);
    font-size: 14.5px;
    line-height: 1.7;
    word-break: break-word;
}
.reabot-msg-bot .reabot-msg-bubble {
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: var(--reabot-ink);
    border-top-left-radius: 5px;
    box-shadow: 0 10px 30px -14px rgba(16, 24, 40, 0.4), inset 0 1px 0 rgba(255,255,255,0.5);
}
.reabot-msg-user {
    flex-direction: row-reverse;
    margin-left: auto;
}
.reabot-msg-user .reabot-msg-bubble {
    background: linear-gradient(135deg, rgba(235,103,83,0.88) 0%, rgba(217,88,67,0.85) 100%);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    border-top-right-radius: 5px;
    box-shadow: 0 10px 30px -12px rgba(235, 103, 83, 0.55), inset 0 1px 0 rgba(255,255,255,0.2);
}

.reabot-msg-bubble p { margin: 0 0 10px; color: inherit; line-height: 1.7; }
.reabot-msg-bubble p:last-child { margin-bottom: 0; }
.reabot-msg-bubble strong { font-weight: 700; color: inherit; }
.reabot-msg-bubble em { font-style: italic; }
.reabot-msg-bubble ul, .reabot-msg-bubble ol { margin: 6px 0 10px; padding-left: 20px; }
.reabot-msg-bubble li { margin-bottom: 4px; }
.reabot-msg-bubble a {
    color: var(--reabot-coral-dark);
    text-decoration: underline;
    text-decoration-color: rgba(235,103,83,0.4);
    text-underline-offset: 2px;
}
.reabot-msg-user .reabot-msg-bubble a { color: #fff; }
.reabot-msg-bubble blockquote {
    margin: 8px 0 10px;
    padding: 8px 12px;
    border-left: 3px solid var(--reabot-coral);
    background: rgba(235,103,83,0.06);
    border-radius: 6px;
    color: var(--reabot-body);
}
.reabot-msg-bubble table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 12px;
    font-size: 13px;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    overflow: hidden;
}
.reabot-msg-bubble th {
    background: rgba(235,103,83,0.12);
    color: var(--reabot-coral-dark);
    font-family: var(--reabot-tf);
    font-weight: 700;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: left;
    padding: 8px 10px;
}
.reabot-msg-bubble td {
    padding: 7px 10px;
    border-top: 1px solid rgba(236,237,240,0.9);
    color: var(--reabot-ink);
}
.reabot-msg-bubble code {
    background: rgba(235, 103, 83, 0.12);
    color: var(--reabot-coral-dark);
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 0.88em;
    font-family: 'Segoe UI Mono', monospace;
}
.reabot-msg-user .reabot-msg-bubble code {
    background: rgba(255,255,255,0.22);
    color: #fff;
}

.reabot-msg-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px 0;
    flex-wrap: wrap;
}
.reabot-msg-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    background: rgba(255,255,255,0.55);
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--reabot-muted);
    cursor: pointer;
    font-size: 11.5px;
    font-family: var(--reabot-tf);
    font-weight: 600;
    transition: all 0.2s ease;
}
.reabot-msg-action-btn:hover:not(:disabled) {
    color: var(--reabot-coral);
    border-color: rgba(235,103,83,0.35);
    background: rgba(255,255,255,0.9);
}
.reabot-msg-action-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.reabot-msg-action-btn.reabot-fb-on-up { color: var(--reabot-good); border-color: rgba(22,163,74,0.35); background: rgba(22,163,74,0.08); }
.reabot-msg-action-btn.reabot-fb-on-down { color: var(--reabot-bad); border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.08); }
.reabot-msg-action-btn.reabot-copied { color: var(--reabot-good); }
.reabot-msg-action-btn.reabot-speaking { color: var(--reabot-coral); border-color: rgba(235,103,83,0.4); background: rgba(235,103,83,0.08); }
.reabot-msg-time {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--reabot-bf);
    font-size: 11px;
    font-weight: 500;
    color: var(--reabot-muted);
    padding-right: 2px;
}
.reabot-msg-time i { font-size: 11px; color: var(--reabot-coral); }
.reabot-msg-user .reabot-msg-actions { justify-content: flex-end; }

.reabot-followups {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px dashed rgba(235, 103, 83, 0);
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.reabot-followup-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    text-align: left;
    background-color: #FFFFFF;
    border: 1px solid rgba(235, 103, 83, 0.22);
    border-radius: 12px;
    padding: 9px 13px;
    font-family: var(--reabot-bf);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--reabot-ink);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    animation: reabotChipIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.reabot-followup-chip:hover {
    border-color: var(--reabot-coral);
    transform: translateX(2px);
}
.reabot-followup-chip:active { transform: scale(0.98); }
.reabot-followup-chip i {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--reabot-coral);
}
@keyframes reabotChipIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.reabot-think {
    margin: 0 0 10px;
    border: 1px solid rgba(235, 103, 83, 0.25);
    border-radius: 12px;
    background: rgba(235, 103, 83, 0.05);
    overflow: hidden;
}
.reabot-think-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-family: var(--reabot-tf);
    font-weight: 600;
    font-size: 12px;
    color: var(--reabot-coral-dark);
    user-select: none;
}
.reabot-think-head i.reabot-think-chev {
    margin-left: auto;
    transition: transform 0.25s ease;
    font-size: 11px;
}
.reabot-think.reabot-think-collapsed .reabot-think-chev { transform: rotate(-90deg); }
.reabot-think-body {
    padding: 0 12px 10px;
    font-family: var(--reabot-bf);
    font-size: 13px;
    line-height: 1.6;
    color: var(--reabot-body);
    white-space: pre-wrap;
    word-break: break-word;
}
.reabot-think.reabot-think-collapsed .reabot-think-body { display: none; }
.reabot-think-spinner {
    display: inline-block;
    width: 11px;
    height: 11px;
    border: 2px solid rgba(235,103,83,0.3);
    border-top-color: var(--reabot-coral);
    border-radius: 50%;
    animation: reabotSpin 0.7s linear infinite;
}
@keyframes reabotSpin { to { transform: rotate(360deg); } }

.reabot-msg-timer {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--reabot-bf);
    font-size: 11px;
    font-weight: 500;
    color: var(--reabot-muted);
}
.reabot-msg-timer i { font-size: 14px; color: var(--reabot-coral); }

.reabot-token { display: inline; }

.reabot-typing {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 2px;
}
.reabot-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--reabot-muted);
    animation: reabotTyping 1.2s infinite ease-in-out;
}
.reabot-typing span:nth-child(2) { animation-delay: 0.18s; }
.reabot-typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes reabotTyping {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-5px); opacity: 1; }
}

.reabot-followups-loading {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    padding-top: 11px;
    font-family: var(--reabot-bf);
    font-size: 12px;
    color: var(--reabot-muted);
}

/* ============ LEAD-GEN OFFER CARD (subtle, non-intrusive) ============ */
.reabot-offer {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(235, 103, 83, 0.28);
    border-left: 3px solid var(--reabot-coral);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(235,103,83,0.05) 0%, rgba(255,138,122,0.04) 100%);
    display: flex;
    align-items: flex-start;
    gap: 11px;
    animation: reabotOfferIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    position: relative;
}
@keyframes reabotOfferIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.reabot-offer-ico {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--reabot-coral) 0%, var(--reabot-coral-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 4px 10px -4px rgba(235,103,83,0.6);
}
.reabot-offer-body { flex: 1; min-width: 0; }
.reabot-offer-title {
    font-family: var(--reabot-tf);
    font-weight: 700;
    font-size: 12.5px;
    color: var(--reabot-ink);
    margin: 0 0 2px;
    line-height: 1.3;
}
.reabot-offer-text {
    font-family: var(--reabot-bf);
    font-size: 12px;
    color: var(--reabot-body);
    line-height: 1.5;
    margin: 0 0 9px;
}
.reabot-offer-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.reabot-offer-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--reabot-coral) 0%, var(--reabot-coral-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 7px 13px;
    font-family: var(--reabot-tf);
    font-weight: 700;
    font-size: 11.5px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.25s ease;
    box-shadow: 0 6px 14px -6px rgba(235,103,83,0.55);
}
.reabot-offer-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -8px rgba(235,103,83,0.7); }
.reabot-offer-cta:active { transform: scale(0.96); }
.reabot-offer-cta i { font-size: 11px; }
.reabot-offer-dismiss {
    background: transparent;
    border: none;
    color: var(--reabot-muted);
    font-family: var(--reabot-tf);
    font-weight: 600;
    font-size: 11px;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 8px;
    transition: color 0.2s ease;
}
.reabot-offer-dismiss:hover { color: var(--reabot-body); }
.reabot-offer-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--reabot-faint);
    cursor: pointer;
    font-size: 11px;
    padding: 3px;
    border-radius: 6px;
    line-height: 1;
    transition: color 0.2s ease, background 0.2s ease;
}
.reabot-offer-close:hover { color: var(--reabot-body); background: rgba(0,0,0,0.04); }

/* ============ LEAD-GEN INLINE FORM ============ */
.reabot-leadform {
    margin-top: 10px;
    padding: 14px;
    border: 1px solid rgba(235, 103, 83, 0.3);
    border-radius: 12px;
    background: rgba(255,255,255,0.7);
    animation: reabotOfferIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.reabot-leadform h4 {
    font-family: var(--reabot-tf);
    font-weight: 700;
    font-size: 13px;
    color: var(--reabot-ink);
    margin: 0 0 3px;
}
.reabot-leadform p {
    font-family: var(--reabot-bf);
    font-size: 11.5px;
    color: var(--reabot-body);
    margin: 0 0 11px;
    line-height: 1.5;
}
.reabot-leadform-field { margin-bottom: 9px; }
.reabot-leadform-field input {
    width: 100%;
    border: 1px solid var(--reabot-line);
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
    font-family: var(--reabot-bf);
    font-size: 13px;
    color: var(--reabot-ink);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.reabot-leadform-field input:focus {
    border-color: var(--reabot-coral);
    box-shadow: 0 0 0 3px rgba(235,103,83,0.12);
}
.reabot-leadform-actions { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.reabot-leadform-submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--reabot-coral) 0%, var(--reabot-coral-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 16px;
    font-family: var(--reabot-tf);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.18s ease;
}
.reabot-leadform-submit:hover { transform: translateY(-1px); }
.reabot-leadform-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.reabot-leadform-cancel {
    background: transparent;
    border: none;
    color: var(--reabot-muted);
    font-family: var(--reabot-tf);
    font-weight: 600;
    font-size: 11.5px;
    cursor: pointer;
    padding: 8px 6px;
}
.reabot-leadform-cancel:hover { color: var(--reabot-body); }
.reabot-leadform-consent {
    font-family: var(--reabot-bf);
    font-size: 10px;
    color: var(--reabot-muted);
    line-height: 1.5;
    margin: 8px 0 0;
}
.reabot-leadform-done {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 2px;
    font-family: var(--reabot-bf);
    font-size: 12.5px;
    color: var(--reabot-good);
    font-weight: 600;
}
.reabot-leadform-done i { font-size: 15px; }

.reabot-input-area {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px 0px;
    pointer-events: auto;
    transform: translateY(16px);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}
.reabot-overlay.reabot-open .reabot-input-area {
    transform: translateY(0);
    opacity: 1;
}
.reabot-input-glass {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(26px) saturate(160%);
    -webkit-backdrop-filter: blur(26px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 14px 14px 6px;
    box-shadow: 0 16px 44px -18px rgba(16, 24, 40, 0.45), inset 0 1px 0 rgba(255,255,255,0.5);
}
.reabot-input-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.reabot-input-area .inp {
    position: relative;
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}
.reabot-input-area .inp textarea {
    width: 100%;
    height: auto;
    min-height: 52px;
    max-height: 150px;
    border: 1px solid #E2E2E2;
    border-left: 2px solid #EB6753;
    border-radius: 12px;
    background: #F9F9F9;
    padding: 12px 12px 12px 12px;
    font-size: 15px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #222222;
    outline: none;
    transition: border-color .25s;
    font-weight: 500;
    resize: none;
    line-height: 1.6;
}
.reabot-input-area .inp label {
    position: absolute;
    left: 12px;
    top: 12px;
    transform: none;
    padding: 0 6px;
    color: #717171;
    font-size: 15px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    pointer-events: none;
    transition: .2s cubic-bezier(.4, 0, .2, 1);
    font-weight: 500;
    max-width: calc(100% - 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.reabot-input-area .inp textarea:focus + label,
.reabot-input-area .inp textarea:not(:placeholder-shown) + label {
    top: -14px;
    transform: translateY(0);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    color: #EB6753;
    border-radius: 12px;
    background-color: #FFFFFF;
}
.reabot-input-area .inp textarea:not(:focus):not(:placeholder-shown) + label {
    background-color: #F9F9F9;
}
.reabot-input-area .inp textarea:focus {
    border-color: #EB6753;
    animation: reabot-pulse-ring 1.8s ease-out infinite;
    border-width: 2px;
    background-color: #FFFFFF;
}
@keyframes reabot-pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(235,103,83,.35), 0 2px 4px -2px rgba(21,23,28,.1), 0 8px 16px -10px rgba(21,23,28,.15);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(235,103,83,0), 0 2px 4px -2px rgba(21,23,28,.1), 0 8px 16px -10px rgba(21,23,28,.15);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(235,103,83,0), 0 2px 4px -2px rgba(21,23,28,.1), 0 8px 16px -10px rgba(21,23,28,.15);
    }
}
@media (prefers-reduced-motion: reduce) {
    .reabot-input-area .inp textarea { transition: none; }
    .reabot-input-area .inp textarea:focus {
        animation: none;
        box-shadow: 0 0 0 4px rgba(235,103,83,.18), 0 2px 4px -2px rgba(21,23,28,.1), 0 8px 16px -10px rgba(21,23,28,.15);
    }
    .reabot-followup-chip { animation: none; }
}

.reabot-charcount {
    position: absolute;
    right: 10px;
    bottom: -16px;
    font-family: var(--reabot-bf);
    font-size: 10.5px;
    color: var(--reabot-muted);
    display: none;
}
.reabot-charcount.reabot-warn { display: block; color: var(--reabot-coral-dark); font-weight: 600; }

.reabot-mic-btn {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    border: 1px solid var(--reabot-line);
    background: rgba(255,255,255,0.85);
    color: var(--reabot-body);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.reabot-mic-btn:hover { border-color: var(--reabot-coral); color: var(--reabot-coral); }
.reabot-mic-btn.reabot-mic-live {
    background: linear-gradient(135deg, var(--reabot-coral) 0%, var(--reabot-coral-dark) 100%);
    color: #fff;
    border-color: transparent;
    animation: reabot-pulse-ring 1.4s ease-out infinite;
}
.reabot-mic-btn.reabot-mic-hidden { display: none; }

.reabot-send-btn {
    position: relative;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--reabot-coral) 0%, var(--reabot-coral-dark) 100%);
    color: #fff;
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 8px 18px -6px rgba(235, 103, 83, 0.55);
    transition: transform 0.18s ease, box-shadow 0.25s ease, opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.reabot-send-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #303137 0%, #303137 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 0;
}
.reabot-send-btn:hover:not(:disabled) {
    box-shadow: 0 14px 26px -8px rgba(20, 20, 26, 0.7);
}
.reabot-send-btn:hover:not(:disabled)::after {
    opacity: 1;
}
.reabot-send-btn:active:not(:disabled) { transform: scale(0.94); }
.reabot-send-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.reabot-send-btn.reabot-stop-mode {
    background: linear-gradient(135deg, #303137 0%, #181A20 100%);
    box-shadow: 0 8px 18px -6px rgba(24, 26, 32, 0.55);
}
.reabot-send-btn.reabot-stop-mode::after { display: none; }

.reabot-send-btn i {
    position: relative;
    z-index: 2;
    display: block;
    transition: transform 0.18s ease;
    will-change: transform, opacity;
}

@keyframes reabot-plane-rev {
    0%   { transform: translate(0, 0) scale(1); }
    35%  { transform: translate(5px, -5px) scale(1.05); }
    60%  { transform: translate(-4px, 4px) scale(0.96); }
    100% { transform: translate(0, 0) scale(1); }
}
.reabot-send-btn:hover:not(:disabled):not(.reabot-stop-mode) i {
    animation: reabot-plane-rev 1.3s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}
@media (prefers-reduced-motion: reduce) {
    .reabot-send-btn i { animation: none !important; }
}

.reabot-input-footnote {
    text-align: center;
    font-size: 11px;
    color: #999999;
    padding: 6px 0 8px;
    font-family: var(--reabot-bf);
}

.reabot-scrollfab {
    position: absolute;
    right: 24px;
    bottom: 150px;
    z-index: 4;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--reabot-coral);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px -8px rgba(16,24,40,0.4);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(8px) scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
    visibility: hidden;
}
.reabot-scrollfab.reabot-fab-show {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}
.reabot-scrollfab:hover { background: #fff; transform: translateY(-2px) scale(1.05); }

.reabot-toast {
    position: absolute;
    left: 50%;
    bottom: 118px;
    transform: translateX(-50%) translateY(10px);
    z-index: 8;
    background: rgba(24, 26, 32, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    font-family: var(--reabot-tf);
    font-weight: 600;
    font-size: 12.5px;
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: 0 12px 30px -10px rgba(16,24,40,0.6);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: calc(100vw - 40px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.reabot-toast.reabot-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.reabot-toast i { color: var(--reabot-coral-light); }

.reabot-pins-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 400px;
    max-width: 94vw;
    z-index: 6;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(34px) saturate(160%);
    -webkit-backdrop-filter: blur(34px) saturate(160%);
    border-left: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: -18px 0 50px -20px rgba(16, 24, 40, 0.4);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0s linear 0.4s;
    pointer-events: auto;
    visibility: hidden;
}
.reabot-pins-drawer.reabot-pins-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0s;
}
.reabot-pins-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 14px;
    border-bottom: 1px solid rgba(236, 237, 240, 0.7);
}
.reabot-pins-header h3 {
    font-family: var(--reabot-tf);
    font-weight: 700;
    font-size: 18px;
    color: var(--reabot-ink);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}
.reabot-pins-header h3 i { color: var(--reabot-coral); font-size: 16px; }
.reabot-pins-headbtns { display: flex; align-items: center; gap: 6px; }
.reabot-pins-sub {
    flex-shrink: 0;
    padding: 12px 22px 4px;
    font-family: var(--reabot-bf);
    font-size: 12px;
    line-height: 1.55;
    color: var(--reabot-muted);
}
.reabot-pins-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px 18px;
}
.reabot-pin-card {
    position: relative;
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--reabot-line);
    border-left: 3px solid var(--reabot-coral);
    border-radius: 14px;
    padding: 13px 14px 10px;
    margin-bottom: 11px;
    box-shadow: 0 6px 16px -10px rgba(16,24,40,0.25);
    animation: reabotPinIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.reabot-pin-card:hover {
    border-color: rgba(235,103,83,0.45);
    box-shadow: 0 10px 22px -10px rgba(235,103,83,0.35);
}
@keyframes reabotPinIn {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.reabot-pin-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--reabot-tf);
    font-weight: 600;
    font-size: 10.5px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--reabot-muted);
    margin-bottom: 7px;
}
.reabot-pin-meta i { color: var(--reabot-coral); font-size: 10px; }
.reabot-pin-q {
    font-family: var(--reabot-tf);
    font-weight: 700;
    font-size: 12.5px;
    color: var(--reabot-ink);
    line-height: 1.4;
    margin-bottom: 6px;
}
.reabot-pin-text {
    font-family: var(--reabot-bf);
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--reabot-body);
    max-height: 66px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}
.reabot-pin-text::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 26px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.95));
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.reabot-pin-card.reabot-pin-expanded .reabot-pin-text { max-height: 1200px; }
.reabot-pin-card.reabot-pin-expanded .reabot-pin-text::after { opacity: 0; }
.reabot-pin-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px dashed rgba(235,103,83,0.2);
}
.reabot-pin-act {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: none;
    background: transparent;
    border-radius: 8px;
    padding: 5px 8px;
    font-family: var(--reabot-tf);
    font-weight: 600;
    font-size: 10.5px;
    color: var(--reabot-muted);
    cursor: pointer;
    transition: all 0.18s ease;
}
.reabot-pin-act:hover { background: rgba(235,103,83,0.1); color: var(--reabot-coral-dark); }
.reabot-pin-act i { font-size: 10.5px; }
.reabot-pin-act.reabot-pin-del:hover { background: rgba(220,53,69,0.1); color: #c0392b; }
.reabot-pins-empty {
    text-align: center;
    padding: 44px 26px;
    font-family: var(--reabot-bf);
    font-size: 13px;
    line-height: 1.65;
    color: var(--reabot-muted);
}
.reabot-pins-empty i {
    display: block;
    font-size: 30px;
    color: rgba(235,103,83,0.4);
    margin-bottom: 12px;
}
.reabot-pins-empty strong {
    display: block;
    font-family: var(--reabot-tf);
    font-size: 14.5px;
    color: var(--reabot-body);
    margin-bottom: 5px;
}
.reabot-msg-action-btn.reabot-pinned {
    color: var(--reabot-coral-dark);
    border-color: rgba(235,103,83,0.4);
    background: rgba(235,103,83,0.12);
}

.reabot-history-drawer {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 360px;
    max-width: 88vw;
    z-index: 6;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(34px) saturate(160%);
    -webkit-backdrop-filter: blur(34px) saturate(160%);
    border-right: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 18px 0 50px -20px rgba(16, 24, 40, 0.4);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0s linear 0.4s;
    pointer-events: auto;
    visibility: hidden;
    clip-path: inset(0 -60px 0 0);
}
.reabot-history-drawer.reabot-history-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0s;
}
.reabot-history-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 14px;
    border-bottom: 1px solid rgba(236, 237, 240, 0.7);
}
.reabot-history-header h3 {
    font-family: var(--reabot-tf);
    font-weight: 700;
    font-size: 18px;
    color: var(--reabot-ink);
    margin: 0;
}
.reabot-history-close {
    background: rgba(248, 249, 251, 0.8);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--reabot-muted);
    font-size: 15px;
    transition: all 0.2s ease;
}
.reabot-history-close:hover { background: var(--reabot-line); color: var(--reabot-ink); }

.reabot-history-search {
    flex-shrink: 0;
    position: relative;
    margin: 14px 16px 4px;
}
.reabot-history-search i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--reabot-muted);
    pointer-events: none;
}
.reabot-history-search input {
    width: 100%;
    border: 1px solid var(--reabot-line);
    border-radius: 12px;
    background: rgba(255,255,255,0.8);
    padding: 11px 34px 11px 34px;
    font-family: var(--reabot-bf);
    font-size: 13.5px;
    color: var(--reabot-ink);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.reabot-history-search input::placeholder { color: var(--reabot-faint); }
.reabot-history-search input:focus {
    border-color: var(--reabot-coral);
    box-shadow: 0 0 0 3px rgba(235,103,83,0.12);
}
.reabot-history-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--reabot-faint);
    cursor: pointer;
    font-size: 13px;
    padding: 6px;
    border-radius: 50%;
    display: none;
    line-height: 1;
    transition: color 0.2s ease, background 0.2s ease;
}
.reabot-history-search-clear:hover { color: var(--reabot-ink); background: var(--reabot-line); }
.reabot-history-search.reabot-has-text .reabot-history-search-clear { display: block; }

.reabot-history-newchat {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 16px 4px;
    padding: 13px;
    border-radius: 12px;
    border: 1px dashed var(--reabot-coral);
    background: rgba(235, 103, 83, 0.06);
    color: var(--reabot-coral);
    font-family: var(--reabot-tf);
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.reabot-history-newchat:hover { background: rgba(235, 103, 83, 0.12); }

.reabot-history-section {
    font-family: var(--reabot-tf);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--reabot-muted);
    padding: 12px 6px 4px;
}
.reabot-history-section:first-child { padding-top: 4px; }

.reabot-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.reabot-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(236, 237, 240, 0.8);
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}
.reabot-history-item:hover {
    border-color: rgba(235, 103, 83, 0.4);
    background: rgba(255,255,255,0.85);
}
.reabot-history-item.reabot-history-active {
    border-color: var(--reabot-coral);
    background: rgba(235, 103, 83, 0.07);
}
.reabot-history-item.reabot-history-match {
    border-color: rgba(235, 103, 83, 0.55);
    background: rgba(235, 103, 83, 0.05);
    box-shadow: inset 3px 0 0 var(--reabot-coral);
}
.reabot-history-item.reabot-history-match:hover {
    background: rgba(235, 103, 83, 0.1);
}
.reabot-history-item-ico {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(235, 103, 83, 0.12);
    color: var(--reabot-coral);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.reabot-history-item-body { flex: 1; min-width: 0; }
.reabot-history-item-title {
    font-family: var(--reabot-tf);
    font-weight: 600;
    font-size: 13.5px;
    color: var(--reabot-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.reabot-history-item-addr {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--reabot-bf);
    font-size: 11.5px;
    color: var(--reabot-coral-dark);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.reabot-history-item-addr i { font-size: 10px; flex-shrink: 0; }
.reabot-history-item-date {
    font-family: var(--reabot-bf);
    font-size: 11px;
    color: var(--reabot-faint);
    margin-top: 3px;
}
.reabot-history-item-badge {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
    font-family: var(--reabot-tf);
    font-weight: 700;
    font-size: 9px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #fff;
    background: var(--reabot-coral);
    border-radius: 12px;
    padding: 3px 8px;
}
.reabot-history-item-del {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--reabot-faint);
    cursor: pointer;
    font-size: 14px;
    padding: 6px;
    border-radius: 12px;
    transition: all 0.2s ease;
}
.reabot-history-item-del:hover { color: #ef4444; background: rgba(239, 68, 68, 0.08); }
.reabot-history-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--reabot-muted);
    font-family: var(--reabot-bf);
    font-size: 14px;
}
.reabot-hl {
    background: rgba(235, 103, 83, 0.22);
    color: var(--reabot-coral-dark);
    border-radius: 3px;
    padding: 0 1px;
    font-weight: 700;
}

@media (max-width: 575.98px) {
    .reabot-messages { padding: 18px 14px 10px; }
    .reabot-input-area { padding: 0 14px 0px; }
    .reabot-pins-drawer { width: 100vw; max-width: 100vw; }
    .reabot-msg-bubble { font-size: 14px; }
    .reabot-send-btn, .reabot-mic-btn { width: 48px; height: 48px; }
    .reabot-scrollfab { right: 14px; bottom: 160px; }
}

.reabot-msg-avatar-col {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.reabot-msg-meta-under {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.reabot-msg-meta-under .reabot-msg-timer {
    flex-direction: column;
    gap: 2px;
    font-size: 10px;
    text-align: center;
}

  .reabot-msg-bubble ol {
    list-style: none;
    counter-reset: mortgage-step;
    padding-left: 0;
    margin: 16px 0;
  }
  .reabot-msg-bubble ol li {
    counter-increment: mortgage-step;
    position: relative;
    padding-left: 44px;
    margin-bottom: 14px;
    line-height: 1.55;
  }
  .reabot-msg-bubble ol li::before {
    content: counter(mortgage-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    background: #EB6753;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
  }
  .reabot-msg-bubble ol li strong {
    color: #EB6753;
    display: block;
    margin-bottom: 2px;
  }

  .reabot-msg-bubble ul {
    list-style: none;
    padding-left: 0;
    margin: 16px 0;
  }
  .reabot-msg-bubble ul li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 10px;
    line-height: 1.55;
  }
  .reabot-msg-bubble ul li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 8px;
    width: 8px;
    height: 8px;
    background: #EB6753;
    border-radius: 50%;
  }
