/* =====================================================================================================================
   2026-11-14 (Claude Code) — Chat on wide screens (tablet held sideways + computer). Owner (tablet photo): "when teacher
   uses message chat, hide the left Home menu, and redesign the chat center — not professional". Before: the Chat box sat
   inside the page with the menu on the left, a big empty band under it, and the typing box cut off at the bottom.
   Now: Chat fills the whole screen like a desktop messenger — the Chats list on the left (with a Home key), the open
   conversation on the right, its header on top and the typing box always at the bottom. Phones are not touched.
   Remove this file's <link> in index.html to go back.
   ===================================================================================================================== */
.lx-fb-home { display: none; }

@media (min-width: 1100px) and (((hover: hover) and (pointer: fine)) or (orientation: landscape)) {
  /* the page around Chat: no left menu, no top bar, no outer gaps */
  body[data-route="messenger"] { padding: 0 !important; overflow: hidden; }
  body[data-route="messenger"] .desk-rail,
  body[data-route="messenger"] #brandHeader,
  body[data-route="messenger"] #bottomNav,
  body[data-route="messenger"] .name-ribbon { display: none !important; }
  body[data-route="messenger"] .app {
    max-width: none !important; width: 100% !important; margin: 0 !important; padding: 0 !important;
    min-height: 0 !important; height: 100dvh !important;
  }
  body[data-route="messenger"] #main { padding: 0 !important; margin: 0 !important; height: 100dvh; }
  body[data-route="messenger"] #v-messenger#v-messenger {
    max-width: none !important; margin: 0 !important; padding: 0 !important; height: 100dvh; box-sizing: border-box;
  }

  /* the Chat frame = the whole screen */
  body[data-route="messenger"] .lx-msg-shell {
    height: 100dvh !important; min-height: 0 !important; gap: 0 !important;
    border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  }
  body[data-route="messenger"] .lx-msg-body {
    flex: 1 1 auto; min-height: 0 !important; max-height: none !important; height: 100%;
    grid-template-columns: clamp(330px, 28vw, 400px) minmax(0, 1fr) !important;
  }

  /* left: the Chats list column */
  body[data-route="messenger"] .lx-msg-sidebar {
    display: flex !important; flex-direction: column; min-height: 0; height: 100%; overflow: hidden;
    background: var(--m-surface) !important;
    border-right: 1px solid color-mix(in srgb, var(--m-line) 28%, transparent) !important;
  }
  body[data-route="messenger"] .lx-fb-top { padding: 16px 16px 4px; flex: none; }
  body[data-route="messenger"] .lx-side-tabs { flex: none; }
  body[data-route="messenger"] .lx-conv-list { flex: 1 1 auto; min-height: 0; overflow-y: auto !important; padding: 2px 8px 12px !important; }
  body[data-route="messenger"] .lx-conv-item { border-radius: 14px !important; }
  body[data-route="messenger"] .lx-conv-item.is-active {
    background: color-mix(in srgb, var(--m-acc) 16%, transparent) !important;
    box-shadow: inset 3px 0 0 var(--m-gold);
  }

  /* the Home key left of "Chats" (the menu is hidden here) */
  .lx-fb-home {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 40px; height: 40px; border-radius: 12px; color: var(--m-ink); text-decoration: none;
    background: var(--m-chip); border: 1px solid color-mix(in srgb, var(--m-gold) 45%, transparent);
  }
  .lx-fb-home:hover { background: rgba(255, 255, 255, .16); }
  .lx-fb-home svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

  /* right: the open conversation */
  body[data-route="messenger"] .lx-msg-main {
    display: flex !important; flex-direction: column; min-height: 0 !important; height: 100%; overflow: hidden;
    background:
      radial-gradient(1200px 600px at 70% -10%, color-mix(in srgb, var(--m-base) 30%, transparent), transparent 70%),
      var(--m-bg) !important;
  }
  body[data-route="messenger"] .lx-chat-header {
    flex: none; min-height: 68px; box-sizing: border-box; padding: 10px 24px !important;
    background: color-mix(in srgb, var(--m-surface) 92%, transparent) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--m-line) 28%, transparent) !important;
  }
  body[data-route="messenger"] .lx-chat-header .lx-avatar { width: 46px !important; height: 46px !important; min-width: 46px; }
  body[data-route="messenger"] .lx-chat-stream {
    flex: 1 1 auto; min-height: 0 !important; height: auto !important; max-height: none !important; overflow-y: auto;
    padding: 20px clamp(20px, 4vw, 64px) !important;
  }
  body[data-route="messenger"] .lx-msg-row { max-width: min(620px, 70%) !important; }
  body[data-route="messenger"] .lx-chat-composer {
    flex: none; padding: 12px clamp(16px, 3vw, 48px) 14px !important;
    background: color-mix(in srgb, var(--m-surface) 92%, transparent) !important;
    border-top: 1px solid color-mix(in srgb, var(--m-line) 28%, transparent) !important;
  }
}
