/* =========================================================
   dumaguete.uk — connections.css
   Meeting people. The design job here is trust: who someone
   is, how to reach them, and how to report them, all visible
   without a second click.
   ========================================================= */

.cn-head { margin-bottom: 18px; }
.cn-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.02em;
}
.cn-lede {
  margin: 0;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------- Gate: signed out, or not joined ---------- */
.cn-gate {
  margin: 18px 0 26px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-alt);
}
.cn-gate__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.1rem;
}
.cn-gate p { margin: 0 0 10px; color: var(--ink-soft); }
.cn-gate__consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.88rem;
  line-height: 1.5;
}
.cn-gate__consent input { margin-top: 3px; flex: 0 0 auto; }
.cn-gate__fields { display: grid; gap: 10px; margin: 12px 0; }
.cn-gate__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Filters ---------- */
.cn-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.cn-input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
}
.cn-input--grow { flex: 1 1 200px; min-width: 0; }
.cn-count { margin-left: auto; font-size: 0.8rem; color: var(--ink-faint); }

/* ---------- People ---------- */
.cn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.cn-card {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.cn-card__top { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.cn-ava {
  width: 46px; height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--ink-soft);
  overflow: hidden;
}
.cn-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cn-card__id { min-width: 0; }
.cn-card__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.cn-card__name a { color: inherit; text-decoration: none; }
.cn-card__name a:hover { color: var(--accent); }
.cn-gender {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  white-space: nowrap;
}
.cn-gender--f { border-color: color-mix(in srgb, #d6749b 55%, transparent); color: #b4517b; }
.cn-gender--m { border-color: color-mix(in srgb, #5b8dd6 55%, transparent); color: #3f6fb4; }
.cn-card__where { margin: 2px 0 0; font-size: 0.78rem; color: var(--ink-faint); }
.cn-card__intro {
  margin: 0 0 10px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink);
}
.cn-tag {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  font-size: 0.74rem;
  color: var(--ink-soft);
}
.cn-card__trust { margin: 0 0 12px; font-size: 0.75rem; color: var(--ink-faint); }

/* Message is the point of the card, so it gets the weight. */
.cn-card__actions { margin-top: auto; display: flex; gap: 8px; align-items: center; }
.cn-msg {
  flex: 1 1 auto;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.cn-msg:hover { background: var(--surface-alt); text-decoration: none; color: var(--ink); }
.cn-flag {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-faint);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.cn-flag:hover { color: #c0392b; border-color: color-mix(in srgb, #c0392b 45%, transparent); }

.cn-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--ink-faint);
  border: 1px dashed var(--line);
  border-radius: 12px;
}

/* ---------- Rules ---------- */
.cn-rules {
  margin-top: 34px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-alt) 30%, transparent);
  columns: 2;
  column-gap: 24px;
  column-fill: balance;
}
.cn-rules__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 11px;
  color: #c0392b;
  break-after: avoid;
}
.cn-rules__lede { margin: 0 0 14px; color: var(--ink-soft); max-width: 66ch; font-size: 11px; break-after: avoid; }
.cn-rules__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cn-rule {
  padding: 0;
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  break-inside: avoid;
}
.cn-rule strong { color: var(--ink); }
.cn-rule span { color: var(--ink-faint); }
.cn-rule--grave strong { color: #c0392b; }
.cn-rules__foot { margin: 0; font-size: 11px; color: var(--ink-soft); }

/* ---------- Report dialog ---------- */
.cn-report { position: fixed; inset: 0; z-index: 400; }
.cn-report[hidden] { display: none; }
.cn-report__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}
.cn-report__panel {
  position: relative;
  margin: 6vh auto;
  max-width: 520px;
  width: calc(100% - 32px);
  max-height: 88vh;
  overflow: auto;
  padding: 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}
.cn-report__head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.cn-report__title { margin: 0; font-family: var(--font-display); font-size: 1.1rem; }
.cn-report__close {
  margin-left: auto;
  border: 0; background: transparent;
  font-size: 1.5rem; line-height: 1;
  color: var(--ink-faint); cursor: pointer;
}
.cn-report__who { margin: 0 0 12px; font-size: 0.86rem; color: var(--ink-soft); }
.cn-report__reasons { display: grid; gap: 6px; margin-bottom: 14px; }
.cn-reason {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.88rem;
}
.cn-reason:hover { background: var(--surface-alt); }
.cn-reason input { margin-top: 3px; flex: 0 0 auto; }
.cn-reason span small { display: block; color: var(--ink-faint); font-size: 0.76rem; margin-top: 1px; }
.cn-field { display: block; margin-bottom: 12px; }
.cn-field__label { display: block; margin-bottom: 5px; font-size: 0.82rem; color: var(--ink-soft); }
.cn-field__input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  resize: vertical;
}
.cn-report__note { margin: 0 0 14px; font-size: 0.78rem; color: var(--ink-faint); }
.cn-report__actions { display: flex; gap: 8px; justify-content: flex-end; }

@media (max-width: 560px) {
  .cn-grid { grid-template-columns: 1fr; }
  .cn-count { margin-left: 0; width: 100%; }
}

/* ---------- Section photos ---------- */
.cn-photos {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.cn-photo {
  position: relative;
  width: 64px; height: 64px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0;
}
.cn-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cn-photo__x {
  position: absolute;
  top: 2px; right: 2px;
  width: 18px; height: 18px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
}
.cn-photo--add {
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  color: var(--ink-faint);
  cursor: pointer;
  border-style: dashed;
}
.cn-photo--add:hover { color: var(--accent); border-color: var(--accent); }

.cn-card__photos {
  display: flex;
  gap: 6px;
  margin: 0 0 10px;
}
.cn-thumb {
  width: 46px; height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
}
.cn-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cn-thumb:hover { border-color: var(--accent); }

.cn-view {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0, 0, 0, 0.8);
  display: grid; place-items: center;
  cursor: zoom-out;
}
.cn-view img {
  max-width: 92vw; max-height: 90vh;
  border-radius: 10px;
}

/* ---------- Example cards ----------
   They fill the grid while the section is new. Muted, marked, and
   with no actions, so nobody mistakes one for a person to contact. */
.cn-card--example {
  position: relative;
  opacity: 0.72;
  border-style: dashed;
}
.cn-card--example .cn-ava { background: var(--surface-alt); color: var(--ink-soft); }
.cn-example {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.cn-empty--lead { margin-bottom: 4px; }

/* Example card is a doorway, so it has to look like one. */
.cn-card--example { cursor: pointer; transition: opacity 0.15s var(--ease), border-color 0.15s var(--ease); }
.cn-card--example:hover,
.cn-card--example:focus-visible { opacity: 1; border-color: var(--accent); }
.cn-msg--example {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 14px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink-soft);
  font: inherit; font-size: 0.9rem; font-weight: 600;
}

/* ---------- Example profile overlay ---------- */
.cn-ex { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cn-ex__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); }
.cn-ex__panel {
  position: relative; width: min(520px, 100%); max-height: 88vh; overflow-y: auto;
  padding: 22px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}
.cn-ex__x {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer;
  color: var(--ink-soft); background: var(--surface-alt);
  border: 1px solid var(--line); border-radius: 999px;
}
.cn-example--lg { position: static; display: inline-block; margin-bottom: 12px; }
.cn-ex__head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.cn-ava--lg { width: 62px; height: 62px; font-size: 1.5rem; }
.cn-ex__name { margin: 0; font-size: 1.3rem; }
.cn-ex__meta { margin: 2px 0 0; font-size: 0.86rem; color: var(--ink-soft); }
.cn-ex__trust { margin-bottom: 14px; }
.cn-ex__trustrow { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 5px; }
.cn-ex__bar { height: 7px; background: var(--surface-alt); border-radius: 999px; overflow: hidden; }
.cn-ex__bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.cn-ex__tier { margin: 6px 0 0; font-size: 0.8rem; color: var(--ink-soft); }
.cn-ex__intro { margin: 0 0 10px; }
.cn-ex__actions { margin-top: 16px; }
.cn-ex__msg { margin-top: 14px; padding: 14px; background: var(--surface-alt); border-radius: 10px; }
.cn-ex__note { margin: 0 0 12px; font-size: 0.82rem; color: var(--ink-soft); }
.cn-ex__bubble {
  padding: 10px 13px; background: var(--accent); color: var(--accent-ink);
  border-radius: 12px 12px 3px 12px; font-size: 0.9rem; margin-left: auto; max-width: 85%;
}
.cn-ex__pending { margin: 8px 0 0; font-size: 0.78rem; color: var(--ink-faint); text-align: right; }
.cn-ex__foot { margin: 18px 0 0; font-size: 0.86rem; color: var(--ink-soft); }
