/* Synced web app: Konuştum tick, talk filter, stage, research, photos and pairing; the desktop page from 900 px.
   Loaded after styles.css. */

/* Photo avatars */
.avatar {
  overflow: hidden;
}

.avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* List rows with the Konuştum checkbox next to the link */
.row-item {
  display: flex;
  align-items: stretch;
}

.row-item > .row {
  flex: 1;
  min-width: 0;
  padding-right: 4px;
}

.talk {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 4px;
  cursor: pointer;
}

.talk-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.talk-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid color-mix(in srgb, var(--muted) 55%, transparent);
  border-radius: 999px;
  color: transparent;
  transition: background-color 0.15s, border-color 0.15s;
}

.talk-mark .icon {
  stroke-width: 3;
}

.talk-input:checked + .talk-mark {
  border-color: var(--done);
  background: var(--done);
  color: var(--card);
}

.talk-input:focus-visible + .talk-mark {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Read by screen readers on a phone, shown next to the box on a desktop. */
.talk-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.talk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 12px;
  margin: -2px 0 12px;
}

.talk-bar .chips {
  margin: 0;
}

.talk-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

/* Contact research */
.research {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.research p {
  margin: 0;
  overflow-wrap: anywhere;
}

.research-headline {
  font-weight: 600;
}

.research-summary {
  white-space: pre-line;
  line-height: 1.5;
}

/* Pairing card and sync status */
.pair-card {
  margin: 4px 0 8px;
}

.pair-card p,
.sync-card p {
  margin: 0;
}

.pair-title {
  margin: 0 0 2px;
  font-size: 17px;
  font-weight: 700;
}

.pair-card .inline-form {
  max-width: 440px;
  margin-bottom: 0;
}

.pair-code {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pair-code::placeholder {
  text-transform: none;
  letter-spacing: normal;
}

@media (prefers-reduced-motion: reduce) {
  .talk-mark {
    transition: none;
  }
}

/* Desktop: a centered page with a max width; the tab bar keeps to the same width. The form keeps its column. */
@media (min-width: 900px) {
  :root {
    --page: 1080px;
  }

  .view:not(.view-form) {
    max-width: var(--page);
    padding-left: 32px;
    padding-right: 32px;
  }

  .view:not(.view-form) > .topbar {
    margin: 0 -32px;
    padding-left: 32px;
    padding-right: 32px;
  }

  /* Same edges as the cards: the page minus its side padding. */
  .tabbar {
    left: 32px;
    right: 32px;
    max-width: calc(var(--page) - 64px);
    margin: 0 auto;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
  }

  .chips-scroll {
    flex-wrap: wrap;
    overflow-x: visible;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
  }

  .talk {
    padding: 0 16px 0 8px;
  }

  .talk-text {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
  }

  .talk-input:checked ~ .talk-text {
    color: var(--done);
  }

  .contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    gap: 0 40px;
    align-items: start;
  }

  .contact-main > :first-child {
    margin-top: 6px;
  }

  /* Margins at a column break are dropped, so sections space with padding and both columns start level. */
  .settings-grid {
    column-count: 2;
    column-gap: 32px;
    margin-top: 22px;
  }

  .settings-grid > .section {
    break-inside: avoid;
    margin: 0;
    padding-bottom: 22px;
  }
}

@media (min-width: 900px) and (hover: hover) {
  .row:hover {
    background: color-mix(in srgb, var(--chip) 55%, transparent);
  }

  .talk:hover .talk-mark {
    border-color: var(--done);
  }
}
