/* Chat landing content only. Existing shell, drawers and call layout own geometry. */
#mc-chat-app {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#mc-chat-app .mc-chat-home {
  container: mc-home / inline-size;
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: stretch;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: clamp(18px, 2.5vw, 36px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  color: #edf6fa;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}
#mc-chat-app .mc-chat-home:not([hidden]) { display: block; }
#mc-chat-app .mc-chat-home > * { max-width: 920px; margin-inline: auto; }
#mc-chat-app .mc-chat-home[hidden],
#mc-chat-app .mc-chat-conversation:has(> [id^="mc-center-"]:not([hidden])) > .mc-chat-home {
  display: none !important;
}

/* Honor the directory filter on phones, whose row layout uses !important. */
#mc-chat-app .mc-chat-person[hidden] { display: none !important; }

/* Author display declarations must not turn hidden zero counts into red alerts. */
#mc-chat-app .mc-chat-unread[hidden],
#mc-chat-app .mc-home-unread[hidden],
#mc-chat-app .mc-home-directory-empty[hidden] { display: none !important; }
#mc-chat-app .mc-chat-search .sr-only,
#mc-chat-app .mc-home-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#mc-chat-app .mc-home-header { margin-bottom: 22px; }
#mc-chat-app .mc-home-eyebrow {
  margin: 0 0 5px;
  color: #58d4eb;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
#mc-chat-app #mc-chat-home-title {
  margin: 0 0 8px;
  color: #f4fbff;
  font-size: clamp(26px, 2.2vw, 34px);
  font-weight: 760;
  line-height: 1.18;
  letter-spacing: -.035em;
}
#mc-chat-app .mc-home-intro { margin: 0; color: #afc8d6; font-size: 14px; }
#mc-chat-app .mc-home-search { margin-block: 0 20px; padding: 0; }
#mc-chat-app .mc-home-search label {
  display: block;
  margin-bottom: 7px;
  color: #deedf5;
  font-size: 13px;
  font-weight: 650;
}
#mc-chat-app .mc-home-search-row { display: flex; align-items: stretch; gap: 8px; }
#mc-chat-app .mc-home-search-row input {
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid #355466;
  border-radius: 10px;
  background: #091e2a;
  color: #f0f7fb;
  font: inherit;
  font-size: 16px;
  box-shadow: inset 0 1px 3px #0002;
}
#mc-chat-app .mc-home-search-row input::placeholder { color: #8faab9; opacity: 1; }
#mc-chat-app .mc-home-search-row button,
#mc-chat-app .mc-home-primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 46px;
  margin: 0;
  padding: 10px 19px;
  border: 1px solid #1894bf;
  border-radius: 10px;
  background: #007ca8;
  color: #fff;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
#mc-chat-app .mc-home-search-row button:hover,
#mc-chat-app .mc-home-primary-link:hover { background: #0a90bc; }
#mc-chat-app .mc-chat-home :is(a, button, input):focus-visible {
  outline: 3px solid #7bdff2;
  outline-offset: 3px;
}

#mc-chat-app .mc-home-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-block: 0 26px;
  padding: 0;
  border: 1px solid #294858;
  border-radius: 12px;
  background: #102c3a;
  list-style: none;
}
#mc-chat-app .mc-home-summary li { min-width: 0; margin: 0; padding: 13px 18px; }
#mc-chat-app .mc-home-summary li + li { border-left: 1px solid #294858; }
#mc-chat-app .mc-home-summary strong {
  display: block;
  color: #e8f6fc;
  font-size: 23px;
  font-weight: 750;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
#mc-chat-app .mc-home-summary span { display: block; margin-top: 4px; color: #a9c5d4; font-size: 12px; }
#mc-chat-app .mc-home-summary .has-unread { color: #6de0ee; }
#mc-chat-app .mc-home-section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 12px;
}
#mc-chat-app .mc-home-section-head h3 { margin: 0; color: #f0f8fc; font-size: 17px; font-weight: 700; line-height: 1.3; }
#mc-chat-app .mc-home-section-head a { color: #7dd6ef; font-size: 12px; font-weight: 650; text-underline-offset: 4px; }
#mc-chat-app .mc-home-contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
#mc-chat-app .mc-home-contact-item { min-width: 0; margin: 0; padding: 0; }
#mc-chat-app .mc-home-contact {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  height: 100%;
  min-height: 104px;
  padding: 14px;
  border: 1px solid #2e4c5d;
  border-radius: 12px;
  background: #102735;
  color: #f1f8fc;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}
#mc-chat-app .mc-home-contact:hover { border-color: #478ba8; background: #153446; }
#mc-chat-app .mc-home-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid #4e8ca0;
  border-radius: 50%;
  background: linear-gradient(140deg, #077f9c, #095e64);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}
#mc-chat-app .mc-home-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
#mc-chat-app .mc-home-contact-copy { display: block; min-width: 0; }
#mc-chat-app .mc-home-contact-copy strong { display: block; color: #f1f8fc; font-size: 14px; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
#mc-chat-app .mc-home-location { display: block; margin-top: 3px; color: #a6c0cf; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
#mc-chat-app .mc-home-presence { display: block; margin-top: 5px; color: #9ab3c1; font-size: 11px; line-height: 1.3; }
#mc-chat-app .mc-home-presence::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #7995a5; vertical-align: 1px; }
#mc-chat-app .mc-home-presence.is-online { color: #80e0bf; }
#mc-chat-app .mc-home-presence.is-online::before { background: #39d7a7; }
#mc-chat-app .mc-home-presence.is-recent::before { background: #e3b660; }
#mc-chat-app .mc-home-contact-action { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 8px; }
#mc-chat-app .mc-home-message-label { padding: 7px 9px; border: 1px solid #246882; border-radius: 7px; background: #10465d; color: #ddf5ff; font-size: 11px; font-weight: 750; }
#mc-chat-app .mc-home-unread { display: inline-grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; background: #0789b6; color: #fff; font-size: 11px; font-weight: 800; }

#mc-chat-app .mc-home-empty { padding: 23px; border: 1px dashed #3c6074; border-radius: 12px; background: #0d2532; }
#mc-chat-app .mc-home-empty h4 { margin: 0 0 7px; color: #edf7fd; font-size: 17px; }
#mc-chat-app .mc-home-empty p { max-width: 460px; margin: 0 0 16px; color: #b2cad7; font-size: 13px; }
#mc-chat-app .mc-home-requests { margin-block: 24px 0; }
#mc-chat-app .mc-home-request-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
#mc-chat-app .mc-home-request { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; margin: 0; padding: 12px 14px; border: 1px solid #355a6c; border-radius: 10px; background: #122e3c; }
#mc-chat-app .mc-home-request > span { min-width: 0; }
#mc-chat-app .mc-home-request strong { color: #eef8fd; font-size: 13px; overflow-wrap: anywhere; }
#mc-chat-app .mc-home-request-detail { display: block; margin-top: 3px; color: #abc6d4; font-size: 12px; }
#mc-chat-app .mc-home-request a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; flex: 0 0 auto; padding: 8px 14px; border: 1px solid #39718c; border-radius: 8px; color: #b2eaff; font-size: 12px; font-weight: 750; text-decoration: none; }
#mc-chat-app .mc-home-request a:hover { background: #21485b; }
#mc-chat-app .mc-home-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-block: 24px 0; padding-top: 22px; border-top: 1px solid #294454; }
#mc-chat-app .mc-home-shortcuts > a { display: flex; align-items: center; gap: 9px; min-height: 54px; min-width: 0; padding: 11px 13px; border: 1px solid #294858; border-radius: 10px; color: #d2e8f4; background: #0e2531; font-size: 12px; font-weight: 650; text-decoration: none; }
#mc-chat-app .mc-home-shortcuts > a:hover { background: #173647; border-color: #447a94; }
#mc-chat-app .mc-home-shortcut-icon { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 26px; border-radius: 7px; background: #114459; color: #62d3ee; font-size: 14px; font-weight: 750; }
#mc-chat-app .mc-home-shortcut-arrow { margin-left: auto; color: #7babbe; }
#mc-chat-app .mc-home-note { margin-block: 19px 0; padding-bottom: 4px; color: #91adbd; font-size: 11px; line-height: 1.6; }
#mc-chat-app .mc-home-directory-empty { margin: 8px 12px; color: #b5cbd8; font-size: 13px; }

/* Component wrapping follows its actual center width; app.php still owns phone mode. */
@container mc-home (max-width: 460px) {
  #mc-chat-app .mc-home-header { margin-bottom: 18px; }
  #mc-chat-app #mc-chat-home-title { font-size: 28px; }
  #mc-chat-app .mc-home-intro { font-size: 13px; }
  #mc-chat-app .mc-home-summary { margin-bottom: 23px; }
  #mc-chat-app .mc-home-summary li { padding: 12px 9px; }
  #mc-chat-app .mc-home-summary strong { font-size: 22px; }
  #mc-chat-app .mc-home-summary span { font-size: 11px; }
  #mc-chat-app .mc-home-contact-list { grid-template-columns: minmax(0, 1fr); }
  #mc-chat-app .mc-home-contact { min-height: 91px; padding: 12px; }
  #mc-chat-app .mc-home-shortcuts { gap: 7px; }
  #mc-chat-app .mc-home-shortcuts > a { flex-direction: column; justify-content: center; gap: 6px; padding: 11px 5px; text-align: center; font-size: 11px; }
  #mc-chat-app .mc-home-shortcut-icon { flex-basis: 26px; }
  #mc-chat-app .mc-home-shortcut-arrow { display: none; }
}
body.mc-phone-app-shell #mc-chat-app .mc-chat-home { padding: 19px 15px 24px; }
@media (prefers-reduced-motion: reduce) {
  #mc-chat-app .mc-home-contact { transition: none; }
}
