/* ============================================================================
   static/css/contact.css
   Shared contact UI — used by the public contact page and the Help Center
   Contact tab. Follows base.css design tokens exactly.
   ========================================================================== */

.contact-wrap {
  padding: clamp(12px, 3vw, 24px);
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.ct-hero {
  background: var(--color-primary);
  border-radius: var(--radius-xl);
  padding: clamp(20px, 3vw, 28px);
  color: #fff;
  box-shadow: var(--shadow-2);
  margin-bottom: 22px;
}

.ct-hero__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
  margin-bottom: 10px;
}

.ct-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(20px, 2.8vw, 27px);
  font-weight: 800;
  line-height: 1.22;
  color: #fff;
}

.ct-hero p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .75);
  max-width: 62ch;
}

/* ── Section headings ─────────────────────────────────────────────────────── */
.ct-sec {
  margin-top: 26px;
}

.ct-sec:first-of-type {
  margin-top: 0;
}

.ct-sec__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 4px;
}

.ct-sec__desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--color-text-dim);
  margin: 0 0 14px;
}

/* ── Primary contact (highlighted) ────────────────────────────────────────── */
.ct-primary {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: var(--color-bg);
  border: 1px solid rgba(6, 15, 33, .14);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

/* Accent rail marks this as the first point of contact. */
.ct-primary::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--color-primary);
}

.ct-primary__avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--color-primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
  flex-shrink: 0;
}

.ct-primary__body {
  min-width: 0;
  flex: 1 1 auto;
}

.ct-primary__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(6, 15, 33, .07);
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ct-primary__name {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.3;
}

.ct-primary__role {
  margin: 2px 0 10px;
  font-size: 13px;
  color: var(--color-text-dim);
  line-height: 1.5;
}

.ct-primary__mail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
  transition: opacity var(--transition-fast);
}

.ct-primary__mail:hover { opacity: .88; }
.ct-primary__mail:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.ct-primary__mail svg { width: 15px; height: 15px; flex-shrink: 0; }
.ct-primary__mail span { overflow-wrap: anywhere; }

/* ── Mail row + copy button ───────────────────────────────────────────────── */
.ct-mail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ct-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.ct-copy-btn svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: currentColor;
}

.ct-copy-btn svg + svg {
  display: none;
  position: absolute;
}

.ct-copy-btn:hover { background: #1c2b4d; }
.ct-copy-btn:active { transform: scale(.94); }

.ct-copy-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.ct-copy-btn.is-copied {
  background: #16a34a;
}

.ct-copy-btn.is-copied svg:first-child { display: none; }
.ct-copy-btn.is-copied svg.ct-copy-btn__check {
  display: block;
  position: static;
}

.ct-copy-btn--primary {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

/* ── Secondary contacts ───────────────────────────────────────────────────── */
.ct-secondary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.ct-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--color-bg);
  border: 1px solid #edf0f6;
  border-radius: var(--radius-lg);
  box-shadow: var(--ring);
  transition: box-shadow var(--transition-fast);
  min-width: 0;
}

.ct-card:hover { box-shadow: var(--shadow-1); }

.ct-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #eceff6;
  color: var(--color-secondary);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.ct-card__body { min-width: 0; }

.ct-card__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.35;
}

.ct-card__role {
  font-size: 12px;
  color: var(--color-text-dim);
  margin-top: 1px;
  line-height: 1.4;
}

.ct-card__mail {
  display: inline-block;
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--color-primary);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.ct-card__mail:hover { text-decoration: underline; }

/* ── Callout (login / access issues) ──────────────────────────────────────── */
.ct-callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: #fffaf0;
  border: 1px solid #f4dfb4;
  margin-bottom: 24px;
}

.ct-callout__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f6a623;
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ct-callout__icon svg { width: 18px; height: 18px; }

.ct-callout__body { min-width: 0; }

.ct-callout__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 800;
  color: #7a4a06;
}

.ct-callout__text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #855c1b;
}

.ct-callout__text a {
  color: #7a4a06;
  font-weight: 700;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

/* ── "What to include" table ──────────────────────────────────────────────── */
.ct-table-wrap {
  border: 1px solid #edf0f6;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  background: var(--color-bg);
  box-shadow: var(--ring);
}

.ct-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 420px;
}

.ct-table th,
.ct-table td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid #edf0f6;
  line-height: 1.55;
  vertical-align: top;
}

.ct-table thead th {
  background: rgba(6, 15, 33, .03);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--color-text);
  white-space: nowrap;
}

.ct-table tbody tr:last-child th,
.ct-table tbody tr:last-child td { border-bottom: 0; }

.ct-table td:first-child {
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

/* ── Public page shell (anonymous / logged-out view) ──────────────────────── */
.ct-public {
  min-height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px) clamp(12px, 3vw, 24px);
}

.ct-public .contact-wrap { padding: 0; }

.ct-public__back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity var(--transition-fast);
}

.ct-public__back:hover { opacity: .88; }
.ct-public__back svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .ct-primary {
    flex-direction: column;
    gap: 14px;
  }

  .ct-mail-row { width: 100%; }

  .ct-primary .ct-primary__mail {
    flex: 1 1 auto;
    justify-content: center;
  }

  .ct-secondary-grid { grid-template-columns: 1fr; }
}
