/* ===========================================================
   Leanor AI Widget — Lea
   Brand: mint #4FE3C1, navy #0F1C2E, Plus Jakarta Sans
   =========================================================== */

#leanor-ai-widget-root {
    --lai-mint: #4FE3C1;
    --lai-mint-dark: #2DC9A6;
    --lai-navy: #0F1C2E;
    --lai-navy-light: #1A2B42;
    --lai-text: #0F1C2E;
    --lai-text-muted: #8896A4;
    --lai-bg: #FFFFFF;
    --lai-bg-soft: #F4F7FB;
    --lai-border: #E2E8F0;
    --lai-shadow-sm: 0 2px 8px rgba(15, 28, 46, 0.08);
    --lai-shadow-md: 0 8px 30px rgba(15, 28, 46, 0.12);
    --lai-shadow-lg: 0 16px 48px rgba(15, 28, 46, 0.18);

    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

#leanor-ai-widget-root *,
#leanor-ai-widget-root *::before,
#leanor-ai-widget-root *::after {
    box-sizing: border-box;
}

/* ----------- Launcher button ----------- */
.lai-launcher,
.lai-launcher:hover,
.lai-launcher:focus,
.lai-launcher:active,
.lai-launcher:visited {
    background-color: var(--lai-navy) !important;
    background-image: none !important;
    background: var(--lai-navy) !important;
    color: inherit !important;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none !important;
}

.lai-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none !important;
    cursor: pointer;
    /* Мягкая тень с большим blur — работает на любом фоне без "прямоугольного" артефакта */
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.18),
        0 1px 3px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999998;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s;
    padding: 0;
    overflow: visible;
    opacity: 1 !important;
    /* Сначала скрыт — JS покажет через 2-3 сек после загрузки страницы */
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
}

.lai-launcher.lai-ready {
    visibility: visible;
    transform: translateY(0) scale(1);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
}

.lai-launcher.lai-ready:hover {
    transform: translateY(-3px) !important;
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.22),
        0 2px 5px rgba(0, 0, 0, 0.14) !important;
}

/* На тёмных фонах — мягкая mint glow вместо чёрной тени */
@media (prefers-color-scheme: dark) {
    .lai-launcher {
        box-shadow:
            0 4px 16px rgba(79, 227, 193, 0.18),
            0 1px 3px rgba(0, 0, 0, 0.3);
    }
    .lai-launcher.lai-ready:hover {
        box-shadow:
            0 8px 24px rgba(79, 227, 193, 0.28),
            0 2px 5px rgba(0, 0, 0, 0.35) !important;
    }
}

.lai-launcher-icons {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.lai-launcher-icons svg {
    width: 100%;
    height: 100%;
    transition: opacity 0.2s, transform 0.2s;
}

.lai-icon-close {
    position: absolute;
    inset: 0;
    width: 24px !important;
    height: 24px !important;
    margin: auto;
    opacity: 0;
    transform: scale(0.7) rotate(-90deg);
}

.lai-launcher.is-open .lai-icon-chat {
    opacity: 0;
    transform: scale(0.7);
}

.lai-launcher.is-open .lai-icon-close {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Statusprikk — ОДНА точка по краю круга (центр точки на линии круга, как Apple Messages)
   Круг 64x64, центр (32,32), радиус 32. Точка идёт на 135° (top-left).
   cos(135°) = -0.707, sin(135°) = -0.707 → смещение от центра -22.6 в обоих направлениях
   Чтобы центр точки был НА краю круга, ставим её center в координатах:
   x = 32 - 22.6 = 9.4, y = 32 - 22.6 = 9.4
   Точка 16x16 → её top-left = 9.4 - 8 = 1.4
*/
/*
   Status indicator dot:
   - Default: small green online dot in top-left corner
   - On notification: grows into a red badge with "1" inside (Apple-style)
*/
.lai-launcher-dot {
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4ADE80;
    border: 2px solid #fff;
    box-sizing: content-box;
    z-index: 5;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                height 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 0.3s,
                border-radius 0.3s;
}
.lai-launcher-dot-num {
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Notification mode — точка ОСТАЁТСЯ той же 18px, только меняет цвет на красный
   и показывает "1" внутри. + 2 короткие пульсации для привлечения внимания. */
.lai-launcher.has-notification .lai-launcher-dot {
    background: #EF4444;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
    animation: lai-dot-pulse 1.4s ease-out 2;
}
.lai-launcher.has-notification .lai-launcher-dot-num {
    opacity: 1;
    transform: scale(1);
    /* Цифра НЕ пульсирует — она статична внутри пульсирующей тени */
    animation: none;
}

@keyframes lai-dot-pulse {
    0%, 100% { box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5), 0 0 0 0 rgba(239, 68, 68, 0); }
    50%      { box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5), 0 0 0 8px rgba(239, 68, 68, 0); }
}

.lai-launcher.is-open .lai-launcher-dot {
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s;
}

/* (Glow ring removed — user feedback: looked too noisy. Notification dot is the only attention indicator.) */

/* ============================================================
   Proactive engagement bubble
   Появляется НАД launcher через типа Intercom
   ============================================================ */
.lai-engage {
    position: fixed;
    bottom: 100px;
    right: 24px;
    max-width: 340px;
    background: var(--lai-navy);
    color: #fff;
    padding: 14px 38px 14px 18px;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 10px 30px rgba(15, 28, 46, 0.35);
    cursor: pointer;
    z-index: 999997;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 500;
    animation: lai-engage-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.lai-engage:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(15, 28, 46, 0.45);
}

@keyframes lai-engage-in {
    from { opacity: 0; transform: translateY(20px) scale(0.85); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Маленький "хвостик" облачка к launcher */
.lai-engage::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 24px;
    width: 18px;
    height: 18px;
    background: var(--lai-navy);
    transform: rotate(45deg);
    border-radius: 0 0 4px 0;
    z-index: -1;
}

/* Заголовок: "Lea online · AKKURAT NÅ" в стиле iMessage */
.lai-engage-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 4px;
    padding-right: 24px; /* место для крестика */
}
.lai-engage-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}
.lai-engage-time {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.lai-engage-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    border: none;
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity 0.3s, background 0.2s;
    opacity: 1;
}
.lai-engage-close:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}
/* Скрываем X пока bubble в typing-режиме + делаем bubble компактным как iMessage:
   маленький овал с точками, без header. Header появляется ВМЕСТЕ с текстом. */
.lai-engage-typing .lai-engage-close {
    opacity: 0;
    pointer-events: none;
}
.lai-engage-typing {
    padding: 8px 12px !important;  /* override родительского padding 14px 38px 14px 18px */
    max-width: max-content;
    min-width: 0;
    border-radius: 16px !important;  /* симметричное скругление, не speech bubble */

    /* Центрируем над launcher.
       Launcher: 64px в right:24px → центр на right:56px.
       Typing bubble width ~50-60px → bubble center ≈ его right + 25-30px.
       Значит bubble right ≈ 56 - 28 = 28px. */
    right: 28px !important;
    left: auto;
}

/* Убираем "хвостик" в typing-режиме — он от обычного speech bubble и обрезается на маленьком */
.lai-engage-typing::after {
    display: none;
}
.lai-engage-typing .lai-engage-header {
    display: none;
}
.lai-engage-typing .lai-engage-text {
    display: none;
    min-height: 0;  /* убираем 18px резерв высоты в typing-режиме */
}

.lai-engage-text {
    min-height: 18px;
    color: rgba(255, 255, 255, 0.92);
    animation: lai-text-fade 0.3s ease-out;
}

@keyframes lai-text-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Typing indicator (3 dots) — компактные в стиле iMessage, чуть светлее для контраста */
.lai-engage-typing-dots {
    display: flex;
    gap: 3px;
    padding: 0;
    align-items: center;
    justify-content: center;
    min-height: 12px;  /* фиксируем высоту чтобы bubble не прыгал при анимации точек */
}
.lai-engage-typing-dots span {
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    animation: lai-engage-dot 1.3s infinite ease-in-out;
}
.lai-engage-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.lai-engage-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes lai-engage-dot {
    0%, 60%, 100% { opacity: 0.55; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}

/* Когда typing уже не активен — скрываем dots */
.lai-engage:not(.lai-engage-typing) .lai-engage-typing-dots { display: none; }

/* В typing-режиме bubble компактный — только точки */
.lai-engage-typing {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
}

/* (Старый отдельный red badge удалён — используем смену цвета у точки .lai-launcher-dot) */

/* ============================================================
   Pill-shape notification (как Solid Media style)
   Появляется ПЕРЕД полным bubble. Pulse 2-3 раза для внимания.
   ============================================================ */
.lai-engage-pill {
    position: fixed;
    bottom: 32px;
    right: 100px;
    background: var(--lai-navy);
    color: #fff;
    padding: 10px 18px 10px 12px;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(15, 28, 46, 0.3);
    cursor: pointer;
    z-index: 999997;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    animation: lai-pill-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.lai-engage-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(15, 28, 46, 0.4);
}

@keyframes lai-pill-in {
    from { opacity: 0; transform: translateX(20px) scale(0.8); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

/* Pill-badge (старая дублирующая "1" слева на pill) — больше не используется,
   notification dot живёт ТОЛЬКО на launcher для чистоты UX. CSS удалён. */

.lai-engage-pill-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.lai-engage-pill-text {
    line-height: 1;
}

@media (max-width: 600px) {
    /* Скрываем pill "Lea online" слева от launcher на мобиле —
       вместо этого юзер видит pulse на красном кружке "1" на launcher.
       Через 3.5 сек сразу показывается typing → bubble. */
    .lai-engage-pill {
        display: none !important;
    }
}

@keyframes lai-badge-bounce {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* Mobile — bubble компактнее: меньше padding и font, header остаётся видимым */
@media (max-width: 600px) {
    .lai-engage {
        right: 14px;
        bottom: 100px;             /* отступ от launcher (launcher up to 88px) + 12px gap */
        max-width: 270px;
        padding: 11px 32px 11px 14px;
        border-radius: 14px 14px 4px 14px;
        font-size: 13px;
        line-height: 1.4;
    }
    /* Header остаётся, только шрифты меньше */
    .lai-engage-title {
        font-size: 13px;
    }
    .lai-engage-time {
        font-size: 9px;
    }
    .lai-engage-header {
        margin-bottom: 3px;
    }
    /* Закрывающий крестик — больше на мобиле для удобства пальца */
    .lai-engage-close {
        top: 8px;
        right: 8px;
        width: 26px;
        height: 26px;
        background: rgba(255, 255, 255, 0.12);
    }
    .lai-engage-close svg {
        width: 12px;
        height: 12px;
    }
    /* Typing dots компактнее */
    .lai-engage-typing-dots {
        padding: 2px 0;
    }
    /* Typing-облачко центрируется над launcher на мобиле:
       launcher 60×60 в right:16px → центр на right:46px.
       Bubble width ~45-55px → bubble right ≈ 46 - 25 = 21px */
    .lai-engage-typing {
        right: 21px !important;
    }
}

/* ----------- Chat window ----------- */
.lai-chat {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 400px;
    max-width: calc(100vw - 32px);
    height: 640px;
    max-height: calc(100vh - 130px);
    background: var(--lai-bg);
    border-radius: 20px;
    box-shadow: var(--lai-shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 999999;
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}

.lai-chat.is-open {
    display: flex;
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* === MOBILE === одинаковые отступы по бокам, dvh учитывает клавиатуру */
@media (max-width: 600px) {
    .lai-launcher {
        bottom: 16px;
        right: 16px;
        width: 60px;
        height: 60px;
    }
    .lai-chat {
        /* симметричные отступы 12px со всех сторон */
        bottom: 12px;
        right: 12px;
        left: 12px;
        top: 12px;
        width: auto;
        height: auto;
        max-width: none;
        max-height: none;
        border-radius: 16px;
    }
    /* Когда чат открыт — прячем launcher чтобы не мешал */
    .lai-launcher.is-open {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s;
    }
}

/* iOS — поддержка safe-area + keyboard insets через 100dvh (если поддерживается) */
@supports (height: 100dvh) {
    @media (max-width: 600px) {
        .lai-chat {
            /* 100dvh = dynamic viewport, уменьшается когда выезжает клавиатура */
            top: max(12px, env(safe-area-inset-top, 12px));
            bottom: max(12px, env(safe-area-inset-bottom, 12px));
            left: max(12px, env(safe-area-inset-left, 12px));
            right: max(12px, env(safe-area-inset-right, 12px));
        }
    }
}

/* ----------- Header ----------- */
.lai-header {
    background: var(--lai-navy);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.lai-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    background: var(--lai-mint);
    /* ВАЖНО: overflow visible чтобы точка не обрезалась */
    overflow: visible;
}

/* Внутренний wrapper для img — он клипает картинку круглой формой */
.lai-avatar-img-wrap {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: var(--lai-mint);
}

.lai-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

/* Fallback вариант — текст в кружке */
.lai-avatar-fallback {
    color: var(--lai-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

/* Зелёная точка online у аватарки в шапке чата.
   Аватар 40x40, центр 20, радиус 20.
   Позиция 135° (top-left угол): x=20-14.1=5.9, y=20-14.1=5.9
   Точка 12x12: top/left = 5.9 - 6 = -0.1 ≈ 0
*/
.lai-avatar::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4ADE80;
    border: 2px solid var(--lai-navy);
    z-index: 2;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.lai-header-info { flex: 1; }
.lai-header-name { color: #fff; font-weight: 700; font-size: 15px; line-height: 1.2; }
.lai-header-role { color: rgba(255, 255, 255, 0.7); font-size: 12px; line-height: 1.4; }

.lai-header-close,
.lai-header-reset,
.lai-header-close:hover,
.lai-header-reset:hover,
.lai-header-close:focus,
.lai-header-reset:focus,
.lai-header-close:active,
.lai-header-reset:active {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none !important;
    color: #fff !important;
    text-decoration: none !important;
}

.lai-header-close,
.lai-header-reset {
    background-color: rgba(255, 255, 255, 0.1) !important;
    background-image: none !important;
    border: none !important;
    width: 32px;
    height: 32px;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    padding: 0;
    flex-shrink: 0;
    opacity: 1 !important;
}
.lai-header-close:hover,
.lai-header-reset:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
}
.lai-header-close:active,
.lai-header-reset:active {
    background-color: rgba(255, 255, 255, 0.15) !important;
    transform: scale(0.95);
}
.lai-header-close svg { width: 16px; height: 16px; stroke: #fff; stroke-width: 2.5; fill: none; }
.lai-header-reset {
    margin-right: 4px;
}
.lai-header-reset svg { width: 16px; height: 16px; stroke: #fff; }

/* ----------- Messages area ----------- */
.lai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--lai-bg-soft);
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

.lai-messages::-webkit-scrollbar { width: 6px; }
.lai-messages::-webkit-scrollbar-thumb { background: rgba(15, 28, 46, 0.2); border-radius: 3px; }

.lai-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    animation: lai-msg-in 0.25s ease-out;
}

@media (max-width: 600px) {
    .lai-msg {
        font-size: 15px;
        max-width: 88%;
    }
    .lai-messages {
        padding: 16px 14px;
    }
}

@keyframes lai-msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.lai-msg-user {
    align-self: flex-end;
    background: var(--lai-navy);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.lai-msg-bot {
    align-self: flex-start;
    background: #fff;
    color: var(--lai-text);
    border: 1px solid var(--lai-border);
    border-bottom-left-radius: 4px;
}

/* Typing indicator */
.lai-typing {
    align-self: flex-start;
    background: #fff;
    border: 1px solid var(--lai-border);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    gap: 4px;
}
.lai-typing span {
    width: 7px;
    height: 7px;
    background: var(--lai-text-muted);
    border-radius: 50%;
    animation: lai-typing 1.4s infinite ease-in-out;
}
.lai-typing span:nth-child(2) { animation-delay: 0.2s; }
.lai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes lai-typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* ----------- Car cards in chat ----------- */
.lai-cards {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.lai-card {
    background: #fff;
    border: 1px solid var(--lai-border);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    cursor: pointer;
}

.lai-card:hover {
    border-color: var(--lai-mint);
    box-shadow: var(--lai-shadow-sm);
    transform: translateY(-1px);
}

.lai-card-img {
    width: 80px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--lai-bg-soft);
    flex-shrink: 0;
}

.lai-card-info { flex: 1; min-width: 0; }
.lai-card-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--lai-text);
    margin: 0 0 2px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lai-card-meta {
    font-size: 11px;
    color: var(--lai-text-muted);
    margin: 0 0 6px;
}
.lai-card-price {
    font-weight: 800;
    font-size: 14px;
    color: var(--lai-navy);
}
.lai-card-price small { font-weight: 500; color: var(--lai-text-muted); font-size: 11px; }

/* "Ny modell" — Pris kommer snart */
.lai-card-price-soon {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: flex-start;
}
.lai-card-soon-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, var(--lai-mint), #2ECFAC);
    color: var(--lai-navy);
    font-weight: 800;
    font-size: 10px;
    padding: 3px 8px 3px 7px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 6px rgba(79,227,193,.35);
}
.lai-card-soon-text {
    font-weight: 800;
    font-size: 13px;
    color: #15C9A0;
    letter-spacing: -0.01em;
}

/* ----------- "Ordered" card — vist etter create_lead success ----------- */
/* Layout: row (image + info) på toppen, footer-stripe nederst */
.lai-card-ordered {
    flex-direction: column;
    gap: 0;
    padding: 0;
    border: 2px solid var(--lai-mint);
    background: #fff;
    box-shadow: 0 4px 16px rgba(79,227,193,0.18);
    overflow: hidden;
}
.lai-card-ordered:hover {
    border-color: var(--lai-mint);
    box-shadow: 0 6px 22px rgba(79,227,193,0.28);
    transform: translateY(-1px);
}
/* Den faktiske bil-rad — image + info — har samme padding som vanlig kort */
.lai-card-ordered > .lai-card-img,
.lai-card-ordered > .lai-card-info {
    margin: 0;
}
/* Image + info-row inni ordered-kort: gjenoppretter horisontal layout */
.lai-card-ordered {
    /* Bruk grid for å holde image til venstre og info til høyre, footer fullbredde */
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "img info"
        "footer footer";
    gap: 0;
}
.lai-card-ordered > .lai-card-img {
    grid-area: img;
    margin: 12px 0 12px 12px;
}
.lai-card-ordered > .lai-card-info {
    grid-area: info;
    padding: 12px 12px 12px 12px;
    min-width: 0;
}
.lai-card-ordered-footer {
    grid-area: footer;
    background: linear-gradient(135deg, var(--lai-mint), #2ECFAC);
    color: var(--lai-navy);
    font-weight: 800;
    font-size: 12px;
    padding: 8px 14px;
    letter-spacing: 0.02em;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.lai-card-ordered-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: var(--lai-navy);
    color: var(--lai-mint);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 900;
    flex-shrink: 0;
}

/* ----------- Suggestion chips ----------- */
.lai-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.lai-chip {
    background: #fff;
    border: 1px solid var(--lai-border);
    border-radius: 18px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--lai-navy);
    cursor: pointer;
    transition: all 0.2s;
}
.lai-chip:hover {
    background: var(--lai-mint);
    border-color: var(--lai-mint);
}

/* ----------- Input area ----------- */
.lai-input-wrap {
    padding: 12px;
    border-top: 1px solid var(--lai-border);
    background: #fff;
}

.lai-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.lai-input {
    flex: 1;
    border: 1.5px solid var(--lai-border);
    border-radius: 12px;
    padding: 10px 14px;
    font-family: inherit;
    /* 16px ОБЯЗАТЕЛЬНО — иначе iOS Safari автоматически зумит при фокусе */
    font-size: 16px;
    line-height: 1.4;
    color: var(--lai-text);
    resize: none;
    max-height: 100px;
    min-height: 42px;
    outline: none;
    transition: border-color 0.2s;
    /* Отключаем дефолтный appearance */
    -webkit-appearance: none;
    appearance: none;
    background: #fff;
}
.lai-input:focus { border-color: var(--lai-mint); }

/* На десктопе можно вернуть 14px — там зум-проблемы нет */
@media (min-width: 601px) {
    .lai-input { font-size: 14px; }
}

.lai-send,
.lai-send:hover,
.lai-send:focus,
.lai-send:active,
.lai-send:visited {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none !important;
    color: inherit !important;
    text-decoration: none !important;
}

.lai-send {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background-color: var(--lai-navy) !important;
    background-image: none !important;
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s;
    padding: 0;
    opacity: 1 !important;
}
.lai-send:disabled {
    background-color: var(--lai-text-muted) !important;
    cursor: not-allowed;
}
.lai-send:not(:disabled):hover {
    background-color: var(--lai-mint) !important;
}
.lai-send:not(:disabled):hover svg { stroke: var(--lai-navy); }
.lai-send:not(:disabled):active {
    background-color: var(--lai-navy) !important;
    transform: scale(0.95);
}
.lai-send svg { width: 18px; height: 18px; stroke: #fff; stroke-width: 2.2; fill: none; transition: stroke 0.2s; }

.lai-disclaimer {
    font-size: 10px;
    color: var(--lai-text-muted);
    text-align: center;
    margin: 8px 0 0;
    line-height: 1.4;
}
