/* ==========================================================================
   LaborApp chat widget 4.0
   Palette follows the site brand: violet (#6A3FD1), coral (#FF7A59), mint (#2FC9A3).
   Everything is scoped to .lc-widget and driven by the --lc-* tokens below.
   ========================================================================== */

.lc-widget {
    --lc-ink: #1B1830;
    --lc-ink-2: #4A4666;
    --lc-muted: #726E8C;
    --lc-faint: #A29FB8;
    --lc-brand: #6A3FD1;
    --lc-brand-d: #5530B0;
    --lc-brand-soft: #EFE9FC;
    --lc-brand-softer: #F7F4FE;
    --lc-coral: #FF7A59;
    --lc-coral-d: #F2603C;
    --lc-mint: #2FC9A3;
    --lc-mint-d: #14A585;
    --lc-rose: #F0506E;
    --lc-line: #E6E0F1;
    --lc-line-2: #D8D0E8;
    --lc-surface: #FFFFFF;
    --lc-sunken: #F4F0FA;
    --lc-wall: #F1ECF9;
    --lc-mine-a: #7B4FE6;
    --lc-mine-b: #5A33BE;
    --lc-night-a: #1B1830;
    --lc-night-b: #2E2160;
    --lc-radius: 20px;
    --lc-shadow: 0 28px 80px rgba(27, 24, 48, .28), 0 4px 16px rgba(27, 24, 48, .10);
    --lc-ease: cubic-bezier(.2, .8, .2, 1);
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 2500;
    font-family: "DM Sans", "Segoe UI", system-ui, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: var(--lc-ink);
    -webkit-font-smoothing: antialiased;
}

    .lc-widget *, .lc-widget *::before, .lc-widget *::after {
        box-sizing: border-box;
    }

    .lc-widget [hidden] {
        display: none !important;
    }

:where(.lc-widget) button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

:where(.lc-widget) img {
    max-width: 100%;
}

.lc-widget :focus-visible {
    outline: 2px solid var(--lc-brand);
    outline-offset: 2px;
}

/* ---- launcher ------------------------------------------------------------ */

.lc-launcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 20px 0 18px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #7B4FE6 0%, #5530B0 100%);
    box-shadow: 0 14px 34px rgba(85, 48, 176, .38), inset 0 1px 0 rgba(255, 255, 255, .22);
    font-weight: 700;
    letter-spacing: .1px;
    transition: transform .18s var(--lc-ease), box-shadow .18s var(--lc-ease), filter .18s;
}

    .lc-launcher i {
        font-size: 18px;
    }

    .lc-launcher:hover {
        transform: translateY(-2px);
        box-shadow: 0 18px 40px rgba(85, 48, 176, .46), inset 0 1px 0 rgba(255, 255, 255, .22);
    }

    .lc-launcher:active {
        transform: translateY(0) scale(.98);
    }

    .lc-launcher.is-open {
        filter: saturate(.85) brightness(.96);
    }

    .lc-launcher.is-ringing {
        animation: lc-ring .9s var(--lc-ease) 1;
    }

.lc-unread-badge {
    display: inline-grid;
    place-items: center;
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    border-radius: 999px;
    color: #fff;
    background: var(--lc-coral);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .95);
    font-size: 11px;
    font-weight: 800;
}

.lc-launcher .lc-unread-badge {
    position: absolute;
    top: -6px;
    right: -4px;
}

@keyframes lc-ring {
    0% {
        transform: rotate(0);
    }

    15% {
        transform: rotate(-7deg) scale(1.06);
    }

    30% {
        transform: rotate(6deg) scale(1.06);
    }

    45% {
        transform: rotate(-4deg);
    }

    60% {
        transform: rotate(3deg);
    }

    100% {
        transform: rotate(0);
    }
}

/* ---- panel --------------------------------------------------------------- */

.lc-panel {
    position: absolute;
    right: 0;
    bottom: 68px;
    display: flex;
    flex-direction: column;
    width: min(940px, calc(100vw - 32px));
    height: min(680px, calc(100vh - 112px));
    min-height: 380px;
    overflow: hidden;
    background: var(--lc-surface);
    border: 1px solid var(--lc-line);
    border-radius: var(--lc-radius);
    box-shadow: var(--lc-shadow);
    transform-origin: bottom right;
    animation: lc-open .22s var(--lc-ease);
}

@keyframes lc-open {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.97);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.lc-panel-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    padding: 13px 16px 13px 18px;
    color: #fff;
    background: radial-gradient(220px 120px at 100% 0%, rgba(255, 122, 89, .38), transparent 70%), linear-gradient(115deg, var(--lc-night-a) 0%, var(--lc-night-b) 60%, #4A2C9E 100%);
}

.lc-header-title, .lc-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lc-header-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .13);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
    font-size: 17px;
}

.lc-header-title strong {
    display: block;
    font: 700 16px/1.2 "Outfit", "DM Sans", sans-serif;
    letter-spacing: .1px;
}

.lc-header-title small {
    display: block;
    margin-top: 1px;
    color: #CFC6EE;
    font-size: 12px;
}

.lc-header-actions {
    gap: 6px;
}

    .lc-header-actions button {
        display: grid;
        place-items: center;
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 11px;
        color: #fff;
        background: rgba(255, 255, 255, .10);
        transition: background .15s;
    }

        .lc-header-actions button:hover {
            background: rgba(255, 255, 255, .22);
        }

        .lc-header-actions button.is-spinning i {
            animation: lc-spin .7s linear infinite;
        }

.lc-widget .lc-header-actions button:focus-visible {
    outline-color: #fff;
}

@keyframes lc-spin {
    to {
        transform: rotate(360deg);
    }
}

.lc-banner {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 16px;
    font-size: 12.5px;
    font-weight: 600;
    color: #7A4A00;
    background: #FFF3D6;
    border-bottom: 1px solid #F6DFA6;
}

    .lc-banner[data-kind="offline"] {
        color: #5A3B00;
    }

    .lc-banner[data-kind="auth"], .lc-banner[data-kind="error"] {
        color: #8A1F36;
        background: #FFE9ED;
        border-color: #F8C9D3;
    }

.lc-body {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
}

/* ---- conversation list --------------------------------------------------- */

.lc-conversation-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--lc-surface);
    border-right: 1px solid var(--lc-line);
}

.lc-search {
    position: relative;
    margin: 14px 14px 8px;
}

    .lc-search i {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--lc-faint);
        font-size: 13px;
        pointer-events: none;
    }

    .lc-search input {
        width: 100%;
        height: 40px;
        padding: 0 14px 0 38px;
        border: 1px solid transparent;
        border-radius: 12px;
        color: var(--lc-ink);
        background: var(--lc-sunken);
        font: inherit;
        transition: border-color .15s, background .15s, box-shadow .15s;
    }

        .lc-search input::placeholder {
            color: var(--lc-faint);
        }

        .lc-search input:focus {
            outline: none;
            border-color: var(--lc-brand);
            background: #fff;
            box-shadow: 0 0 0 4px rgba(106, 63, 209, .12);
        }

.lc-list-filters {
    display: flex;
    gap: 6px;
    padding: 4px 14px 10px;
}

    .lc-list-filters button {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 30px;
        padding: 0 13px;
        border: 1px solid var(--lc-line);
        border-radius: 999px;
        color: var(--lc-ink-2);
        background: #fff;
        font-size: 12.5px;
        font-weight: 600;
        transition: background .15s, color .15s, border-color .15s;
    }

        .lc-list-filters button:hover {
            background: var(--lc-brand-softer);
        }

        .lc-list-filters button.is-active {
            color: #fff;
            border-color: var(--lc-brand);
            background: var(--lc-brand);
        }

.lc-filter-count {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    color: #fff;
    background: var(--lc-coral);
    font-size: 10.5px;
    font-weight: 800;
}

.lc-conversation-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 2px 8px 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--lc-line-2) transparent;
}

.lc-conversation-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 10px;
    border: 0;
    border-radius: 14px;
    text-align: left;
    background: transparent;
    transition: background .15s;
}

    .lc-conversation-item:hover {
        background: var(--lc-brand-softer);
    }

    .lc-conversation-item.is-active {
        background: var(--lc-brand-soft);
    }

        .lc-conversation-item.is-active::before {
            content: "";
            position: absolute;
            left: -8px;
            top: 14px;
            bottom: 14px;
            width: 4px;
            border-radius: 0 4px 4px 0;
            background: var(--lc-brand);
        }

.lc-conversation-details {
    flex: 1;
    min-width: 0;
    display: block;
}

.lc-conversation-top, .lc-conversation-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

    .lc-conversation-top strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 14.5px;
        font-weight: 700;
    }

    .lc-conversation-top small {
        flex: none;
        color: var(--lc-faint);
        font-size: 11.5px;
        font-weight: 600;
    }

.lc-conversation-bottom {
    margin-top: 2px;
}

.lc-preview {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--lc-muted);
    font-size: 13px;
}

    .lc-preview i {
        font-size: 11px;
        opacity: .8;
    }

.lc-you {
    color: var(--lc-faint);
}

.lc-conversation-flags {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
}

.lc-flag {
    color: var(--lc-faint);
    font-size: 11px;
}

.lc-conversation-item.has-unread .lc-conversation-top strong {
    color: var(--lc-ink);
}

.lc-conversation-item.has-unread .lc-conversation-top small {
    color: var(--lc-brand);
}

.lc-conversation-item.has-unread .lc-preview {
    color: var(--lc-ink);
    font-weight: 600;
}

.lc-unread-count {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    color: #fff;
    background: var(--lc-coral);
    font-size: 11px;
    font-weight: 800;
}

.lc-verified {
    color: #0EA5E9;
    font-size: .82em;
}

.lc-list-empty {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 48px 24px;
    text-align: center;
    color: var(--lc-muted);
}

    .lc-list-empty i {
        margin-bottom: 6px;
        color: var(--lc-brand-tint, #B49BEA);
        font-size: 34px;
    }

    .lc-list-empty strong {
        color: var(--lc-ink-2);
        font-size: 14px;
    }

    .lc-list-empty p {
        margin: 0;
        font-size: 13px;
    }

/* ---- avatars ------------------------------------------------------------- */

.lc-avatar {
    --a: #7B4FE6;
    --b: #5530B0;
    flex: none;
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    overflow: hidden;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(140deg, var(--a), var(--b));
    font: 700 15px/1 "Outfit", "DM Sans", sans-serif;
    letter-spacing: .3px;
    user-select: none;
}

    .lc-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.lc-avatar-md {
    width: 42px;
    height: 42px;
    font-size: 14px;
}

.lc-av-0 {
    --a: #7B4FE6;
    --b: #5530B0;
}

.lc-av-1 {
    --a: #FF8A5B;
    --b: #F0506E;
}

.lc-av-2 {
    --a: #35D0AA;
    --b: #12977D;
}

.lc-av-3 {
    --a: #44B2F5;
    --b: #5B6CF0;
}

.lc-av-4 {
    --a: #F8C25C;
    --b: #FF7A59;
}

.lc-av-5 {
    --a: #C06CF0;
    --b: #7B4FE6;
}

/* ---- skeleton loaders ---------------------------------------------------- */

.lc-skel {
    display: block;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #EEE9F7 25%, #F8F5FD 50%, #EEE9F7 75%);
    background-size: 200% 100%;
    animation: lc-shimmer 1.3s linear infinite;
}

@keyframes lc-shimmer {
    to {
        background-position: -200% 0;
    }
}

.lc-skel-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
}

.lc-skel-av {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
}

.lc-skel-lines {
    flex: 1;
    display: grid;
    gap: 9px;
}

.lc-skel-short {
    width: 62%;
}

.lc-skel-chat {
    display: grid;
    gap: 14px;
    padding: 20px;
}

    .lc-skel-chat .lc-skel {
        height: 38px;
        width: 46%;
        border-radius: 16px;
    }

    .lc-skel-chat .lc-skel-me {
        justify-self: end;
        width: 38%;
    }

/* ---- chat pane ----------------------------------------------------------- */

.lc-chat-pane {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--lc-wall);
}

.lc-chat-empty {
    flex: 1;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 6px;
    padding: 24px;
    text-align: center;
    color: var(--lc-muted);
    background: radial-gradient(420px 260px at 85% 0%, rgba(255, 122, 89, .14), transparent 70%), radial-gradient(460px 320px at 0% 100%, rgba(47, 201, 163, .14), transparent 70%), var(--lc-wall);
}

.lc-empty-art {
    position: relative;
    width: 112px;
    height: 96px;
    margin-bottom: 14px;
    display: grid;
    place-items: center;
}

    .lc-empty-art > i {
        position: relative;
        z-index: 2;
        display: grid;
        place-items: center;
        width: 62px;
        height: 62px;
        border-radius: 20px;
        color: #fff;
        background: linear-gradient(135deg, #7B4FE6, #5530B0);
        box-shadow: 0 14px 30px rgba(85, 48, 176, .35);
        font-size: 26px;
    }

.lc-empty-bubble {
    position: absolute;
    border-radius: 14px;
}

.lc-empty-bubble-a {
    top: 2px;
    left: 4px;
    width: 44px;
    height: 30px;
    background: var(--lc-coral);
    border-bottom-left-radius: 4px;
    transform: rotate(-8deg);
}

.lc-empty-bubble-b {
    bottom: 4px;
    right: 2px;
    width: 38px;
    height: 26px;
    background: var(--lc-mint);
    border-bottom-right-radius: 4px;
    transform: rotate(7deg);
}

.lc-chat-empty strong {
    color: var(--lc-ink);
    font: 700 18px "Outfit", "DM Sans", sans-serif;
}

.lc-chat-empty p {
    margin: 0;
    max-width: 260px;
}

.lc-active-chat {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.lc-chat-header {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--lc-line);
}

.lc-back {
    display: none;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 11px;
    background: var(--lc-sunken);
    color: var(--lc-ink-2);
}

.lc-chat-person {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
}

.lc-person-details {
    min-width: 0;
    display: grid;
}

    .lc-person-details strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 15px;
        font-weight: 700;
    }

    .lc-person-details small {
        color: var(--lc-muted);
        font-size: 12px;
        font-weight: 500;
    }

        .lc-person-details small.is-online {
            color: var(--lc-mint-d);
            font-weight: 700;
        }

            .lc-person-details small.is-online::before {
                content: "";
                display: inline-block;
                width: 7px;
                height: 7px;
                margin-right: 5px;
                border-radius: 50%;
                background: var(--lc-mint);
                box-shadow: 0 0 0 3px rgba(47, 201, 163, .2);
                vertical-align: 1px;
            }

        .lc-person-details small.is-typing {
            color: var(--lc-brand);
            font-weight: 700;
        }

.lc-chat-tools {
    display: flex;
    gap: 4px;
}

    .lc-chat-tools button {
        display: grid;
        place-items: center;
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 11px;
        color: var(--lc-muted);
        background: transparent;
        transition: background .15s, color .15s;
    }

        .lc-chat-tools button:hover {
            background: var(--lc-sunken);
            color: var(--lc-ink);
        }

        .lc-chat-tools button.is-active {
            color: var(--lc-brand);
            background: var(--lc-brand-soft);
        }

/* ---- messages ------------------------------------------------------------ */

.lc-messages-wrap {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
}

.lc-messages {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 18px 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--lc-line-2) transparent;
    background-color: var(--lc-wall);
    background-image: radial-gradient(rgba(106, 63, 209, .07) 1.2px, transparent 1.2px);
    background-size: 22px 22px;
}

.lc-day {
    display: flex;
    justify-content: center;
    margin: 14px 0 10px;
}

    .lc-day span {
        padding: 4px 12px;
        border-radius: 999px;
        color: var(--lc-ink-2);
        background: rgba(255, 255, 255, .92);
        box-shadow: 0 1px 4px rgba(27, 24, 48, .1);
        font-size: 11.5px;
        font-weight: 700;
    }

.lc-unread-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0 10px;
    color: var(--lc-coral-d);
    font-size: 11.5px;
    font-weight: 800;
}

    .lc-unread-divider::before, .lc-unread-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 122, 89, .55));
    }

    .lc-unread-divider::after {
        background: linear-gradient(270deg, transparent, rgba(255, 122, 89, .55));
    }

.lc-msg {
    display: flex;
    margin-top: 2px;
}

    .lc-msg.is-first {
        margin-top: 10px;
    }

    .lc-msg.is-mine {
        justify-content: flex-end;
    }

    .lc-msg.lc-enter .lc-bubble {
        animation: lc-pop .2s var(--lc-ease);
    }

    .lc-msg.is-mine.lc-enter .lc-bubble {
        transform-origin: bottom right;
    }

    .lc-msg.is-theirs.lc-enter .lc-bubble {
        transform-origin: bottom left;
    }

@keyframes lc-pop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.96);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.lc-msg.is-flash .lc-bubble {
    animation: lc-flash 1.4s ease;
}

@keyframes lc-flash {
    0%, 60% {
        box-shadow: 0 0 0 4px rgba(255, 122, 89, .45);
    }

    100% {
        box-shadow: 0 1px 2px rgba(27, 24, 48, .1);
    }
}

.lc-bubble {
    position: relative;
    max-width: min(78%, 520px);
    padding: 7px 11px 6px;
    border-radius: 16px;
    background: var(--lc-surface);
    box-shadow: 0 1px 2px rgba(27, 24, 48, .1);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.lc-msg.is-theirs .lc-bubble {
    border-bottom-left-radius: 5px;
}

.lc-msg.is-theirs:not(.is-last) .lc-bubble {
    border-bottom-left-radius: 16px;
}

.lc-msg.is-theirs:not(.is-first) .lc-bubble {
    border-top-left-radius: 5px;
}

.lc-msg.is-mine .lc-bubble {
    color: #fff;
    background: linear-gradient(135deg, var(--lc-mine-a), var(--lc-mine-b));
    box-shadow: 0 2px 8px rgba(85, 48, 176, .28);
}

.lc-msg.is-mine .lc-bubble {
    border-bottom-right-radius: 5px;
}

.lc-msg.is-mine:not(.is-last) .lc-bubble {
    border-bottom-right-radius: 16px;
}

.lc-msg.is-mine:not(.is-first) .lc-bubble {
    border-top-right-radius: 5px;
}

.lc-msg.is-pending .lc-bubble {
    opacity: .94;
}

.lc-msg.is-failed .lc-bubble {
    background: linear-gradient(135deg, #C7566B, #A93A53);
    opacity: 1;
}

.lc-text {
    white-space: pre-wrap;
    font-size: 14.5px;
    line-height: 1.42;
}

    .lc-text a {
        color: inherit;
        text-decoration: underline;
        text-underline-offset: 2px;
        text-decoration-thickness: 1px;
    }

.lc-msg.is-theirs .lc-text a {
    color: var(--lc-brand);
}

.lc-text-deleted {
    display: flex;
    align-items: center;
    gap: 7px;
    font-style: italic;
    opacity: .72;
}

.lc-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    margin-top: 2px;
    font-size: 10.5px;
    line-height: 1;
    color: var(--lc-faint);
    user-select: none;
}

    .lc-meta em {
        font-style: normal;
    }

.lc-msg.is-mine .lc-meta {
    color: rgba(255, 255, 255, .72);
}

.lc-r {
    font-size: 11px;
}

.lc-r-read {
    color: #7DF3D4;
}

.lc-msg.is-theirs .lc-r {
    display: none;
}

/* reply quote */
.lc-quote {
    display: grid;
    gap: 1px;
    width: 100%;
    margin: 0 0 6px;
    padding: 5px 9px;
    border: 0;
    border-left: 3px solid var(--lc-coral);
    border-radius: 8px;
    text-align: left;
    background: rgba(106, 63, 209, .08);
}

    .lc-quote strong {
        color: var(--lc-coral-d);
        font-size: 11.5px;
    }

    .lc-quote span {
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        font-size: 12.5px;
        color: var(--lc-ink-2);
    }

.lc-msg.is-mine .lc-quote {
    background: rgba(255, 255, 255, .16);
    border-left-color: #FFC1AE;
}

    .lc-msg.is-mine .lc-quote strong {
        color: #FFD6C9;
    }

    .lc-msg.is-mine .lc-quote span {
        color: rgba(255, 255, 255, .88);
    }

/* image thumbnails */
.lc-media {
    display: grid;
    gap: 3px;
    margin: 0 0 5px;
    overflow: hidden;
    border-radius: 11px;
    width: min(300px, 100%);
}

.lc-media-1 {
    grid-template-columns: 1fr;
}

.lc-media-2, .lc-media-4 {
    grid-template-columns: 1fr 1fr;
}

.lc-media-3 {
    grid-template-columns: 1fr 1fr;
}

    .lc-media-3 .lc-thumb:first-child {
        grid-column: 1 / -1;
        aspect-ratio: 16 / 9;
    }

.lc-thumb {
    position: relative;
    display: block;
    padding: 0;
    border: 0;
    aspect-ratio: 1;
    overflow: hidden;
    background: #E9E3F5;
}

.lc-media-1 .lc-thumb {
    aspect-ratio: 4 / 3;
}

.lc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s var(--lc-ease);
}

.lc-thumb:hover img {
    transform: scale(1.04);
}

.lc-more-count {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(27, 24, 48, .55);
    font: 700 22px "Outfit", sans-serif;
}

.lc-video {
    margin: 0 0 5px;
    overflow: hidden;
    border-radius: 11px;
    background: #000;
    width: min(300px, 100%);
    aspect-ratio: 16 / 9;
}

    .lc-video video {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: contain;
    }

.lc-audio {
    margin: 0 0 5px;
    display: grid;
    gap: 4px;
    width: min(280px, 100%);
}

.lc-audio-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    opacity: .85;
}

.lc-audio audio {
    width: 100%;
    height: 36px;
}

.lc-file {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(290px, 100%);
    margin: 0 0 5px;
    padding: 8px 10px;
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    background: rgba(106, 63, 209, .08);
    transition: background .15s;
}

a.lc-file:hover {
    background: rgba(106, 63, 209, .15);
}

.lc-msg.is-mine .lc-file {
    background: rgba(255, 255, 255, .16);
}

.lc-msg.is-mine a.lc-file:hover {
    background: rgba(255, 255, 255, .26);
}

.lc-file-icon {
    --fc: #6A3FD1;
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    color: #fff;
    background: var(--fc);
    font-size: 18px;
}

.lc-file[data-kind="pdf"] .lc-file-icon, .lc-tray-item[data-kind="pdf"] .lc-tray-visual {
    --fc: #E5484D;
}

.lc-file[data-kind="word"] .lc-file-icon, .lc-tray-item[data-kind="word"] .lc-tray-visual {
    --fc: #3B82F6;
}

.lc-file[data-kind="excel"] .lc-file-icon, .lc-tray-item[data-kind="excel"] .lc-tray-visual {
    --fc: #1FA971;
}

.lc-file[data-kind="ppt"] .lc-file-icon, .lc-tray-item[data-kind="ppt"] .lc-tray-visual {
    --fc: #F2763A;
}

.lc-file[data-kind="zip"] .lc-file-icon, .lc-tray-item[data-kind="zip"] .lc-tray-visual {
    --fc: #C79A2B;
}

.lc-file[data-kind="text"] .lc-file-icon, .lc-tray-item[data-kind="text"] .lc-tray-visual {
    --fc: #6B7280;
}

.lc-file-info {
    flex: 1;
    min-width: 0;
    display: grid;
}

    .lc-file-info strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px;
    }

    .lc-file-info small {
        font-size: 11.5px;
        opacity: .72;
    }

.lc-file-dl {
    flex: none;
    opacity: .6;
    font-size: 13px;
}

.lc-upbar {
    height: 3px;
    margin: 6px 0 2px;
    overflow: hidden;
    border-radius: 3px;
    background: rgba(255, 255, 255, .3);
}

    .lc-upbar i {
        display: block;
        height: 100%;
        border-radius: 3px;
        background: #fff;
        transition: width .2s linear;
    }

.lc-failed {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-top: 6px;
    font-size: 12px;
}

    .lc-failed span {
        flex: 1 1 100%;
        opacity: .92;
    }

    .lc-failed button {
        padding: 4px 10px;
        border: 0;
        border-radius: 999px;
        color: #fff;
        background: rgba(255, 255, 255, .22);
        font-size: 12px;
        font-weight: 700;
    }

        .lc-failed button:hover {
            background: rgba(255, 255, 255, .34);
        }

/* per-message menu button */
.lc-msg-menu {
    position: absolute;
    top: 3px;
    right: 3px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    font-size: 11px;
    opacity: 0;
    color: var(--lc-ink-2);
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 1px 4px rgba(27, 24, 48, .2);
    transition: opacity .12s;
}

    .lc-bubble:hover .lc-msg-menu, .lc-msg-menu:focus-visible {
        opacity: 1;
    }

@media (hover: none) {
    .lc-msg-menu {
        display: none;
    }
}

.lc-messages-empty {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 60px 20px;
    text-align: center;
    color: var(--lc-muted);
}

    .lc-messages-empty i {
        margin-bottom: 8px;
        color: var(--lc-coral);
        font-size: 32px;
    }

    .lc-messages-empty strong {
        color: var(--lc-ink);
        font: 700 17px "Outfit", sans-serif;
    }

    .lc-messages-empty p {
        margin: 0;
    }

/* jump to latest */
.lc-jump {
    position: absolute;
    right: 18px;
    bottom: 14px;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    color: var(--lc-brand);
    background: #fff;
    box-shadow: 0 6px 18px rgba(27, 24, 48, .22);
}

.lc-jump-count {
    position: absolute;
    top: -6px;
    right: -4px;
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    color: #fff;
    background: var(--lc-coral);
    font-size: 11px;
    font-weight: 800;
}

.lc-drop {
    position: absolute;
    inset: 8px;
    z-index: 8;
    display: grid;
    place-items: center;
    text-align: center;
    border: 2px dashed var(--lc-brand);
    border-radius: 18px;
    color: var(--lc-brand-d);
    background: rgba(247, 244, 254, .94);
}

    .lc-drop > div {
        display: grid;
        gap: 4px;
        justify-items: center;
    }

    .lc-drop i {
        font-size: 34px;
    }

    .lc-drop strong {
        font: 700 17px "Outfit", sans-serif;
    }

    .lc-drop small {
        color: var(--lc-muted);
    }

/* typing */
.lc-typing {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 20px 6px;
    color: var(--lc-brand);
    font-size: 12px;
    font-weight: 600;
    background: var(--lc-wall);
}

.lc-typing-dots {
    display: inline-flex;
    gap: 3px;
    padding: 6px 9px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(27, 24, 48, .1);
}

    .lc-typing-dots i {
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: var(--lc-brand);
        animation: lc-bounce 1.1s infinite ease-in-out;
    }

        .lc-typing-dots i:nth-child(2) {
            animation-delay: .15s;
        }

        .lc-typing-dots i:nth-child(3) {
            animation-delay: .3s;
        }

@keyframes lc-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: .45;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* ---- reply / edit bar ---------------------------------------------------- */

.lc-reply-preview {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: #fff;
    border-top: 1px solid var(--lc-line);
    border-left: 4px solid var(--lc-coral);
}

    .lc-reply-preview.is-editing {
        border-left-color: var(--lc-mint);
    }

.lc-reply-icon {
    color: var(--lc-coral);
}

.lc-reply-preview.is-editing .lc-reply-icon {
    color: var(--lc-mint-d);
}

.lc-reply-body {
    flex: 1;
    min-width: 0;
    display: grid;
}

    .lc-reply-body small {
        color: var(--lc-coral-d);
        font-weight: 700;
        font-size: 12px;
    }

.lc-reply-preview.is-editing .lc-reply-body small {
    color: var(--lc-mint-d);
}

.lc-reply-body span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--lc-ink-2);
    font-size: 13px;
}

.lc-reply-preview button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 9px;
    color: var(--lc-muted);
    background: var(--lc-sunken);
}

/* ---- attachment tray ----------------------------------------------------- */

.lc-attach-tray {
    flex: none;
    padding: 10px 14px 4px;
    background: #fff;
    border-top: 1px solid var(--lc-line);
}

.lc-tray-scroll {
    display: flex;
    gap: 10px;
    padding: 8px 8px 8px 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.lc-tray-item {
    position: relative;
    flex: none;
    display: flex;
    align-items: center;
    gap: 9px;
    max-width: 230px;
    padding: 6px 30px 6px 6px;
    border: 1px solid var(--lc-line);
    border-radius: 13px;
    background: var(--lc-brand-softer);
}

    .lc-tray-item.is-image {
        padding: 0;
        border: 0;
        background: none;
    }

.lc-tray-visual {
    --fc: #6A3FD1;
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border-radius: 11px;
    color: #fff;
    background: var(--lc-sunken);
    font-size: 22px;
}

.lc-tray-item:not(.is-image) .lc-tray-visual {
    background: var(--fc);
}

.lc-tray-item.is-image .lc-tray-visual {
    width: 74px;
    height: 74px;
    border-radius: 13px;
    box-shadow: 0 1px 4px rgba(27, 24, 48, .18);
}

.lc-tray-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lc-tray-item.is-processing .lc-tray-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .55);
}

.lc-spin {
    position: absolute;
    z-index: 2;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(106, 63, 209, .25);
    border-top-color: var(--lc-brand);
    border-radius: 50%;
    animation: lc-spin .7s linear infinite;
}

.lc-tray-name {
    min-width: 0;
    display: grid;
}

    .lc-tray-name strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12.5px;
    }

    .lc-tray-name small {
        color: var(--lc-muted);
        font-size: 11px;
    }

.lc-tray-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: var(--lc-ink);
    font-size: 10px;
}

    .lc-tray-remove:hover {
        background: var(--lc-rose);
    }

.lc-tray-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 6px;
    color: var(--lc-muted);
    font-size: 11.5px;
    font-weight: 600;
}

    .lc-tray-foot button {
        border: 0;
        background: none;
        color: var(--lc-brand);
        font-size: 11.5px;
        font-weight: 700;
    }

/* ---- composer ------------------------------------------------------------ */

.lc-composer {
    position: relative;
    flex: none;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 10px 12px 12px;
    background: #fff;
    border-top: 1px solid var(--lc-line);
}

.lc-attach-tray:not([hidden]) + .lc-composer, .lc-reply-preview:not([hidden]) + .lc-attach-tray + .lc-composer {
    border-top-color: transparent;
}

.lc-composer-tool {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 13px;
    color: var(--lc-muted);
    background: transparent;
    font-size: 17px;
    transition: background .15s, color .15s;
}

    .lc-composer-tool:hover {
        color: var(--lc-brand);
        background: var(--lc-brand-soft);
    }

.lc-input-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

    .lc-input-wrap textarea {
        display: block;
        width: 100%;
        min-height: 42px;
        max-height: 140px;
        resize: none;
        padding: 10px 14px;
        border: 1px solid var(--lc-line);
        border-radius: 15px;
        color: var(--lc-ink);
        background: var(--lc-sunken);
        font: inherit;
        font-size: 14.5px;
        line-height: 1.4;
        transition: border-color .15s, background .15s, box-shadow .15s;
    }

        .lc-input-wrap textarea::placeholder {
            color: var(--lc-faint);
        }

        .lc-input-wrap textarea:focus {
            outline: none;
            border-color: var(--lc-brand);
            background: #fff;
            box-shadow: 0 0 0 4px rgba(106, 63, 209, .12);
        }

.lc-char-count {
    position: absolute;
    right: 10px;
    bottom: -16px;
    color: var(--lc-muted);
    font-size: 11px;
    font-weight: 600;
}

.lc-send {
    flex: none;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: var(--lc-line-2);
    font-size: 16px;
    transition: background .2s, transform .15s var(--lc-ease), box-shadow .2s;
}

    .lc-send.is-ready {
        background: linear-gradient(135deg, #FF8A5B, #F0506E);
        box-shadow: 0 8px 18px rgba(240, 80, 110, .35);
    }

        .lc-send.is-ready:hover {
            transform: translateY(-1px) rotate(-6deg);
        }

        .lc-send.is-ready:active {
            transform: scale(.94);
        }

    .lc-send:disabled {
        cursor: default;
    }

/* emoji */
.lc-emoji-pop {
    position: absolute;
    left: 50px;
    bottom: calc(100% + 6px);
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    width: 316px;
    max-width: calc(100vw - 40px);
    padding: 8px;
    border: 1px solid var(--lc-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(27, 24, 48, .22);
    animation: lc-pop .14s var(--lc-ease);
}

    .lc-emoji-pop button {
        height: 34px;
        border: 0;
        border-radius: 9px;
        background: none;
        font-size: 20px;
        line-height: 1;
    }

        .lc-emoji-pop button:hover {
            background: var(--lc-brand-soft);
        }

/* message menu */
.lc-menu {
    position: fixed;
    z-index: 30;
    min-width: 170px;
    padding: 6px;
    border: 1px solid var(--lc-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(27, 24, 48, .26);
    animation: lc-pop .12s var(--lc-ease);
}

    .lc-menu button {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 9px 11px;
        border: 0;
        border-radius: 9px;
        background: none;
        text-align: left;
        font-size: 13.5px;
        font-weight: 600;
    }

        .lc-menu button i {
            width: 16px;
            color: var(--lc-muted);
            text-align: center;
        }

        .lc-menu button:hover, .lc-menu button:focus-visible {
            background: var(--lc-brand-soft);
        }

        .lc-menu button.is-danger, .lc-menu button.is-danger i {
            color: #C2253F;
        }

            .lc-menu button.is-danger:hover {
                background: #FFE9ED;
            }

/* dialog */
.lc-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(27, 24, 48, .5);
    animation: lc-fade .15s;
}

.lc-dialog {
    width: min(380px, 100%);
    padding: 22px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--lc-shadow);
    animation: lc-pop .18s var(--lc-ease);
}

    .lc-dialog h3 {
        margin: 0 0 6px;
        font: 700 18px "Outfit", "DM Sans", sans-serif;
    }

    .lc-dialog p {
        margin: 0 0 18px;
        color: var(--lc-muted);
    }

.lc-dialog-actions {
    display: grid;
    gap: 8px;
}

.lc-btn {
    height: 44px;
    border: 1px solid var(--lc-line-2);
    border-radius: 12px;
    background: #fff;
    font-weight: 700;
}

    .lc-btn:hover {
        background: var(--lc-sunken);
    }

    .lc-btn.is-danger {
        color: #fff;
        border-color: transparent;
        background: linear-gradient(135deg, #F0506E, #D63A58);
    }

        .lc-btn.is-danger:hover {
            filter: brightness(1.06);
        }

    .lc-btn.is-primary {
        color: #fff;
        border-color: transparent;
        background: linear-gradient(135deg, #7B4FE6, #5530B0);
    }

    .lc-btn.is-ghost {
        border-color: transparent;
        color: var(--lc-muted);
    }

@keyframes lc-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* lightbox */
.lc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    grid-template-rows: 56px minmax(0, 1fr);
    background: rgba(14, 12, 28, .94);
    animation: lc-fade .15s;
}

.lc-lb-top {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    color: #fff;
}

.lc-lb-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.lc-lb-count {
    color: #B8B3D6;
    font-size: 13px;
}

.lc-lb-btn, .lc-lb-nav {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    text-decoration: none;
}

    .lc-lb-btn:hover, .lc-lb-nav:hover {
        background: rgba(255, 255, 255, .24);
    }

.lc-lb-nav {
    align-self: center;
    justify-self: center;
    grid-row: 2;
}

.lc-lb-prev {
    grid-column: 1;
}

.lc-lb-next {
    grid-column: 3;
}

.lc-lb-stage {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    place-items: center;
    min-height: 0;
    padding: 0 0 18px;
}

    .lc-lb-stage img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        border-radius: 6px;
        opacity: 0;
        transform: scale(.98);
        transition: opacity .2s, transform .2s var(--lc-ease);
    }

        .lc-lb-stage img.is-loaded {
            opacity: 1;
            transform: none;
        }

.lc-lightbox.is-single .lc-lb-nav {
    display: none;
}

/* toast */
.lc-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 60;
    max-width: min(420px, calc(100vw - 32px));
    padding: 10px 16px;
    border-radius: 999px;
    color: #fff;
    background: var(--lc-ink);
    box-shadow: 0 10px 28px rgba(27, 24, 48, .35);
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity .2s, transform .2s var(--lc-ease);
}

    .lc-toast.is-visible {
        opacity: 1;
        transform: translate(-50%, 0);
    }

/* ---- mobile -------------------------------------------------------------- */

@media (max-width: 720px) {
    .lc-widget {
        right: 16px;
        bottom: 16px;
    }

    .lc-launcher-label {
        display: none;
    }

    .lc-launcher {
        width: 56px;
        height: 56px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .lc-panel {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        border: 0;
        border-radius: 0;
        animation: lc-sheet .26s var(--lc-ease);
    }

    @keyframes lc-sheet {
        from {
            transform: translateY(24px);
            opacity: 0;
        }

        to {
            transform: none;
            opacity: 1;
        }
    }

    .lc-panel-header {
        padding-top: max(13px, env(safe-area-inset-top));
    }

    .lc-body {
        display: block;
        position: relative;
        overflow: hidden;
    }

    .lc-conversation-pane {
        position: absolute;
        inset: 0;
        border-right: 0;
    }

    .lc-chat-pane {
        position: absolute;
        inset: 0;
        z-index: 2;
        transform: translateX(100%);
        transition: transform .26s var(--lc-ease);
        visibility: hidden;
    }

    .lc-chat-open .lc-chat-pane {
        transform: none;
        visibility: visible;
    }

    .lc-chat-empty {
        display: none;
    }

    .lc-back {
        display: grid;
    }

    .lc-bubble {
        max-width: 86%;
    }

    .lc-composer {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .lc-emoji-pop {
        left: 8px;
    }

    .lc-lightbox {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lc-widget *, .lc-widget *::before, .lc-widget *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* =========================================================
   HEADER CONVERSATION LAUNCHER
   Launcher stays in the header.
   Conversation panel opens at the bottom-right on desktop.
   ========================================================= */

.lc-widget {
    position: relative;
    right: auto;
    bottom: auto;
    z-index: 2500;
    display: inline-flex;
    align-items: center;
    flex: none;
}

.lc-launcher {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border: 0;
    border-radius: 13px;
    gap: 0;
    box-shadow: 0 5px 14px rgba(85, 48, 176, .22);
}

    .lc-launcher i {
        margin: 0;
        font-size: 18px;
    }

.lc-launcher-label {
    display: none !important;
}

.lc-launcher .lc-unread-badge {
    top: -6px;
    right: -6px;
}

/* Desktop conversation panel: bottom-right corner. */
@media (min-width: 721px) {
    .lc-panel {
        position: fixed;
        right: 24px;
        bottom: 24px;
        top: auto;
        left: auto;
        transform-origin: bottom right;
        width: min(940px, calc(100vw - 48px));
        height: min(680px, calc(100vh - 48px));
        max-height: calc(100vh - 48px);
    }
}

/* Mobile: retain the full-screen conversation experience. */
@media (max-width: 720px) {
    .lc-widget {
        position: relative;
        right: auto;
        bottom: auto;
    }

    .lc-launcher {
        width: 40px;
        height: 40px;
        min-height: 40px;
        border-radius: 12px;
    }

    .lc-panel {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        border: 0;
        border-radius: 0;
        transform-origin: center;
    }
}

/* Mobile header: balance chat button with the logo's left spacing */
@media (max-width: 720px) {

    .fh-topbar-right {
        display: flex !important;
        align-items: center;
        justify-content: flex-end !important;
        flex: 1 1 auto;
        margin-left: auto !important;
        margin-right: 0 !important;
        padding-right: 13px !important;
        width: auto;
    }

        .fh-topbar-right .lc-widget {
            margin: 0 !important;
            flex-shrink: 0;
        }

        .fh-topbar-right .lc-launcher {
            margin: 0 !important;
        }
}

@media (max-width: 420px) {
    .fh-topbar-right {
        padding-right: 10px !important;
    }
}

/* ============================================================
   FUNDHUB MOBILE DOCKED NAVIGATION
   Fixed top header + fixed bottom navigation rail.
   Marketplace content scrolls independently underneath.
   ============================================================ */

@media (max-width: 720px) {

    /* Keep the top header permanently visible. */
    .fh-topbar {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 3000;
        min-height: 56px;
        padding: 8px 13px;
        margin: 0;
        background: rgba(244, 240, 250, .97);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--fh-line);
    }

    /* Keep the header content aligned. */
    .fh-topbar-title,
    .fh-topbar-right {
        display: flex;
        align-items: center;
    }

    .fh-topbar-right {
        margin-left: auto !important;
    }

    /* Dock the navigation rail at the bottom. */
    .fh-rail {
        position: fixed !important;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100%;
        height: 62px;
        min-height: 62px;
        z-index: 2900;
        background: rgba(255, 255, 255, .97);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
        border-top: 1px solid var(--fh-line);
        border-right: 0;
    }

    /* Arrange rail controls horizontally. */
    .fh-rail-top {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-around;
        width: 100%;
        height: 100%;
        padding: 0 10px;
        gap: 6px;
    }

    /* Hide the separate rail logo on mobile if the top header
       already displays the application logo. */
    .fh-rail-logo {
        display: none !important;
    }

    .fh-rail-divider {
        width: 1px;
        height: 25px;
        margin: 0 3px;
    }

    /* Prevent the content from scrolling behind the fixed header
       and bottom navigation. */
    .fh-workspace {
        min-width: 0;
        padding-top: 56px !important;
        padding-bottom: 62px !important;
    }

    .fh-main {
        min-height: calc(100dvh - 118px);
        overflow-x: clip;
        overflow-y: visible;
    }

    /* Keep the sidebar drawer above the fixed navigation. */
    .fh-sidebar {
        z-index: 3100;
    }
}
