/* Questions from someone's agent, handles and their inbox. Built on app.css: a question is a room
   with one conversation in it, and the inbox is the home page's list of conversations. */

body.in-room {
  overflow: hidden;
}

.ask-room .bar .stone {
  margin-left: 0.15rem;
}

.ask-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.ask-images figure {
  display: grid;
  gap: 0.3rem;
  margin: 0;
}

.ask-images img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ground);
  cursor: zoom-in;
  max-height: 13rem;
  object-fit: contain;
}

.ask-images figcaption {
  color: var(--muted);
  font-size: var(--small);
  text-align: center;
}

.ask-offer {
  list-style: none;
}

.claim-form {
  display: grid;
  gap: 0.6rem;
}

.handle-field {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--ground);
}

.handle-field:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.handle-field span {
  padding-left: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

.handle-field input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.85rem 0.7rem 0;
  border: 0;
  background: none;
  font-weight: 600;
}

.handle-field input:focus {
  outline: none;
}

.field {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--ground);
}

.ask-home .field,
.ask-home .handle-field {
  background: var(--card);
}

.claim-form input::placeholder {
  color: color-mix(in srgb, var(--muted) 75%, transparent);
  font-weight: 400;
}

.handle-state {
  min-height: 1.2em;
  color: var(--muted);
  font-size: var(--small);
}

.handle-state.free {
  color: var(--accent);
}

.handle-state.taken {
  color: var(--red);
}

.button.wide {
  width: 100%;
  margin-top: 1.25rem;
}

.share-lines {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.section-title {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: var(--small);
  font-weight: 600;
}

.copy-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.copy-line code {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  background: var(--card);
  overflow-wrap: anywhere;
}

.needs .request {
  display: grid;
  gap: 0.25rem;
}

.request-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding-left: 3.4rem;
}

.request-actions .hint {
  flex: 1;
}

.room-row.unread .room-name {
  font-weight: 700;
}

.ask-home > .text-button {
  margin-top: 1.5rem;
}

.ask-foot {
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.zoom {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: color-mix(in srgb, var(--ink) 85%, transparent);
  cursor: zoom-out;
}

.zoom img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
}

.ask-home .intro {
  padding-top: 2.5rem;
  margin-bottom: 1.25rem;
}

.home.narrow.ask-home h1 {
  margin-top: 0;
}

.ask-home .lede {
  margin-top: 0.5rem;
}

/* ------------------------------------------------------------ the question as a conversation */

.ask-room .byline {
  cursor: default;
}

.pippin-mark {
  width: 24px;
  height: 24px;
}

.msg .ask-images {
  width: min(100%, 30rem);
  margin-top: 0.25rem;
}

/* Its answers, as quick replies just above where you type. */
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  width: min(100%, calc(var(--column) + 2 * var(--gutter)));
  margin: 0 auto;
  padding: 0.25rem var(--gutter) 0;
}

.quick-replies .button {
  min-width: 4.5rem;
}

/* Claiming a handle, inside Pippin's message. */
.msg .claim-form {
  margin-top: 0.75rem;
  max-width: 26rem;
}

.claim-form.compact {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.claim-form.compact .handle-state {
  grid-column: 1 / -1;
  grid-row: 2;
}

.msg .handle-field {
  background: var(--card);
}

.msg .body:has(.ask-images) {
  width: min(100%, 30rem);
  white-space: normal;
}

.msg .body:has(.claim-form) {
  white-space: normal;
}

/* /connect */
.connect-page .connect-steps {
  margin-top: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.connect-page details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 1rem;
}

.connect-page summary {
  font-weight: 600;
  cursor: pointer;
}

.connect-page details p,
.connect-page details .command {
  margin-top: 0.6rem;
}

.connect-page details .command code {
  font-size: var(--small);
}

.connect-page .plain-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-left: 1.1rem;
}

.text-button.inline {
  min-height: 0;
  padding: 0;
  font-size: inherit;
  color: var(--ink);
  text-decoration: underline;
}
