/* views.css — page frame, inset grouped lists, rows, and each view's extras. */

.main { min-height: calc(100vh - var(--nav-h)); }
.view-in .page { animation: fadeUp .4s var(--ease-out) both; }
.page { max-width: 980px; margin: 0 auto; padding: 32px 24px 64px; position: relative; }
.page--narrow { max-width: 720px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.large-title { font-size: 34px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.12; }
.head-actions { display: flex; gap: 8px; }
.section-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin: 30px 0 10px; }
.section-empty { margin-top: -2px; }
.foot-note { font-size: 13px; color: var(--label-3); text-align: center; max-width: 440px; margin: 4px auto 0; }

/* ── Inset grouped list ────────────────────────────────────────────── */
.list {
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 18px;
}
.row {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; cursor: pointer; transition: background .12s;
}
.row + .row::before {   /* hairline inset past the disc, like iOS */
  content: ''; position: absolute; top: 0; right: 0; left: 68px; border-top: 1px solid var(--border-2);
}
.row:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.row--static { cursor: default; }
.row--static:hover { background: none; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-tail { display: flex; align-items: center; gap: 8px; color: var(--label-3); flex-shrink: 0; }
.chev { display: flex; }
.chev svg, .back svg { width: 14px; height: 14px; }
.row.is-sent .row-title { color: var(--label-2); }

/* A jersey number where Contacts puts a photo. */
.disc {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #a1a1a6, #8e8e93); color: #fff;
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.disc--lg { width: 64px; height: 64px; font-size: 24px; }
.row.is-sent .disc { opacity: .55; }

.kind { display: flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; }
.kind svg { width: 15px; height: 15px; }
.kind--text { background: var(--accent-light); color: var(--accent); }
.kind--video { background: rgba(255, 45, 85, .12); color: #ff2d55; }
.done { display: flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; background: var(--green-fill); color: #fff; }
.done svg { width: 15px; height: 15px; stroke-width: 2.6; }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--r-full); font-size: 12px; font-weight: 600; background: var(--accent-light); color: var(--accent); }
.pill svg { width: 13px; height: 13px; stroke-width: 2.4; }
.pill--muted { background: var(--surface-3); color: var(--label-2); }
.pill--sent { background: var(--green-light); color: var(--green); }

/* ── Today: the progress ring (Activity-style) ─────────────────────── */
.tally { display: flex; align-items: center; gap: 12px; }
.tally div { display: flex; flex-direction: column; line-height: 1.25; }
.tally b { font-size: 17px; }
.tally span { font-size: 13px; color: var(--label-2); }
.ring { width: 48px; height: 48px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring-track { stroke: var(--surface-3); }
.ring-fill { stroke: var(--accent-fill); stroke-linecap: round; transition: stroke-dashoffset .6s var(--ease-out); }
.tally.is-done .ring-fill { stroke: var(--green-fill); }

/* ── Player ────────────────────────────────────────────────────────── */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 500; margin-bottom: 16px; }
.back:hover { opacity: .75; }
.player-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.player-id { flex: 1; min-width: 0; }
.player-name { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.note {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 12px 16px;
  border-radius: var(--r-md); background: var(--surface-3); color: var(--label-2); font-size: 14px;
}
.note svg { width: 18px; height: 18px; flex-shrink: 0; }

.compose { padding: 18px 20px 16px; }
.compose--add { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.compose-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

/* Text / Video: an iOS segmented control. */
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--surface-3); }
.seg button {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border: none; border-radius: 7px;
  background: none; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--label-2);
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg button svg { width: 14px; height: 14px; }
.seg button.is-on { background: var(--surface); color: var(--label); box-shadow: var(--shadow-sm); }
.seg button:disabled { opacity: .4; cursor: default; }

/* The message as Messages shows an outgoing bubble: right-aligned, blue, with a tail. */
.thread { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding: 6px 2px 4px; }
.bubble {
  position: relative; max-width: 86%; padding: 9px 14px; border-radius: 19px;
  background: var(--accent-fill); color: #fff; font-size: 16px; line-height: 1.38;
  white-space: pre-wrap; overflow-wrap: anywhere; animation: scaleIn .3s var(--spring) both; transform-origin: bottom right;
}
.bubble::before, .bubble::after { content: ''; position: absolute; bottom: 0; height: 20px; }
.bubble::before { right: -7px; width: 20px; background: var(--accent-fill); border-bottom-left-radius: 16px 14px; }
.bubble::after { right: -10px; width: 10px; background: var(--surface); border-bottom-left-radius: 10px; }   /* the card behind cuts the tail */
.bubble-edit {
  width: 86%; min-height: 96px; resize: none; outline: none; padding: 10px 14px; border-radius: 19px;
  border: 1.5px solid var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-light);
  font-size: 16px; line-height: 1.38; color: var(--label);
}
.linkcard {
  display: flex; align-items: center; gap: 12px; width: 86%; padding: 10px 14px 10px 10px;
  border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border-2);
  transition: background .15s, transform .1s;
}
.linkcard:hover { background: var(--surface-3); }
.linkcard:active { transform: scale(.99); }
.linkcard-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.linkcard-main small { font-size: 13px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linkcard-open { color: var(--label-3); display: flex; }
.linkcard-open svg { width: 17px; height: 17px; }
.ltile { width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; }
.ltile svg { width: 22px; height: 22px; }
.ltile--instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.ltile--tiktok { background: #111; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }

.compose-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-2); flex-wrap: wrap; }
.compose-actions .spacer { flex: 1; }
.icon-btn.is-on { background: var(--accent-light); color: var(--accent); }

/* History: date and sender over the words, newest first. */
.hist { padding: 14px 16px; }
.hist + .hist { border-top: 1px solid var(--border-2); }
.hist-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 4px; }
.hist-date { font-weight: 600; }
.hist-who { color: var(--label-3); }
.hist-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--label); }
.hist-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; color: var(--accent); max-width: 100%; }
.hist-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.hist-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Roster ────────────────────────────────────────────────────────── */
.search--page { margin-bottom: 4px; }
.search--page input { background: var(--surface-3); }

/* ── Empty states ──────────────────────────────────────────────────── */
.empty { text-align: center; padding: 56px 28px; display: flex; flex-direction: column; align-items: center; }
.empty-ic {
  width: 64px; height: 64px; border-radius: 18px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-light); color: var(--accent);
}
.empty-ic svg { width: 30px; height: 30px; }
.empty-title { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.empty-body { color: var(--label-2); max-width: 380px; margin: 6px 0 22px; }
