/* LEMMIQ V2.10.11 — light default, responsive messenger, media previews */
:root,[data-lemmiq-theme="light"]{
  --bg:#f6f5fa;--panel:#ffffff;--panel2:#f1edf8;--text:#17171f;--muted:#7d7d89;
  --line:rgba(40,35,55,.11);--purple:#6c4dff;--pink:#ff5aa7;--cyan:#4ea9e8;--green:#18a977;
  --danger:#d94b62;--shadow:0 12px 38px rgba(30,22,55,.08);
}
html[data-lemmiq-theme="light"],html[data-lemmiq-theme="light"] body{background:#f6f5fa;color:var(--text)}
html[data-lemmiq-theme="light"] body{background:linear-gradient(180deg,#faf9fd,#f6f5fa 58%,#f3eff9)}
html[data-lemmiq-theme="light"] .glass{background:rgba(255,255,255,.92);border-color:var(--line);box-shadow:var(--shadow);backdrop-filter:blur(18px)}
html[data-lemmiq-theme="light"] .sidebar nav button{color:#54525f}
html[data-lemmiq-theme="light"] .sidebar nav button.active{color:#2c2541;background:#eee8ff;border-color:#ddd2ff}
html[data-lemmiq-theme="light"] input,
html[data-lemmiq-theme="light"] textarea,
html[data-lemmiq-theme="light"] select{background:#fff;color:#18171f;border-color:#cbc8d2}
html[data-lemmiq-theme="light"] .ghost,
html[data-lemmiq-theme="light"] .upload{background:#f6f3fb;color:#2e2a37;border-color:#d7d1df}
html[data-lemmiq-theme="light"] .chat-row:hover,
html[data-lemmiq-theme="light"] .chat-row.active{background:#f3effa}
html[data-lemmiq-theme="light"] .msg.theirs{background:#fff;color:#17171f;border-color:#e2dfe8}
html[data-lemmiq-theme="light"] .msg.mine{color:#fff}
html[data-lemmiq-theme="light"] .msg.theirs .meta{color:#8a8793}
html[data-lemmiq-theme="light"] .composer{background:rgba(255,255,255,.96);border-color:#e4e0e8}
html[data-lemmiq-theme="light"] .date-separator span{background:#f1edf8;color:#888391;border-color:#e4def0}
html[data-lemmiq-theme="light"] .mini{background:#f6f3fa;color:#484452;border-color:#ddd7e4}
html[data-lemmiq-theme="light"] .empty-state h3{color:#2a2731}
html[data-lemmiq-theme="light"] .hero-pills span,
html[data-lemmiq-theme="light"] .chips span{background:#f2eef8;color:#514b60}
html[data-lemmiq-theme="light"] .auth-brand h1{background:none;-webkit-background-clip:initial;color:#16151d}
html[data-lemmiq-theme="light"] label{color:#575260}

html[data-lemmiq-theme="dark"]{
  --bg:#080b18;--panel:rgba(20,24,46,.76);--panel2:rgba(31,36,65,.78);--text:#f7f8ff;
  --muted:#9aa3c6;--line:rgba(255,255,255,.09);--purple:#7a5cff;--pink:#ff5aa7;--cyan:#55d7ff;
  --green:#53e0a0;--danger:#ff5f74;--shadow:0 24px 80px rgba(0,0,0,.35)
}
html[data-lemmiq-theme="dark"] body{background:radial-gradient(circle at 20% 0%,rgba(122,92,255,.20),transparent 34%),radial-gradient(circle at 100% 20%,rgba(255,90,167,.14),transparent 30%),linear-gradient(155deg,#080b18 0%,#0c1021 56%,#090d1b 100%);color:var(--text)}

/* WhatsApp-like timestamp column in Chats list */
.v211-chat-side{display:flex;min-width:64px;flex-direction:column;align-items:flex-end;gap:5px;align-self:stretch;justify-content:center}
.v211-chat-time{font-size:10px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.v211-chat-side.unread .v211-chat-time{color:var(--purple);font-weight:700}

/* Keep every composer control on-screen. Q and Send remain visible. */
.composer{grid-template-columns:44px 44px minmax(0,1fr) 44px 48px!important;align-items:center!important;gap:6px!important;padding:8px 10px max(8px,env(safe-area-inset-bottom))!important}
.composer .attach-btn,.composer .voice-btn,.composer .qbtn,.composer .send{display:grid!important;place-items:center;min-width:0!important;width:44px!important;height:44px!important;padding:0!important}
.composer .send{width:48px!important}
.composer textarea{min-width:0!important;width:100%!important;margin:0!important}
#activeGroup .composer{grid-template-columns:44px 44px minmax(0,1fr) 48px!important}

/* Browser authenticated media previews */
.v211-photo-wrap{display:block;margin-top:6px;border:0;background:transparent;padding:0;max-width:min(420px,72vw);cursor:pointer;text-align:left}
.v211-photo{display:block;width:100%;max-height:520px;object-fit:cover;border-radius:14px;background:#ddd}
.v211-photo-loading{display:grid;place-items:center;min-height:120px;border-radius:14px;background:rgba(120,110,145,.12);font-size:11px;color:var(--muted)}
.v211-photo-failed{display:flex;gap:7px;align-items:center;margin-top:5px}
.v211-viewer{position:fixed;inset:0;z-index:100000;background:rgba(0,0,0,.96);display:grid;place-items:center;padding:18px}
.v211-viewer img{max-width:100%;max-height:100%;object-fit:contain;touch-action:pinch-zoom}
.v211-viewer-close{position:fixed;top:max(14px,env(safe-area-inset-top));right:14px;border:0;background:rgba(255,255,255,.13);color:#fff;width:44px;height:44px;border-radius:50%;font-size:28px;z-index:1}
.v211-load-older{align-self:center;margin:4px auto 10px;border-radius:999px}

/* Small controls injected into More */
.v211-settings-card{border:1px solid var(--line);background:var(--panel);color:inherit;border-radius:20px;padding:18px;text-align:left;min-height:135px;display:flex;flex-direction:column;gap:8px}
.v211-settings-card .actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:auto}
.v211-settings-card strong{font-size:15px}.v211-settings-card small{color:var(--muted);line-height:1.4}

@media(max-width:680px){
  .app-shell{padding:8px!important}
  .chat-layout{height:calc(100dvh - 92px)}
  .messages{padding:12px!important}
  .composer{grid-template-columns:38px 38px minmax(0,1fr) 38px 42px!important;gap:4px!important;padding-left:6px!important;padding-right:6px!important}
  .composer .attach-btn,.composer .voice-btn,.composer .qbtn{width:38px!important;height:40px!important}
  .composer .send{width:42px!important;height:42px!important}
  #activeGroup .composer{grid-template-columns:38px 38px minmax(0,1fr) 42px!important}
  .v211-photo-wrap{max-width:min(360px,76vw)}
  .v211-chat-side{min-width:58px}
}
