.onto-messages{max-width:1200px;margin:0 auto;padding:22px 0 40px}.onto-messages-top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.onto-messages-top h1{margin:4px 0}.onto-messages-error:not(:empty){padding:14px;color:#9e2334;background:#fff2f3;border:1px solid #edc6cd;border-radius:8px;margin-bottom:12px}.onto-messages-layout{display:grid;grid-template-columns:minmax(240px,32%) minmax(0,1fr);min-height:500px;gap:0;border:1px solid #ddd;border-radius:14px;overflow:hidden;background:#fff}.onto-conversations{border-right:1px solid #e5e5e5;min-width:0;max-height:720px;overflow-y:auto;overscroll-behavior:contain}.onto-conversation-row{display:block;position:relative;text-align:left;width:100%;border:0;border-bottom:1px solid #e8e8e8;background:#fff;padding:19px 18px;min-height:105px;cursor:pointer;color:inherit}.onto-conversation-row:hover,.onto-conversation-row[aria-pressed=true]{background:#fcf0f2}.onto-conversation-row[aria-pressed=true]{box-shadow:inset 4px 0 #b6233d}.onto-conversation-row-top{display:flex;justify-content:space-between;gap:8px;margin-bottom:6px}.onto-conversation-row-top strong{font-size:1rem;overflow-wrap:anywhere}.onto-conversation-row-top time{font-size:.8rem;color:#6d6d6d;white-space:nowrap}.onto-conversation-row-title,.onto-conversation-row-last{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.9rem;margin-top:4px}.onto-conversation-row-last{color:#666;padding-right:25px}.onto-conversation-unread,.onto-message-nav-count{display:inline-flex;align-items:center;justify-content:center;min-width:23px;min-height:23px;border-radius:50%;padding:1px 6px;background:#b6233d;color:#fff;font-size:.8rem;font-weight:700}.onto-conversation-unread{position:absolute;right:17px;bottom:17px}.onto-message-nav-count{margin-left:6px}.onto-thread,.onto-thread-empty{grid-column:2;grid-row:1;min-width:0}.onto-thread{display:flex;flex-direction:column;min-height:500px;max-height:720px}.onto-thread[hidden],.onto-thread-empty[hidden]{display:none}.onto-thread-empty{padding:45px 30px;align-self:center;text-align:center;color:#666}.onto-thread-empty h2{font-size:1.3rem;color:#2d2d2d}.onto-thread-heading{padding:17px 22px;border-bottom:1px solid #eee;display:flex;align-items:center;gap:15px;min-height:70px}.onto-thread-heading h2{font-size:1.2rem;margin:0;overflow-wrap:anywhere}.onto-thread-back{display:none}.onto-thread-property{padding:12px 18px;border-bottom:1px solid #eee}.onto-conversation-property{display:flex;align-items:center;gap:13px;padding:10px;border:1px solid #e0e0e0;border-radius:10px;color:inherit;text-decoration:none;min-height:70px}.onto-conversation-property:hover{background:#faf6f6;border-color:#ba2b42}.onto-conversation-property img{width:74px;height:66px;object-fit:cover;border-radius:8px;flex-shrink:0}.onto-conversation-property>span{min-width:0}.onto-conversation-property strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:1rem;line-height:1.4}.onto-conversation-property span span{display:block;color:#6b6b6b;margin-top:5px;font-size:.9rem;overflow-wrap:anywhere}.onto-thread-unavailable{font-size:.9rem;color:#777;margin:3px 0}.onto-thread-history{overflow-y:auto;overscroll-behavior:contain;min-height:120px;max-height:430px;flex:1;padding:20px;scrollbar-gutter:stable}.onto-thread-message{display:flex;flex-direction:column;align-items:flex-start;margin:0 0 17px}.onto-thread-message.is-mine{align-items:flex-end}.onto-thread-bubble{white-space:pre-wrap;overflow-wrap:anywhere;max-width:86%;padding:12px 16px;border-radius:15px 15px 15px 4px;background:#f1f1f1;line-height:1.5;margin:0}.onto-thread-message.is-mine .onto-thread-bubble{background:#b6233d;color:#fff;border-radius:15px 15px 4px 15px}.onto-thread-message-meta{display:flex;gap:8px;margin:6px 4px 0;color:#777;font-size:.8rem}.onto-thread-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:15px 18px;border-top:1px solid #eee;background:#fff}.onto-thread-composer textarea{width:100%;min-height:58px;max-height:150px;resize:vertical;min-width:0;font-size:1rem;line-height:1.4;padding:12px;border:1px solid #ddd;border-radius:10px}.onto-thread-composer button{align-self:end;min-height:48px}.onto-thread-send-error{grid-column:1/-1;color:#a32235;font-size:.9rem;margin:0}.onto-thread-send-error:empty{display:none}.onto-thread-blocked{margin:0;padding:12px 18px;background:#fff1db;font-size:.9rem}.onto-other-enquiries{margin-top:18px;font-size:.9rem;color:#666}.onto-other-enquiries summary{cursor:pointer;padding:12px 0;min-height:44px}.onto-conversation-empty{padding:20px;color:#666;line-height:1.6}.onto-messages button:focus-visible,.onto-messages a:focus-visible,.onto-messages textarea:focus-visible,.onto-thread-history:focus-visible{outline:3px solid #2e6eb5;outline-offset:2px}
@media(max-width:760px){.onto-messages{padding-top:10px}.onto-messages-layout{display:block;min-height:380px}.onto-conversations{border-right:0;max-height:none}.onto-thread-empty{display:none}.onto-messages-layout:has(.onto-thread:not([hidden])) .onto-conversations{display:none}.onto-thread{min-height:460px;max-height:min(760px,calc(100dvh - 160px))}.onto-thread-back{display:inline-flex;min-height:44px;font-size:.9rem;padding:8px 11px}.onto-thread-heading{padding:11px 14px;gap:10px;min-height:65px;flex-wrap:wrap}.onto-thread-heading h2{font-size:1.1rem}.onto-thread-property{padding:10px}.onto-thread-history{padding:15px 12px;max-height:none}.onto-thread-composer{padding:12px;gap:8px}.onto-thread-composer button{padding-left:14px;padding-right:14px}.onto-thread-bubble{max-width:92%}.onto-conversation-row{padding:18px}.onto-messages-top h1{font-size:1.8rem}.onto-other-enquiries{margin-top:12px}}
@media(prefers-reduced-motion:reduce){.onto-thread-history,.onto-conversations{scroll-behavior:auto}}

.onto-contact-message-error{color:#a32235;font-size:.95rem;line-height:1.5;margin-top:12px}.onto-contact-message-error:empty{display:none}

/* Reserve the same space for the navigation as focus moves between typing
   and sending. Only the message history needs to scroll in a phone thread. */
@media (max-width: 760px) {
  body:has(#workspace-view:not([hidden]) .onto-messages.has-thread) {
    overflow: hidden;
  }
  body:has(#workspace-view:not([hidden]) .onto-messages.has-thread) :is(#ai-launcher, #back-to-top) {
    display: none;
  }
  .onto-messages.has-thread {
    position: fixed;
    inset-inline: 0;
    top: var(--onto-chat-top, var(--onto-visible-header-height, 72px));
    height: var(--onto-chat-height, calc(100dvh - var(--onto-visible-header-height, 72px) - 73px - env(safe-area-inset-bottom, 0px)));
    z-index: 21;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    background: #fff;
  }
  .onto-messages.has-thread .onto-messages-top {
    flex: none;
    margin: 0;
    padding: 5px 14px;
    border-bottom: 1px solid #eee;
  }
  .onto-messages.has-thread .onto-messages-top h1 { font-size: 1.125rem; }
  .onto-messages.has-thread .onto-messages-top .eyebrow,
  .onto-messages.has-thread .onto-other-enquiries { display: none; }
  .onto-messages.has-thread .onto-messages-error:not(:empty) {
    max-height: 6rem;
    margin: 0;
    overflow-y: auto;
  }
  .onto-messages.has-thread .onto-messages-layout {
    flex: 1 1 0;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }
  .onto-messages.has-thread .onto-thread {
    height: 100%;
    min-height: 0;
    max-height: none;
  }
  .onto-messages.has-thread .onto-thread-heading,
  .onto-messages.has-thread .onto-thread-property,
  .onto-messages.has-thread .onto-thread-composer,
  .onto-messages.has-thread .onto-thread-blocked { flex: none; }
  .onto-messages.has-thread .onto-thread-history {
    flex: 1 1 0;
    min-height: 0;
    scrollbar-gutter: auto;
    overflow-anchor: none;
  }
  .onto-messages.has-thread .onto-thread-composer {
    padding: 8px 12px;
    align-items: end;
  }
  .onto-messages.has-thread .onto-thread-composer textarea {
    min-height: 48px;
    max-height: 100px;
    resize: none;
  }
  .onto-messages.has-thread.thread-compact .onto-messages-top { display: none; }
  .onto-messages.has-thread.thread-compact .onto-thread-heading {
    min-height: 48px;
    padding: 2px 10px;
    flex-wrap: nowrap;
  }
  .onto-messages.has-thread.thread-compact .onto-thread-heading h2,
  .onto-messages.has-thread.thread-compact .onto-conversation-property strong,
  .onto-messages.has-thread.thread-compact .onto-conversation-property span span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .onto-messages.has-thread.thread-compact .onto-thread-property { padding: 2px 10px; }
  .onto-messages.has-thread.thread-compact .onto-conversation-property {
    min-height: 44px;
    padding: 4px 8px;
  }
  .onto-messages.has-thread.thread-compact .onto-conversation-property img { width: 42px; height: 38px; }
  .onto-messages.has-thread.thread-compact .onto-conversation-property span span { margin: 0; }
  .onto-messages.has-thread.thread-short .onto-thread-property { display: none; }
}

@media (max-width: 680px) {
  body:not(.modal-open):has(#workspace-view:not([hidden]) .onto-messages.has-thread) .mobile-dock {
    display: grid;
  }
}

.onto-inbox-intro {
  max-width: 42rem;
  margin: clamp(1.5rem, 5vw, 4rem) auto;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid #e3dfe0;
  border-radius: 14px;
  background: white;
}
.onto-inbox-intro h1 { margin: 0 0 .6rem; }
.onto-inbox-intro p { margin: 0 0 1.25rem; line-height: 1.55; }
.onto-inbox-intro .form-actions { flex-wrap: wrap; gap: .6rem; }
.onto-inbox-intro button { min-height: 44px; }
.onto-conversation-empty p { margin: 0 0 .5rem; }
.onto-conversation-empty a { display: inline-flex; align-items: center; min-height: 44px; }
