/* NOVO UI 3.6 · Stage 1 · 2026-11-15
 * Presentation-only refinement of the chat shell. No interaction overrides.
 * Deliberately scoped to messenger shell; business screens and user-selected
 * accent colors, privacy settings, media playback and calls are unchanged.
 */

/* Common readability: keep compact information readable at desktop & mobile scale. */
#app .shell .chat-item .name {
  font-size: 15px!important;
  font-weight: 720!important;
  line-height: 1.25;
  letter-spacing: -.12px;
}
#app .shell .chat-item .preview {
  font-size: 13.5px!important;
  font-weight: 450;
  line-height: 1.42!important;
  color: var(--muted);
}
#app .shell .chat-item .time {
  font-size: 11px!important;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
#app .shell .chathead .info b {
  font-size: 15.5px!important;
  font-weight: 730!important;
  line-height: 1.3;
  letter-spacing: -.12px;
}
#app .shell .chathead .info small {line-height: 1.35;}

/* Specificity is intentional: existing sticker/video/round-message styles
 * keep their transparent media surfaces and metadata overlays. */
#app .shell .messages .message:not(.media-only):not(.round-message):not(.unframed-media) > .bubble {
  border-radius: 15px 15px 15px 5px;
  padding: 8px 11px;
  box-shadow: 0 1px 2px rgba(0,0,0,.14);
}
#app .shell .messages .message.mine:not(.media-only):not(.round-message):not(.unframed-media) > .bubble {
  border-radius: 15px 15px 5px 15px;
}
#app .shell .messages .message .bubble .body {
  font-size: 15.5px!important;
  line-height: 1.43!important;
  font-weight: 485;
  letter-spacing: -.07px;
  overflow-wrap: anywhere;
}
#app .shell .messages .message .bubble .meta {
  font-size: 10.5px!important;
  line-height: 1.25;
  font-weight: 540!important;
  font-variant-numeric: tabular-nums;
}
#app .shell .messages .day {
  border-radius: 13px;
  font-size: 11px!important;
  font-weight: 600!important;
  letter-spacing: .05px;
}

/* Inputs remain at 16px: prevents unwanted automatic zoom on iPhones. */
#app .shell .composer textarea,
#app .shell .composer #compose {
  font-size: 16px!important;
  line-height: 1.4!important;
  font-weight: 440;
  letter-spacing: 0;
}
#app .shell .composer button:focus-visible,
#app .shell .chat-item:focus-visible,
#app .shell .rail .navbtn:focus-visible {
  outline: 2px solid #80b8ff;
  outline-offset: -2px;
}

/* Consistent outline icon proportions without replacing icon assets or event handlers. */
#app .shell .rail .navbtn svg {
  width: 22px!important;
  height: 22px!important;
}
#app .shell .chathead button .i,
#app .shell .composer button .i {
  width: 20px;
  height: 20px;
}

/* Desktop geometry: reference-inspired density without moving sections. */
@media (min-width: 761px) {
  #app .shell:not(.reels-mode) {
    grid-template-columns: 68px 352px minmax(0,1fr);
  }
  #app .shell .rail .navbtn {
    min-height: 59px;
    gap: 4px;
    font-size: 10.5px;
  }
  #app .shell .sidebar .chat-item {
    min-height: 72px;
    padding: 9px 13px;
    gap: 11px;
    border-radius: 0;
  }
  #app .shell .sidebar .chat-item .avatar {
    width: 46px;
    height: 46px;
    min-width: 46px;
  }
  #app .shell .sidehead {
    min-height: 55px;
  }
  #app .shell .chathead {
    height: 58px;
    min-height: 58px;
  }
  #app .shell .messages {
    gap: 6px;
  }
  #app .shell .composer-area {
    padding-bottom: 12px;
  }
}

/* Light theme: preserve its configured colors; avoid dark-only overrides. */
body.light #app .shell .chat-item .preview {color: var(--muted);}
body.light #app .shell .chat-item.active {background-color: #e7ecf6!important;}
body.light #app .shell .chat-item:hover:not(.active) {background-color: #f1f4f9;}

/* Dark theme: reference-like graphite panels, higher text contrast and
 * lighter visual weight; do not overwrite user-selected accent variables. */
body:not(.light) #app .shell .rail,
body:not(.light) #app .shell .sidebar,
body:not(.light) #app .shell .chathead {
  background-color: #17191e;
}
body:not(.light) #app .shell .sidebar .chat-item.active {
  background-color: #2a2d36;
}
body:not(.light) #app .shell .sidebar .chat-item:hover:not(.active) {
  background-color: #22252d;
}
body:not(.light) #app .shell .chat-item .name,
body:not(.light) #app .shell .chathead .info b {color: #f4f5f8;}
body:not(.light) #app .shell .chat-item .preview {color: #a9abb6;}
body:not(.light) #app .shell .messages .message:not(.mine):not(.media-only):not(.round-message):not(.unframed-media) > .bubble {
  background-color: #292c34;
}
body:not(.light) #app .shell .composer {
  background-color: #24272f!important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.065)!important;
}
/* Keep the NOVO wallpaper, but soften the large accent-colored glow. */
body:not(.light) #app .shell .main.wallpaper {
  background-color: #111319;
  background-image:
    linear-gradient(rgba(15,17,24,.42), rgba(15,17,24,.42)),
    radial-gradient(ellipse at 50% 25%, var(--theme-tint, transparent), transparent 75%),
    url('/wallpaper.svg');
  background-size: auto, auto, 420px;
}
body:not(.light) #app .shell .day {
  background-color: rgba(26,28,35,.88);
  color: #adb0bf;
}

/* Hover only on precise pointers, so touch interaction stays immediate. */
@media (hover: hover) and (pointer: fine) {
  #app .shell .rail .navbtn,
  #app .shell .sidebar .chat-item,
  #app .shell .composer button {
    transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
  }
}
@media (max-width: 760px) {
  /* Respect existing mobile layout and safe area: typography only. */
  #app .shell .messages .message .bubble .body {
    font-size: 15.5px!important;
    line-height: 1.43!important;
  }
}
@media (prefers-reduced-motion: reduce) {
  #app .shell .rail .navbtn,
  #app .shell .sidebar .chat-item,
  #app .shell .composer button {transition: none!important;}
}
