
.lah-chat-widget{
    --lah-green:#2dae1c;
    --lah-navy:#082657;
    --lah-pink:#dc2f6f;
    --lah-border:#dce4ee;
    position:fixed;
    right:24px;
    bottom:24px;
    z-index:999999;
    font-family:inherit;
}
.lah-chat-widget *{box-sizing:border-box}

/* Floating button */
.lah-chat-float{
    position:relative;
    display:inline-flex;
    align-items:center;
    gap:12px;
    border:0!important;
    border-radius:18px!important;
    background:#fff!important;
    color:var(--lah-navy)!important;
    padding:14px 18px!important;
    font-weight:950!important;
    min-height:58px;
    cursor:pointer;
    box-shadow:0 16px 40px rgba(8,38,87,.18)!important;
    border:1px solid rgba(8,38,87,.10)!important;
    overflow:visible;
}
.lah-chat-float:hover,
.lah-chat-float:focus{
    background:var(--lah-navy)!important;
    color:#fff!important;
    transform:translateY(-2px);
}
.lah-chat-icon{
    width:34px;
    height:34px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:rgba(45,174,28,.10);
    color:var(--lah-green);
    font-size:18px;
}
.lah-chat-float:hover .lah-chat-icon{background:rgba(255,255,255,.14);color:#fff}
.lah-chat-text{font-size:15px;line-height:1}
.lah-chat-dot{
    position:absolute;
    right:10px;
    top:8px;
    width:14px;
    height:14px;
    background:var(--lah-green);
    border:3px solid #fff;
    border-radius:50%;
    box-shadow:0 0 0 3px rgba(45,174,28,.18);
}

/* Window */
.lah-chat-window{
    position:absolute;
    right:0;
    bottom:78px;
    width:min(94vw,760px);
    max-width:760px;
    height:min(680px,82vh);
    background:#fff;
    border:1px solid var(--lah-border);
    border-radius:24px;
    box-shadow:0 28px 80px rgba(8,38,87,.26);
    display:none;
    overflow:hidden;
}
.lah-chat-widget.is-open .lah-chat-window{
    display:grid;
    grid-template-columns:minmax(340px,1fr) 310px;
    grid-template-rows:auto auto 1fr auto;
}

/* Header spans full width */
.lah-chat-head{
    grid-column:1/-1;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    background:var(--lah-navy);
    color:#fff;
    padding:16px 18px;
}
.lah-chat-brand{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
}
.lah-chat-brand img{
    width:128px;
    height:auto;
    background:#fff;
    border-radius:8px;
    padding:4px;
}
.lah-chat-brand div{display:flex;flex-direction:column;min-width:0}
.lah-chat-brand strong{font-size:18px;font-weight:950;line-height:1.1}
.lah-chat-brand span{font-size:13px;opacity:.86;margin-top:3px}
.lah-chat-close{
    width:42px;
    height:42px;
    border:1px solid rgba(255,255,255,.22)!important;
    border-radius:12px!important;
    background:rgba(255,255,255,.08)!important;
    color:#fff!important;
    font-size:28px;
    line-height:1;
    cursor:pointer;
}
.lah-chat-close:hover{background:var(--lah-green)!important}

/* Intro only above chat column */
.lah-chat-intro{
    grid-column:1/2;
    padding:13px 18px;
    background:#f4f7fb;
    color:#52637a;
    font-size:14px;
    line-height:1.45;
    border-right:1px solid #e7edf4;
}

/* Messages */
.lah-chat-messages{
    grid-column:1/2;
    grid-row:3/4;
    overflow:auto;
    padding:18px;
    display:flex;
    flex-direction:column;
    gap:10px;
    border-right:1px solid #e7edf4;
    min-height:0;
}
.lah-msg{
    max-width:88%;
    padding:12px 14px;
    border-radius:16px;
    font-size:14px;
    line-height:1.45;
}
.lah-msg.bot{
    align-self:flex-start;
    background:#eef3f8;
    color:#243046;
    border-bottom-left-radius:5px;
}
.lah-msg.user{
    align-self:flex-end;
    background:var(--lah-green);
    color:#fff;
    border-bottom-right-radius:5px;
}

/* Quick options and input stay under chat column */
.lah-chat-quick{
    grid-column:1/2;
    grid-row:4/5;
    display:flex;
    gap:8px;
    overflow-x:auto;
    padding:12px 18px 8px;
    border-right:1px solid #e7edf4;
    border-top:1px solid #e7edf4;
}
.lah-chat-quick button{
    flex:0 0 auto;
    border:1px solid #dce4ee!important;
    background:#fff!important;
    color:var(--lah-navy)!important;
    border-radius:999px!important;
    padding:9px 12px!important;
    font-size:13px!important;
    font-weight:900!important;
    cursor:pointer;
    box-shadow:none!important;
}
.lah-chat-quick button:hover{
    background:rgba(45,174,28,.08)!important;
    border-color:var(--lah-green)!important;
    color:var(--lah-green)!important;
}
.lah-chat-input-form{
    grid-column:1/2;
    grid-row:5/6;
    display:flex;
    gap:8px;
    padding:10px 18px 16px;
    border-right:1px solid #e7edf4;
}
.lah-chat-input-form input{
    flex:1;
    min-width:0;
    border:1px solid #d6e0eb!important;
    border-radius:12px!important;
    padding:13px 14px!important;
    font:inherit;
    outline:none;
    min-height:48px;
}
.lah-chat-input-form input:focus,
.lah-chat-lead-form input:focus,
.lah-chat-lead-form textarea:focus{
    border-color:var(--lah-green)!important;
    box-shadow:0 0 0 4px rgba(45,174,28,.10)!important;
}
.lah-chat-input-form button,
.lah-chat-lead-form button{
    border:0!important;
    border-radius:12px!important;
    background:var(--lah-green)!important;
    color:#fff!important;
    font-weight:950!important;
    padding:0 16px!important;
    min-height:48px;
    cursor:pointer;
    box-shadow:0 10px 22px rgba(45,174,28,.18)!important;
}
.lah-chat-input-form button:hover,
.lah-chat-lead-form button:hover{
    background:var(--lah-navy)!important;
}

/* Side lead panel */
.lah-chat-lead-form{
    grid-column:2/3;
    grid-row:2/6;
    display:flex!important;
    flex-direction:column;
    gap:10px;
    padding:18px;
    background:#fbfcfe;
    overflow:auto;
    border-left:0;
}
.lah-chat-lead-form h4{
    margin:0 0 4px;
    color:var(--lah-navy);
    font-size:18px;
    line-height:1.15;
    font-weight:950;
}
.lah-chat-lead-form h4:after{
    content:"";
    display:block;
    width:48px;
    height:3px;
    background:var(--lah-green);
    border-radius:99px;
    margin-top:10px;
}
.lah-chat-lead-form input,
.lah-chat-lead-form textarea{
    width:100%;
    border:1px solid #d6e0eb!important;
    border-radius:12px!important;
    padding:12px 13px!important;
    font:inherit;
    outline:none;
    background:#fff;
}
.lah-chat-lead-form textarea{resize:vertical;min-height:105px}
.lah-chat-consent{
    display:flex;
    align-items:flex-start;
    gap:8px;
    font-size:12px;
    line-height:1.35;
    color:#52637a;
}
.lah-chat-consent input{
    width:16px!important;
    height:16px!important;
    min-height:16px!important;
    flex:0 0 16px;
    margin:0;
    accent-color:var(--lah-green);
}
.lah-chat-lead-form button{width:100%;margin-top:2px}

/* On desktop, make the lead form visually ready but subtle until needed */
.lah-chat-widget:not(.needs-lead) .lah-chat-lead-form{
    opacity:.92;
}
.lah-chat-widget:not(.needs-lead) .lah-chat-lead-form h4::before{
    content:"Optioneel";
    display:inline-flex;
    margin-right:8px;
    background:rgba(45,174,28,.10);
    color:var(--lah-green);
    border-radius:999px;
    font-size:11px;
    padding:4px 7px;
    vertical-align:middle;
}

/* Tablet/mobile: side panel becomes bottom panel but messages remain readable */
@media(max-width:720px){
    .lah-chat-widget{right:12px;bottom:12px}
    .lah-chat-window{
        right:-4px;
        bottom:74px;
        width:calc(100vw - 18px);
        height:82vh;
    }
    .lah-chat-widget.is-open .lah-chat-window{
        display:flex;
        flex-direction:column;
    }
    .lah-chat-head{flex:0 0 auto}
    .lah-chat-brand img{width:110px}
    .lah-chat-brand strong{font-size:16px}
    .lah-chat-intro{
        flex:0 0 auto;
        border-right:0;
        padding:11px 14px;
    }
    .lah-chat-messages{
        flex:1 1 auto;
        border-right:0;
        min-height:190px;
        padding:14px;
    }
    .lah-chat-quick{
        flex:0 0 auto;
        border-right:0;
        padding:10px 14px 8px;
    }
    .lah-chat-input-form{
        flex:0 0 auto;
        border-right:0;
        padding:8px 14px 12px;
    }
    .lah-chat-lead-form{
        flex:0 0 auto;
        max-height:0;
        overflow:hidden;
        padding:0 14px;
        border-top:1px solid #e7edf4;
        transition:max-height .25s ease, padding .25s ease;
    }
    .lah-chat-widget.needs-lead .lah-chat-lead-form{
        max-height:360px;
        overflow:auto;
        padding:12px 14px 14px;
    }
    .lah-chat-text{display:none}
    .lah-chat-float{
        width:60px;
        height:60px;
        padding:0!important;
        justify-content:center;
        border-radius:50%!important;
    }
    .lah-chat-icon{background:transparent;font-size:22px}
}


/* v1.0.2 - much better mobile chat layout */
@media(max-width:720px){
    .lah-chat-widget{
        right:12px !important;
        bottom:12px !important;
        left:auto !important;
        width:auto !important;
    }

    .lah-chat-widget.is-open{
        left:0 !important;
        right:0 !important;
        top:0 !important;
        bottom:0 !important;
        width:100vw !important;
        height:100dvh !important;
        pointer-events:none;
    }

    .lah-chat-widget.is-open .lah-chat-window{
        pointer-events:auto;
        position:fixed !important;
        left:10px !important;
        right:10px !important;
        top:calc(env(safe-area-inset-top, 0px) + 10px) !important;
        bottom:calc(env(safe-area-inset-bottom, 0px) + 10px) !important;
        width:auto !important;
        height:auto !important;
        max-height:none !important;
        border-radius:22px !important;
        display:flex !important;
        flex-direction:column !important;
        overflow:hidden !important;
        background:#ffffff !important;
        box-shadow:0 20px 70px rgba(8,38,87,.34) !important;
    }

    .lah-chat-head{
        flex:0 0 auto !important;
        padding:12px 14px !important;
        min-height:74px !important;
        border-radius:0 !important;
    }

    .lah-chat-brand{
        gap:10px !important;
        min-width:0 !important;
        flex:1 1 auto !important;
    }

    .lah-chat-brand img{
        width:118px !important;
        max-width:38vw !important;
        padding:4px !important;
        border-radius:8px !important;
        flex:0 0 auto !important;
    }

    .lah-chat-brand strong{
        font-size:17px !important;
        line-height:1.1 !important;
        white-space:normal !important;
    }

    .lah-chat-brand span{
        font-size:12px !important;
        line-height:1.2 !important;
    }

    .lah-chat-close{
        width:48px !important;
        height:48px !important;
        flex:0 0 48px !important;
        border-radius:16px !important;
        font-size:26px !important;
        background:rgba(255,255,255,.10) !important;
    }

    .lah-chat-intro{
        flex:0 0 auto !important;
        padding:10px 14px !important;
        font-size:13px !important;
        line-height:1.4 !important;
        border-right:0 !important;
        max-height:62px !important;
        overflow:auto !important;
    }

    .lah-chat-messages{
        flex:1 1 auto !important;
        min-height:0 !important;
        height:auto !important;
        padding:14px !important;
        gap:10px !important;
        border-right:0 !important;
        overflow-y:auto !important;
        -webkit-overflow-scrolling:touch !important;
    }

    .lah-msg{
        max-width:92% !important;
        padding:11px 13px !important;
        font-size:14px !important;
        line-height:1.4 !important;
        border-radius:16px !important;
        word-break:break-word !important;
    }

    .lah-msg.user{
        border-bottom-right-radius:5px !important;
    }

    .lah-msg.bot{
        border-bottom-left-radius:5px !important;
    }

    .lah-chat-quick{
        flex:0 0 auto !important;
        display:flex !important;
        gap:8px !important;
        overflow-x:auto !important;
        padding:10px 12px !important;
        border-top:1px solid #e7edf4 !important;
        border-right:0 !important;
        background:#fff !important;
        -webkit-overflow-scrolling:touch !important;
        scrollbar-width:none !important;
    }

    .lah-chat-quick::-webkit-scrollbar{
        display:none !important;
    }

    .lah-chat-quick button{
        flex:0 0 auto !important;
        min-height:42px !important;
        padding:9px 13px !important;
        font-size:13px !important;
        border-radius:999px !important;
        white-space:nowrap !important;
    }

    .lah-chat-input-form{
        flex:0 0 auto !important;
        display:grid !important;
        grid-template-columns:1fr auto !important;
        gap:8px !important;
        padding:10px 12px !important;
        border-top:1px solid #e7edf4 !important;
        border-right:0 !important;
        background:#ffffff !important;
    }

    .lah-chat-input-form input{
        min-height:52px !important;
        height:52px !important;
        border-radius:15px !important;
        padding:0 14px !important;
        font-size:16px !important;
        width:100% !important;
    }

    .lah-chat-input-form button{
        min-height:52px !important;
        height:52px !important;
        border-radius:15px !important;
        padding:0 16px !important;
        font-size:15px !important;
        white-space:nowrap !important;
    }

    /* The contact form becomes a neat bottom sheet on mobile, not covering the chat until needed */
    .lah-chat-lead-form{
        flex:0 0 auto !important;
        max-height:0 !important;
        overflow:hidden !important;
        padding:0 14px !important;
        border-top:0 !important;
        background:#fbfcfe !important;
        transition:max-height .25s ease, padding .25s ease, border-top .25s ease !important;
    }

    .lah-chat-widget.needs-lead .lah-chat-lead-form{
        max-height:43dvh !important;
        overflow-y:auto !important;
        padding:14px !important;
        border-top:1px solid #e7edf4 !important;
        -webkit-overflow-scrolling:touch !important;
    }

    .lah-chat-lead-form h4{
        font-size:18px !important;
        margin:0 0 8px !important;
    }

    .lah-chat-lead-form input,
    .lah-chat-lead-form textarea{
        min-height:50px !important;
        border-radius:14px !important;
        font-size:16px !important;
        padding:12px 13px !important;
        margin:0 !important;
    }

    .lah-chat-lead-form textarea{
        min-height:82px !important;
    }

    .lah-chat-consent{
        font-size:12px !important;
        line-height:1.35 !important;
        margin:2px 0 !important;
    }

    .lah-chat-lead-form button{
        min-height:50px !important;
        border-radius:999px !important;
        font-size:15px !important;
        position:sticky !important;
        bottom:0 !important;
    }

    /* Floating bubble when closed */
    .lah-chat-float{
        pointer-events:auto;
        width:62px !important;
        height:62px !important;
        min-height:62px !important;
        padding:0 !important;
        justify-content:center !important;
        border-radius:50% !important;
        background:#ffffff !important;
        color:var(--lah-green) !important;
        border:1px solid #dce4ee !important;
        box-shadow:0 12px 34px rgba(8,38,87,.24) !important;
    }

    .lah-chat-icon{
        width:44px !important;
        height:44px !important;
        background:rgba(45,174,28,.10) !important;
        color:var(--lah-green) !important;
        font-size:23px !important;
    }

    .lah-chat-text{
        display:none !important;
    }

    .lah-chat-dot{
        right:5px !important;
        top:4px !important;
        width:15px !important;
        height:15px !important;
    }

    /* Hide closed floating button while popup is open so it doesn't overlap */
    .lah-chat-widget.is-open .lah-chat-float{
        display:none !important;
    }
}

/* Extra small phones */
@media(max-width:390px){
    .lah-chat-brand img{
        width:98px !important;
    }
    .lah-chat-brand strong{
        font-size:15px !important;
    }
    .lah-chat-close{
        width:44px !important;
        height:44px !important;
        flex-basis:44px !important;
    }
    .lah-chat-input-form button{
        padding:0 12px !important;
        font-size:14px !important;
    }
    .lah-chat-widget.needs-lead .lah-chat-lead-form{
        max-height:46dvh !important;
    }
}
