
/* =========================================================
   V5.16 — iPhone / Mobile Chat UX Fix
   ========================================================= */
@media(max-width:600px){
    .nls-front-content input,
    .nls-front-content textarea,
    .nls-front-content select,
    #nls-front-message{
        font-size:16px !important;
        line-height:1.55 !important;
    }

    .nls-front-overlay{
        padding:0 !important;
        align-items:flex-start !important;
        justify-content:stretch !important;
        overflow:hidden !important;
    }

    .nls-front-card{
        width:100% !important;
        max-width:none !important;
        height:var(--nls-mobile-vh, 100dvh) !important;
        max-height:var(--nls-mobile-vh, 100dvh) !important;
        min-height:0 !important;
        border-radius:0 !important;
        overflow:hidden !important;
    }

    .nls-front-head{
        flex:0 0 auto;
        padding:11px 12px !important;
    }

    .nls-front-content{
        flex:1 1 auto !important;
        min-height:0 !important;
        height:auto !important;
        overflow:hidden !important;
        padding:10px !important;
        display:flex !important;
        flex-direction:column !important;
    }

    .nls-front-chat-meta{
        flex:0 0 auto;
        margin-bottom:7px !important;
    }

    .nls-front-messages{
        flex:1 1 auto !important;
        min-height:0 !important;
        overflow-y:auto !important;
        -webkit-overflow-scrolling:touch;
        padding:9px !important;
    }

    .nls-front-compose{
        flex:0 0 auto !important;
        display:grid !important;
        grid-template-columns:minmax(0,1fr) auto !important;
        gap:7px !important;
        align-items:end !important;
        margin-top:7px !important;
    }

    .nls-front-compose textarea{
        width:100% !important;
        min-width:0 !important;
        min-height:52px !important;
        max-height:110px !important;
        resize:none !important;
        overflow-y:auto !important;
        padding:10px 11px !important;
        border-radius:10px !important;
    }

    #nls-front-send{
        min-width:68px !important;
        height:52px !important;
        padding:0 13px !important;
        font-size:14px !important;
        white-space:nowrap !important;
    }

    .nls-front-bottom{
        flex:0 0 auto !important;
        margin-top:4px !important;
        padding-bottom:max(4px, env(safe-area-inset-bottom)) !important;
    }

    .nls-front-bubble{
        max-width:88% !important;
        font-size:14px !important;
        line-height:1.75 !important;
    }

    .nls-front-msg-name,
    .nls-front-msg-time{
        font-size:10px !important;
    }

    #nazbot-live-v5-root,
    .nls-front-overlay,
    .nls-front-card,
    .nls-front-content,
    .nls-front-compose{
        max-width:100vw !important;
        box-sizing:border-box !important;
    }

    .nls-front-content,
    .nls-front-content *{
        box-sizing:border-box;
    }

    .nls-front-link-url{
        overflow-wrap:anywhere;
        word-break:break-word;
    }
}


/* V5.9 — clickable links in customer chat */
.nls-front-link-url{
    color:inherit;
    text-decoration:underline;
    text-underline-offset:2px;
    font-weight:700;
    word-break:break-all;
}
.nls-front-msg.agent .nls-front-link-url{
    color:#075f99;
}
.nls-front-msg.customer .nls-front-link-url{
    color:#fff;
}

#nazbot-live-v5-root{position:relative;z-index:2147483000;font-family:inherit;direction:rtl}
.nls-front-overlay{position:fixed;inset:0;background:rgba(11,30,43,.35);display:flex;align-items:center;justify-content:center;padding:20px}
.nls-front-card{width:min(720px,96vw);height:min(760px,90vh);background:#fff;border-radius:18px;box-shadow:0 24px 70px rgba(0,0,0,.24);display:flex;flex-direction:column;overflow:hidden;border:1px solid #dfe9f1}
.nls-front-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;background:#f7fbfe;border-bottom:1px solid #e5edf3}
.nls-front-head strong{display:block;color:#045b98;font-size:17px}.nls-front-head span{display:block;margin-top:3px;color:#69808f;font-size:11px}
#nls-front-x{border:0;background:#eaf2f7;border-radius:10px;width:34px;height:34px;font-size:23px;cursor:pointer;color:#456}
.nls-front-content{padding:18px;overflow:auto;flex:1;display:flex;flex-direction:column}
.nls-front-intro{text-align:center;margin:5px 0 16px}.nls-front-icon{font-size:38px}.nls-front-intro h2{margin:5px 0;font-size:19px;color:#123}.nls-front-intro p{margin:0;color:#6f818d;font-size:12px;line-height:1.9}
.nls-front-content label{font-size:11px;color:#526675;margin:8px 2px 5px}.nls-front-content label small{color:#91a0aa}
.nls-front-content input,.nls-front-content textarea{box-sizing:border-box;width:100%;border:1px solid #cddce7;border-radius:10px;padding:11px 12px;font-family:inherit;font-size:13px;outline:none;background:#fff}
.nls-front-content input:focus,.nls-front-content textarea:focus{border-color:#0877bd;box-shadow:0 0 0 3px rgba(8,119,189,.08)}
.nls-front-primary{border:0;border-radius:10px;background:#0569aa;color:#fff;padding:11px 16px;font-family:inherit;font-weight:700;cursor:pointer}
.nls-front-primary:disabled{opacity:.6;cursor:wait}.nls-front-error{min-height:20px;color:#c62828;font-size:11px;padding-top:5px}
.nls-front-chat-meta{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:9px 11px;background:#f6fafc;border:1px solid #e5edf2;border-radius:11px;margin-bottom:10px}
.nls-front-chat-meta span{display:block;font-size:9px;color:#84949e}.nls-front-chat-meta strong{font-size:11px;color:#345}.nls-front-agent{font-size:10px;color:#0574b6;background:#eaf6fd;border-radius:999px;padding:6px 9px}
.nls-front-messages{flex:1;min-height:330px;overflow:auto;background:#f5f9fc;border-radius:12px;padding:12px}
.nls-front-msg{display:flex;flex-direction:column;margin:9px 0}.nls-front-msg.customer{align-items:flex-end}.nls-front-msg.agent{align-items:flex-start}.nls-front-msg.system{align-items:center}
.nls-front-msg-name,.nls-front-msg-time{font-size:9px;color:#8797a2;margin:2px 7px}.nls-front-bubble{max-width:75%;padding:10px 12px;border-radius:13px;background:#fff;border:1px solid #dce7ee;color:#223;line-height:1.8;font-size:12px}
.nls-front-msg.customer .nls-front-bubble{background:#066ba9;color:#fff;border-color:#066ba9}.nls-front-msg.system span{font-size:10px;color:#657784;background:#e7eef3;padding:6px 10px;border-radius:999px;text-align:center}
.nls-front-compose{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:10px;align-items:end}.nls-front-compose textarea{resize:none}
.nls-front-bottom{display:flex;justify-content:space-between;gap:8px;margin-top:8px}.nls-front-link{border:0;background:none;color:#5f7482;font-family:inherit;font-size:10px;cursor:pointer;padding:6px}
@media(max-width:600px){.nls-front-overlay{padding:0;align-items:stretch}.nls-front-card{width:100%;height:100%;max-height:none;border-radius:0}.nls-front-content{padding:12px}.nls-front-messages{min-height:0}.nls-front-bubble{max-width:86%}}
