/* Everything that is about the two people. */

.avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
}

.avatar.first { background: #3478d4; }
.avatar.second { background: #9457c9; }
.avatar.big { width: 78px; height: 78px; border: 3px solid var(--surface); font-size: 32px; }

.pair {
  display: flex;
  align-items: center;
  gap: 6px 12px;
  min-width: 0;
  margin-top: 11px;
}

.pair:empty { display: none; }

.person {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.avatar-wrap { position: relative; flex: none; }

.avatar-mark {
  position: absolute;
  right: -5px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: #8d939c;
  color: #fff;
}

.avatar-mark .icon { width: 9px; height: 9px; stroke-width: 3; }
.avatar-mark.is-like { background: #f0435c; }
.avatar-mark.is-like .icon { fill: currentColor; }
.avatar-mark.is-dislike { background: #55585f; }
.avatar-mark.is-dislike .icon { fill: currentColor; }

.person-label {
  min-width: 34px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person.is-none .person-label { color: var(--muted); }

.match-tag {
  flex: none;
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 8px;
  background: #f0435c;
  color: #fff;
  font-size: 11px;
  font-weight: 750;
}

.plan-chip {
  display: inline-block;
  max-width: 100%;
  margin-top: 8px;
  padding: 4px 9px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--fill);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-chip.stage-viewing { background: rgba(52, 120, 212, .16); color: var(--link); }
.plan-chip.stage-chosen { background: var(--yes-bg); color: var(--yes); }
.plan-chip.stage-rejected { color: var(--muted); text-decoration: line-through; }

.button.small { min-height: 42px; padding: 0 14px; font-size: 14px; }

.send-row { display: flex; gap: 8px; margin-top: 12px; }

.send-row .button {
  flex: 1 1 0;
  gap: 6px;
  min-width: 0;
  padding: 0 8px;
  font-size: 13px;
}

.share-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 359px) {
  .send-row { flex-direction: column; }
  .send-row .button { flex: none; width: 100%; }
}

/* Likes */

.like-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 4px 12px 10px;
}

.like-tabs.solo { grid-template-columns: minmax(0, 1fr); }

.like-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 50px;
  padding: 0 12px;
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
}

.like-tab .avatar { width: 25px; height: 25px; font-size: 12px; }

.like-tab-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.like-tab b { flex: none; color: var(--muted); font-size: 14px; }

.like-tab.attention b {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 11px;
  background: #f0435c;
  color: #fff;
  text-align: center;
}

.like-tab[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.like-tab[aria-pressed="true"]:not(.attention) b { color: inherit; }

.hidden-link {
  flex: none;
  min-height: 40px;
  color: var(--link);
  font-size: 14px;
  font-weight: 600;
}

.invite {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 12px 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface);
}

.invite-text { flex: 1; min-width: 0; font-size: 15px; }
.invite-text p { margin-top: 3px; color: var(--muted); font-size: 12px; }

.likes-tools { padding-bottom: 8px; }
.likes-tools .compare-toggle { color: var(--link); }
.view.comparing .list { padding-bottom: 84px; }

.compare-pick {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  padding: 0 10px;
  border-radius: 11px;
  background: var(--fill);
  font-size: 14px;
  font-weight: 600;
}

.pick-box {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid var(--muted);
  border-radius: 7px;
  color: transparent;
}

.pick-box .icon { width: 14px; height: 14px; stroke-width: 3; }
.compare-pick[aria-pressed="true"] .pick-box { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }

.compare-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bar);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

/* Plans */

.plan-group h2 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 4px 8px;
  font-size: 16px;
}

.plan-group h2 span { color: var(--muted); font-weight: 500; }
.plan-group .mini-card { margin-bottom: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.mini-card .pair { margin: 0; padding: 8px 12px 10px; }

.mini-gone {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(30, 30, 34, .82);
  color: #fff;
  font-size: 11px;
}

.plan-footer {
  padding: 8px 12px 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.plan-when { color: var(--link); }

.plan-footer p {
  display: -webkit-box;
  margin-top: 2px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.viewing { margin-top: 12px; }
.viewing-row { display: flex; gap: 8px; }

.time-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 9px;
  border: 0;
  border-radius: 12px;
  background: var(--fill);
  font-size: 16px;
  appearance: none;
  -webkit-appearance: none;
}

.plan-editor .plan-note { margin-top: 9px; }
.plan-editor .choice:disabled { opacity: .6; }

/* Notes */

.notes:not(:empty) { margin-bottom: 12px; }
.note { display: flex; align-items: flex-start; gap: 9px; padding: 8px 0; }
.note + .note { border-top: 1px solid var(--line); }
.note-body { flex: 1; min-width: 0; }

.note-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 7px;
  min-width: 0;
  font-size: 12px;
}

.note-head b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-head time { color: var(--muted); }

.note-body p {
  margin-top: 2px;
  font-size: 15px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  user-select: text;
}

.note-delete { width: 34px; height: 34px; }
.note-delete .icon { width: 15px; height: 15px; }
.note-form { display: flex; flex-direction: column; gap: 8px; }

.note-input {
  width: 100%;
  min-height: 66px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: var(--fill);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  resize: vertical;
}

.note-input::placeholder { color: var(--muted); }
.note-form .button { align-self: flex-end; }
.note-form .button:disabled { opacity: .45; }

/* Compare */

.compare-header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 8px) 12px 8px 16px;
}

.compare-header h2 { font-size: 22px; }

.compare-body {
  flex: 1;
  min-height: 0;
  padding-bottom: var(--safe-bottom);
  overflow: auto;
  overscroll-behavior: contain;
}

.compare-bone { height: 360px; margin: 12px; }

.compare-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  font-size: 13px;
  table-layout: fixed;
}

.compare-table th,
.compare-table td {
  width: 138px;
  max-width: 138px;
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.compare-table thead th,
.compare-table thead td { position: sticky; top: 0; z-index: 2; vertical-align: top; }

.compare-table tr > :first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 112px;
  min-width: 112px;
  max-width: 112px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.compare-table thead .corner { z-index: 3; }
.compare-table td.best { color: var(--yes); box-shadow: inset 0 0 0 100px var(--yes-bg); }
.compare-table td small { display: block; color: var(--muted); }
.compare-table td b { font-size: 16px; }

.compare-table .compare-section th {
  width: auto;
  max-width: none;
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
}

.compare-table .compare-section th span { position: sticky; left: 8px; }
.compare-table .pair { flex-direction: column; align-items: flex-start; margin: 0; }
.compare-table .person { max-width: 100%; }
.compare-table .match-tag { margin: 0; }
.compare-table .plan-chip { margin: 0; white-space: normal; }

.compare-head { display: block; width: 100%; text-align: left; }

.compare-photo {
  display: grid;
  place-items: center;
  height: 82px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--fill);
}

.compare-photo img { width: 100%; height: 82px; object-fit: cover; }

.compare-address {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compare-state { display: flex; align-items: center; gap: 5px; color: var(--state); }
.compare-state .state-icon { width: 21px; height: 21px; }
.compare-state .state-icon .icon { width: 12px; height: 12px; }

/* Match */

.match-layer { display: flex; align-items: center; justify-content: center; }

.match-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: calc(100% - 48px);
  max-width: 360px;
  padding: 28px 20px 18px;
  border-radius: 24px;
  background: var(--surface);
  text-align: center;
  animation: match-in .4s cubic-bezier(.2, .8, .3, 1.2);
}

.match-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.match-heart {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin: 0 -10px;
  border-radius: 50%;
  background: #f0435c;
  color: #fff;
  animation: pop .6s .25s;
}

.match-heart .icon { width: 28px; height: 28px; fill: currentColor; }
.match-card h2 { color: #f0435c; font-size: 32px; }
.match-who { overflow-wrap: anywhere; }
.match-card .button { margin-top: 4px; }

.spark {
  position: absolute;
  top: 50%;
  left: 50%;
  color: #f0435c;
  opacity: 0;
  pointer-events: none;
  animation: spark 1.1s .15s ease-out;
}

.spark .icon { width: 18px; height: 18px; fill: currentColor; }
.match-layer.leaving { animation: fade-out .18s forwards; }

@keyframes match-in { from { transform: scale(.7); opacity: 0; } }

@keyframes spark {
  from { transform: translate(-50%, -50%); opacity: 1; }
  to { transform: translate(var(--x), var(--y)); opacity: 0; }
}

/* Notification filter ("Уведомления") */

.header-actions { display: flex; flex: none; gap: 8px; }

.notify-intro {
  margin: 4px 4px 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.notify .choices + .number-pair,
.notify .number-pair + .choices { margin-top: 10px; }
.notify .section-note.after { margin: 8px 0 0; }

.notify-hint { margin-top: 8px; color: var(--no); font-size: 13px; }
.notify-hint:empty { display: none; }

.notify-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 15px;
}

.notify-row + .notify-row { border-top: 1px solid var(--line); }
.notify-row span { flex: none; color: var(--muted); }
.notify-row b { min-width: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
