.lancerway-ai-support {
    --ai-green: #176b45;
    --ai-green-dark: #0e3d28;
    --ai-green-soft: #eaf5ee;
    --ai-ink: #1f2937;
    --ai-muted: #66756b;
    --ai-border: #d9e6dd;
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 1200;
    width: min(430px, calc(100vw - 32px));
    color: var(--ai-ink);
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
}

.lancerway-ai-support[hidden],
.lancerway-ai-support [hidden] {
    display: none !important;
}

.lancerway-ai-support__launcher,
.lancerway-ai-support__header-actions button,
.lancerway-ai-support__history-heading button,
.lancerway-ai-support__escalation-heading button,
.lancerway-ai-support__composer button,
.lancerway-ai-support__button,
.lancerway-ai-support__suggestion,
.lancerway-ai-support__retry,
.lancerway-ai-support__footer button,
.lancerway-ai-support__history-item {
    min-width: 40px;
    min-height: 40px;
}

.lancerway-ai-support__launcher {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-left: auto;
    border: 0;
    border-radius: 999px;
    padding: 0 17px 0 12px;
    color: #fff;
    background: var(--ai-green);
    box-shadow: 0 14px 32px rgba(4, 19, 12, .24);
    cursor: pointer;
    font-weight: 760;
    transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.lancerway-ai-support__launcher-mark {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    color: var(--ai-green);
    background: #fff;
    font-size: 1rem;
}

.lancerway-ai-support__launcher:hover,
.lancerway-ai-support__launcher:focus-visible {
    background: var(--ai-green-dark);
    box-shadow: 0 16px 36px rgba(4, 19, 12, .3);
    transform: translateY(-2px);
}

.lancerway-ai-support__launcher:active,
.lancerway-ai-support__button:active,
.lancerway-ai-support__suggestion:active {
    transform: scale(.96);
}

.lancerway-ai-support.is-open .lancerway-ai-support__launcher {
    display: none;
}

.lancerway-ai-support__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: min(680px, calc(100dvh - 32px));
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--ai-border);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 26px 76px rgba(15, 48, 31, .25);
    animation: lancerway-ai-support-enter .2s cubic-bezier(.2, 0, 0, 1);
}

.lancerway-ai-support__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 15px;
    color: #fff;
    background: linear-gradient(135deg, var(--ai-green), var(--ai-green-dark));
}

.lancerway-ai-support__brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.lancerway-ai-support__logo {
    display: block;
    width: 76px;
    height: auto;
    outline: 1px solid rgba(0, 0, 0, .1);
    border-radius: 6px;
}

.lancerway-ai-support__brand-copy {
    min-width: 0;
}

.lancerway-ai-support__eyebrow {
    display: block;
    color: #c9ead3;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.lancerway-ai-support__header h2,
.lancerway-ai-support__history h3,
.lancerway-ai-support__escalation h3 {
    margin: 2px 0 0;
    color: inherit;
    font-size: 1rem;
    font-weight: 760;
    line-height: 1.25;
    text-wrap: balance;
}

.lancerway-ai-support__brand-copy p {
    margin: 2px 0 0;
    overflow: hidden;
    color: rgba(255, 255, 255, .74);
    font-size: .68rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lancerway-ai-support__header-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 2px;
}

.lancerway-ai-support__header-actions button,
.lancerway-ai-support__history-heading button,
.lancerway-ai-support__escalation-heading button {
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .27);
    border-radius: 9px;
    padding: 0;
    color: #fff;
    background: transparent;
    cursor: pointer;
}

.lancerway-ai-support__header-actions button:hover,
.lancerway-ai-support__header-actions button:focus-visible {
    background: rgba(255, 255, 255, .14);
}

.lancerway-ai-support__messages {
    display: flex;
    flex: 1 1 auto;
    min-height: 150px;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 16px;
    background: #f7faf8;
    scroll-behavior: smooth;
}

.lancerway-ai-support__message {
    max-width: 90%;
    padding: 10px 12px;
    border-radius: 15px;
    color: #20352a;
    background: #fff;
    box-shadow: 0 3px 12px rgba(23, 107, 69, .07);
    overflow-wrap: anywhere;
    font-size: .86rem;
    line-height: 1.55;
}

.lancerway-ai-support__message--user {
    align-self: flex-end;
    color: #fff;
    background: var(--ai-green);
}

.lancerway-ai-support__message--system {
    max-width: 100%;
    color: var(--ai-muted);
    background: transparent;
    box-shadow: none;
    font-size: .74rem;
}

.lancerway-ai-support__message-label {
    display: block;
    margin-bottom: 4px;
    color: #688173;
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.lancerway-ai-support__message--user .lancerway-ai-support__message-label {
    color: rgba(255, 255, 255, .72);
}

.lancerway-ai-support__message-content p,
.lancerway-ai-support__message-content h4,
.lancerway-ai-support__message-content ul,
.lancerway-ai-support__message-content blockquote {
    margin: 0 0 7px;
}

.lancerway-ai-support__message-content > :last-child {
    margin-bottom: 0;
}

.lancerway-ai-support__message-content h4 {
    color: #193d2a;
    font-size: .9rem;
}

.lancerway-ai-support__message-content ul {
    padding-left: 18px;
}

.lancerway-ai-support__message-content blockquote {
    border-left: 3px solid #b7d6c0;
    padding-left: 9px;
    color: #557064;
}

.lancerway-ai-support__message-content a,
.lancerway-ai-support__navigation a,
.lancerway-ai-support__footer button {
    color: var(--ai-green);
    font-weight: 720;
}

.lancerway-ai-support__message--user a {
    color: #fff;
}

.lancerway-ai-support__message-content code {
    border-radius: 5px;
    padding: 1px 4px;
    color: #16472d;
    background: #edf4ef;
    font-size: .82em;
}

.lancerway-ai-support__message-content pre {
    overflow-x: auto;
    border-radius: 8px;
    padding: 9px;
    color: #effaf2;
    background: #183426;
}

.lancerway-ai-support__message-content pre code {
    padding: 0;
    color: inherit;
    background: transparent;
}

.lancerway-ai-support__typing {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 21px;
    padding: 0 17px 5px;
    background: #f7faf8;
}

.lancerway-ai-support__typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ai-green);
    animation: lancerway-ai-support-pulse 1s ease-in-out infinite;
}

.lancerway-ai-support__typing span:nth-child(2) { animation-delay: .12s; }
.lancerway-ai-support__typing span:nth-child(3) { animation-delay: .24s; }

.lancerway-ai-support__navigation,
.lancerway-ai-support__suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 14px 8px;
    background: #f7faf8;
}

.lancerway-ai-support__navigation a {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    border: 1px solid #cde0d4;
    border-radius: 999px;
    padding: 5px 9px;
    background: #fff;
    font-size: .68rem;
    text-decoration: none;
}

.lancerway-ai-support__suggestion {
    border: 1px solid #cde0d4;
    border-radius: 999px;
    padding: 6px 9px;
    color: var(--ai-green);
    background: #fff;
    cursor: pointer;
    font-size: .68rem;
    line-height: 1.25;
}

.lancerway-ai-support__suggestion:hover,
.lancerway-ai-support__suggestion:focus-visible,
.lancerway-ai-support__navigation a:hover,
.lancerway-ai-support__navigation a:focus-visible {
    border-color: var(--ai-green);
    background: var(--ai-green-soft);
}

.lancerway-ai-support__status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 28px;
    padding: 2px 15px 0;
    background: #f7faf8;
}

.lancerway-ai-support__status {
    min-width: 0;
    color: var(--ai-muted);
    font-size: .68rem;
    line-height: 1.35;
}

.lancerway-ai-support__status.is-error {
    color: #a33434;
}

.lancerway-ai-support__retry {
    flex: 0 0 auto;
    border: 0;
    padding: 4px 7px;
    color: var(--ai-green);
    background: transparent;
    cursor: pointer;
    font-size: .7rem;
    font-weight: 760;
    text-decoration: underline;
}

.lancerway-ai-support__composer {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid #e1ebe5;
    background: #fff;
}

.lancerway-ai-support__composer textarea,
.lancerway-ai-support__escalation textarea {
    width: 100%;
    border: 1px solid #d5e2d9;
    border-radius: 12px;
    padding: 10px 11px;
    color: var(--ai-ink);
    background: #fff;
    font: inherit;
    font-size: .8rem;
    line-height: 1.4;
    resize: none;
}

.lancerway-ai-support__composer textarea {
    flex: 1 1 auto;
    min-height: 40px;
    max-height: 120px;
}

.lancerway-ai-support__composer textarea:focus,
.lancerway-ai-support__escalation textarea:focus {
    border-color: var(--ai-green);
    outline: 3px solid rgba(23, 107, 69, .14);
}

.lancerway-ai-support__composer button {
    display: inline-grid;
    flex: 0 0 40px;
    place-items: center;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--ai-green);
    cursor: pointer;
}

.lancerway-ai-support__composer button:disabled,
.lancerway-ai-support__button:disabled {
    opacity: .55;
    cursor: wait;
}

.lancerway-ai-support__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 14px 12px;
    color: #75857b;
    background: #fff;
    font-size: .62rem;
}

.lancerway-ai-support__footer button {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    font-size: .7rem;
}

.lancerway-ai-support__history,
.lancerway-ai-support__escalation {
    position: absolute;
    right: 10px;
    left: 10px;
    z-index: 3;
    overflow-y: auto;
    border: 1px solid var(--ai-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 42px rgba(15, 48, 31, .2);
}

.lancerway-ai-support__history {
    top: 68px;
    bottom: 10px;
    padding: 14px;
}

.lancerway-ai-support__history-heading,
.lancerway-ai-support__escalation-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.lancerway-ai-support__history-heading h3,
.lancerway-ai-support__escalation-heading h3 {
    color: var(--ai-ink);
    font-size: .95rem;
}

.lancerway-ai-support__history-heading button,
.lancerway-ai-support__escalation-heading button {
    border-color: var(--ai-border);
    color: var(--ai-ink);
}

.lancerway-ai-support__history-heading button:hover,
.lancerway-ai-support__history-heading button:focus-visible,
.lancerway-ai-support__escalation-heading button:hover,
.lancerway-ai-support__escalation-heading button:focus-visible {
    color: var(--ai-green);
    background: var(--ai-green-soft);
}

.lancerway-ai-support__history-list {
    display: grid;
    gap: 7px;
    margin-top: 16px;
}

.lancerway-ai-support__history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    border: 1px solid #e0ebe3;
    border-radius: 11px;
    padding: 8px 10px;
    color: var(--ai-ink);
    background: #fff;
    cursor: pointer;
    text-align: left;
}

.lancerway-ai-support__history-item:hover,
.lancerway-ai-support__history-item:focus-visible {
    border-color: var(--ai-green);
    background: var(--ai-green-soft);
}

.lancerway-ai-support__history-item span {
    font-size: .75rem;
    font-weight: 700;
}

.lancerway-ai-support__history-item small,
.lancerway-ai-support__history-note,
.lancerway-ai-support__history-empty {
    color: var(--ai-muted);
    font-size: .68rem;
}

.lancerway-ai-support__history-note {
    margin: 16px 0 0;
    line-height: 1.45;
}

.lancerway-ai-support__escalation {
    bottom: 58px;
    padding: 14px;
}

.lancerway-ai-support__escalation p {
    margin: 12px 0;
    color: var(--ai-muted);
    font-size: .72rem;
    line-height: 1.45;
}

.lancerway-ai-support__consent {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 10px;
    color: var(--ai-muted);
    font-size: .68rem;
    line-height: 1.4;
}

.lancerway-ai-support__consent input {
    flex: 0 0 auto;
    margin-top: 2px;
    accent-color: var(--ai-green);
}

.lancerway-ai-support__escalation-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    margin-top: 9px;
}

.lancerway-ai-support__button {
    border: 1px solid var(--ai-border);
    border-radius: 9px;
    padding: 7px 10px;
    cursor: pointer;
    font-size: .7rem;
    font-weight: 720;
}

.lancerway-ai-support__button--quiet {
    color: var(--ai-ink);
    background: #fff;
}

.lancerway-ai-support__button--primary {
    border-color: var(--ai-green);
    color: #fff;
    background: var(--ai-green);
}

.lancerway-ai-support__sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.lancerway-ai-support__noscript {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1200;
    max-width: 360px;
    border: 1px solid #d9e6dd;
    border-radius: 12px;
    padding: 12px 14px;
    color: #20352a;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 48, 31, .16);
    font-size: .78rem;
    line-height: 1.45;
}

.lancerway-ai-support button:focus-visible,
.lancerway-ai-support a:focus-visible {
    outline: 3px solid rgba(23, 107, 69, .25);
    outline-offset: 2px;
}

html.lancerway-ai-support-lock,
html.lancerway-ai-support-lock body {
    overflow: hidden;
}

@keyframes lancerway-ai-support-enter {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes lancerway-ai-support-pulse {
    0%, 100% { opacity: .35; transform: scale(.8); }
    50% { opacity: 1; transform: scale(1); }
}

@media (max-width: 640px) {
    .lancerway-ai-support {
        inset: 0;
        display: flex;
        width: auto;
        flex-direction: column;
        justify-content: flex-end;
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
        pointer-events: none;
    }

    .lancerway-ai-support > * {
        pointer-events: auto;
    }

    .lancerway-ai-support__launcher {
        margin: 0 12px 12px auto;
    }

    .lancerway-ai-support__panel {
        width: 100%;
        height: 100dvh;
        max-height: none;
        border-radius: 0;
        animation: none;
    }

    .lancerway-ai-support__history {
        top: 66px;
        right: 8px;
        bottom: 8px;
        left: 8px;
    }

    .lancerway-ai-support__message {
        max-width: 94%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lancerway-ai-support__launcher,
    .lancerway-ai-support__launcher:active,
    .lancerway-ai-support__button:active,
    .lancerway-ai-support__suggestion:active {
        transition: none;
        transform: none;
    }

    .lancerway-ai-support__messages {
        scroll-behavior: auto;
    }

    .lancerway-ai-support__typing span {
        animation: none;
        opacity: .65;
        transform: none;
    }
}
