/* Purpose: mmry.chat Weft-style thread — mobile first, Swiss tokens
   Last modified: 2026-09-09
   By: Cursor Grok 4.6
   Completeness: 90 */

body.swiss[data-product="chat"] .chat-thread {
  display: none;
  flex-direction: column;
  min-height: calc(100dvh - 68px - 56px);
}

body.swiss[data-product="chat"].chat-live .chat-marketing,
body.swiss[data-product="chat"].chat-live footer.shell {
  display: none;
}

body.swiss[data-product="chat"].chat-live .chat-thread {
  display: flex;
}

body.swiss[data-product="chat"] .chat-auth {
  display: none;
  padding: 24px 16px 32px;
  border-bottom: 1px solid var(--rule);
}

body.swiss[data-product="chat"].chat-anon .chat-auth {
  display: block;
}

.chat-auth h1,
.chat-auth h2 {
  font-size: 1.6rem;
  letter-spacing: -0.04em;
  margin: 8px 0 12px;
}
.chat-auth h1 em {
  font-style: italic;
  color: var(--feeling);
}
.chat-auth > p {
  color: var(--muted);
  max-width: 36rem;
}
.chat-auth form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  max-width: 22rem;
}
.chat-auth .auth-tabs {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  border-bottom: 1px solid var(--rule);
}
.chat-auth .auth-tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 8px 0;
  cursor: pointer;
}
.chat-auth .auth-tabs button.active {
  color: var(--feeling);
  border-bottom-color: var(--feeling);
}

.chat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--rule);
}
.chat-top small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chat-top nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chat-top a,
.chat-top button.linkish {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
.chat-top a:hover,
.chat-top button.linkish:hover {
  color: var(--feeling);
}

.chat-feed {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chat-lead {
  color: var(--muted);
  font-size: 14px;
  max-width: 36rem;
}
.chat-lead b {
  color: var(--ink);
  font-weight: 600;
}

.msg {
  max-width: 40rem;
}
.msg--you {
  margin-left: auto;
  text-align: right;
}
.msg--you p {
  display: inline-block;
  text-align: left;
  border: 1px solid var(--rule);
  padding: 10px 12px;
  margin: 0;
}
.msg--mmry {
  width: 100%;
}

.clip {
  border: 1px solid var(--rule);
  padding: 12px;
  background: var(--panel);
}
.clip--said {
  border: 0;
  background: transparent;
  padding: 0;
}
.clip--said .said {
  margin: 0;
  max-width: 36rem;
  font-size: 16px;
  line-height: 1.45;
}
.composer__pending:empty {
  display: none;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.clip__kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--feeling);
  margin: 0 0 6px;
}
.clip__line {
  margin: 0;
  font-size: 15px;
}
.clip__more {
  display: none;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
}
.clip.is-open .clip__more {
  display: block;
}
.clip-item {
  border-top: 1px solid var(--hair);
  padding: 10px 0 0;
  margin-top: 10px;
}
.clip-item small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}
.clip-item h3 {
  margin: 4px 0;
  font-size: 15px;
  font-weight: 600;
}
.clip-item p {
  margin: 0;
  color: var(--muted);
}

.acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
}
.act {
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
  min-height: 44px;
}
.act--primary {
  border-color: var(--feeling);
  color: var(--feeling);
}

.chat-composer {
  position: sticky;
  bottom: 0;
  padding: 10px 12px 16px;
  background: var(--paper);
  border-top: 1px solid var(--rule);
}
.composer__row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--rule);
  padding: 6px 6px 6px 8px;
}
.chat-composer:focus-within .composer__row {
  border-color: var(--feeling);
}
.composer__plus,
.composer__send {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
}
.composer__send {
  background: var(--feeling);
  color: var(--feeling-ink);
}
.composer__row input[type="text"] {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  outline: none;
  padding: 8px 0;
}
.composer__pending {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
  min-height: 1em;
}

.action-flyout {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.action-flyout.is-open {
  display: grid;
}
.action-flyout button {
  min-height: 44px;
  border: 1px solid var(--rule);
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13px;
}
.action-flyout button small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.chat-toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 96px;
  background: var(--panel);
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 10px 12px;
  display: none;
  z-index: 20;
}
.chat-toast.show {
  display: block;
}

.hidden {
  display: none !important;
}

@media (min-width: 880px) {
  body.swiss[data-product="chat"] .chat-thread {
    max-width: 52rem;
    margin: 0 auto;
    width: 100%;
  }
  .chat-auth {
    padding-left: 24px;
    padding-right: 24px;
  }
  .action-flyout {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .chat-feed {
    padding-left: 24px;
    padding-right: 24px;
  }
  .chat-composer {
    padding-left: 24px;
    padding-right: 24px;
  }
}
