/* Phase 2: viewport-safe conversation scrolling */
html,
body {
  min-height: 0;
}

.app-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.app-shell > *,
.inbox-panel,
.chat-panel,
.details-panel,
.chat-content {
  min-height: 0;
}

.inbox-panel,
.chat-panel {
  overflow: hidden;
}

.chat-panel,
.chat-content {
  height: 100%;
}

.chat-content {
  position: relative;
  overflow: hidden;
}

.messages {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

.chat-heading,
.composer {
  position: relative;
  z-index: 2;
}

.load-older-button {
  display: block;
  margin: 0 auto 18px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.94);
  font-size: 10px;
  font-weight: 750;
}

.load-older-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.new-messages-button {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 86px;
  transform: translateX(-50%);
  padding: 9px 14px;
  border: 1px solid rgba(23, 105, 224, 0.2);
  border-radius: 999px;
  color: white;
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(23, 105, 224, 0.24);
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .chat-panel {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .new-messages-button {
    bottom: 82px;
  }
}
