/*
 * Propensio internal tools — the shared look.
 *
 * Taken from Call Retrieval (public/styles.css, October 2026), which matched it to
 * the MCS Installer Checker. Light only, by design. How to use it, with markup for
 * every component: README.md beside this file. Every component: example.html.
 *
 * Fonts: the five Montserrat files in fonts/ sit beside this file and are loaded
 * relative to it, so nothing is fetched from another site (works under a strict
 * Content-Security-Policy). Montserrat is under the SIL Open Font Licence (fonts/OFL.txt).
 */

@font-face { font-family: Montserrat; font-weight: 400; font-display: swap; src: url(fonts/montserrat-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 500; font-display: swap; src: url(fonts/montserrat-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 600; font-display: swap; src: url(fonts/montserrat-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 700; font-display: swap; src: url(fonts/montserrat-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 800; font-display: swap; src: url(fonts/montserrat-latin-800-normal.woff2) format('woff2'); }

/* ── Tokens ─────────────────────────────────────────────────────────────────
   The whole palette. Add no other colours: pick the role that fits. */
:root {
  --blue: #393C5A;        /* brand: header, headings, section titles */
  --blue-deep: #2a2d44;
  --cyan: #2AB8C3;        /* accent: the primary button, focus, header underline */
  --cyan-dark: #23a0ab;   /* accent hover; the required-field asterisk */
  --cyan-pale: #e8f7f8;   /* info tint; an opened table row */
  --green: #439D7F;
  --green-pale: #e8f5f1;
  --amber: #b45309;
  --amber-pale: #fef3c7;
  --red: #c0392b;
  --red-pale: #fdf0ee;
  --dark: #1e2033;        /* body text */
  --muted: #7b7f9e;       /* labels, hints, secondary text */
  --faint: #b0b4cc;       /* placeholders only */
  --border: #dde0ec;
  --bg: #f4f5f9;          /* page background; inputs at rest */
  --white: #ffffff;
  --row-tint: #fafbfd;    /* table header, row hover */

  --radius: 8px;          /* inputs, buttons */
  --radius-card: 14px;
  --radius-pill: 20px;    /* tags, the header badge */
  --shadow-card: 0 2px 16px #393c5a12;
  --focus-ring: 0 0 0 3px #2ab8c31f;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

body {
  font-family: Montserrat, system-ui, sans-serif;
  background: var(--bg);
  color: var(--dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--cyan-dark); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.header {
  background: var(--blue);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--cyan);
  min-height: 64px;
  gap: 16px;
}
.header-left, .header-right { display: flex; align-items: center; gap: 20px; }
.header-logo img { height: 28px; display: block; }
.header-divider { width: 1px; height: 28px; background: #fff3; }
.header-tool { font-size: 13px; font-weight: 600; color: #ffffffe6; letter-spacing: .3px; }
.header-user { font-size: 12px; font-weight: 500; color: #ffffffa6; }
.header-link { font-size: 12px; font-weight: 600; color: #ffffffd9; text-decoration: none; }
.header-link:hover, .header-link:focus-visible { color: #fff; text-decoration: underline; }
.header-badge {
  font-size: 10px; font-weight: 600; background: var(--cyan); color: #fff;
  padding: 3px 8px; border-radius: var(--radius-pill); letter-spacing: .5px; text-transform: uppercase; white-space: nowrap;
}

/* ── Page ─────────────────────────────────────────────────────────────────── */
.main { flex: 1; max-width: 1920px; margin: 0 auto; width: 100%; padding: 48px 24px; }
/* Forms and the title stay a comfortable width; a results table may take the full .main. */
.narrow { max-width: 1360px; margin-left: auto; margin-right: auto; }
/* A single small card on its own: sign-in, a confirmation. */
.narrow-sm { max-width: 440px; margin-left: auto; margin-right: auto; }

.hero { text-align: center; margin-bottom: 28px; }
.hero h1 { font-size: 30px; font-weight: 800; color: var(--blue); letter-spacing: -.8px; line-height: 1.2; margin-bottom: 10px; }
.hero h1 span { color: var(--cyan); }  /* the second word of the tool's name */
.hero p { font-size: 15px; color: var(--muted); max-width: 480px; margin: 0 auto; line-height: 1.6; }

.footer {
  text-align: center; padding: 20px 24px; font-size: 11px; color: var(--muted);
  border-top: 1px solid var(--border); line-height: 1.8;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--blue); margin-bottom: 14px; }

/* A heading that splits one card into parts ("Call", "Customer"). */
.section {
  font-size: 12px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .8px;
  margin: 22px 0 12px; padding-top: 18px; border-top: 1px solid var(--border);
}
.section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 14px; }
.filters.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.filters.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.filters.cols-1 { grid-template-columns: 1fr; }
.field-wide { grid-column: 1 / -1; }

.label {
  font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 8px; display: block;
  text-transform: uppercase; letter-spacing: .8px;
}
.req { color: var(--cyan-dark); font-weight: 700; }

.input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  font-size: 14px;
  color: var(--dark);
  background: var(--bg);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--cyan); box-shadow: var(--focus-ring); background: #fff; }
.input::placeholder { color: var(--faint); }
.input:disabled { opacity: .6; cursor: not-allowed; }
.input.invalid, .input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 3px #c0392b1f; }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { accent-color: var(--cyan); width: 16px; height: 16px; margin: 0; }

.hint { margin-top: 8px; font-size: 12px; color: var(--muted); }
.hint.error { color: var(--red); font-weight: 600; }

/* "More filters": a disclosure for the fields most people never need. */
.more { margin-top: 16px; }
.more summary {
  cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); list-style: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: '\25B8'; transition: transform .15s; }
.more[open] summary::before { transform: rotate(90deg); }
.more summary:hover { color: var(--blue); }
.more > .filters { margin-top: 12px; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.actions { display: flex; align-items: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.actions .hint { margin: 0 0 0 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 22px; background: var(--cyan); color: #fff; border: none; border-radius: var(--radius);
  font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .3px; cursor: pointer; text-decoration: none;
  transition: background .18s, transform .12s;
}
.btn:hover:not(:disabled) { background: var(--cyan-dark); color: #fff; transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-quiet { background: transparent; color: var(--muted); border: 1.5px solid var(--border); }
.btn-quiet:hover:not(:disabled) { background: var(--bg); color: var(--blue); }
.btn-danger { background: var(--red); }
.btn-danger:hover:not(:disabled) { background: #a93226; }
.btn-small { padding: 7px 12px; font-size: 12px; }
.btn-block { width: 100%; }

/* ── Notices ──────────────────────────────────────────────────────────────── */
.notice {
  padding: 12px 16px; border-radius: var(--radius); font-size: 13px; line-height: 1.5;
  border-left: 4px solid var(--cyan); background: var(--cyan-pale); color: var(--dark); margin-bottom: 16px;
}
.notice strong { font-weight: 700; }
.notice-success { border-left-color: var(--green); background: var(--green-pale); }
.notice-warning { border-left-color: var(--amber); background: var(--amber-pale); }
.notice-error   { border-left-color: var(--red);   background: var(--red-pale); }

/* ── Tags (status pills) ──────────────────────────────────────────────────── */
.tag {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 8px;
  border-radius: var(--radius-pill); white-space: nowrap;
}
.tag-success { background: var(--green-pale); color: var(--green); }   /* Call Retrieval: Sealed */
.tag-warning { background: var(--amber-pale); color: var(--amber); }   /* Archive */
.tag-info    { background: var(--cyan-pale);  color: var(--cyan-dark); } /* Sent */
.tag-neutral { background: var(--bg);         color: var(--muted); }   /* Not sent, — */
.tag-error   { background: var(--red-pale);   color: var(--red); }     /* Failed, Vulnerable */

/* ── Tables ───────────────────────────────────────────────────────────────── */
/* A card holding a table runs edge to edge: .card.results, then .results-head and .table-wrap. */
.results { padding: 0; overflow: hidden; }
.results-head { padding: 20px 24px 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.results-head h2 { font-size: 15px; font-weight: 700; color: var(--blue); }
.results-head .hint { margin: 0; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: .6px; padding: 10px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--row-tint); white-space: nowrap;
}
td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
td.wrap { white-space: normal; min-width: 120px; max-width: 260px; overflow-wrap: anywhere; }  /* long names */
tbody tr:hover td { background: var(--row-tint); }
.right { text-align: right; }
.mono { font-variant-numeric: tabular-nums; }   /* dates, times, numbers, IDs */
.sub { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }  /* a second line in a cell */
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.empty { padding: 28px 24px; text-align: center; color: var(--muted); font-size: 13px; }

/* A sortable column heading: <th><button class="sort">Date ▼</button></th> */
.sort {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit;
}
.sort:hover, .sort:focus-visible { color: var(--blue); }
.sort:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 3px; }

/* A row opened for detail: a full-width <tr class="panel"><td colspan="…"> under it. */
.panel td { background: var(--cyan-pale); padding: 14px; white-space: normal; }
.panel audio { width: 100%; max-width: 640px; display: block; margin-bottom: 14px; }

/* Label / value pairs, two pairs a row: <dl class="attrs"><dt>…</dt><dd>…</dd>…</dl> */
.attrs { display: grid; grid-template-columns: max-content 1fr max-content 1fr; gap: 6px 18px; font-size: 13px; }
.attrs dt { color: var(--muted); font-weight: 600; font-size: 12px; }
.attrs dd { margin: 0; overflow-wrap: anywhere; }

/* ── Smaller screens ──────────────────────────────────────────────────────── */
@media (max-width: 1400px) {
  td, th { padding-left: 7px; padding-right: 7px; }
  .btn-small { padding: 6px 9px; }
  .row-actions { gap: 4px; }
  td.wrap { max-width: 200px; }
}
@media (max-width: 820px) {
  .header { padding: 0 16px; }
  .header-user { display: none; }
  .main { padding: 32px 16px; }
  .filters, .filters.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attrs { grid-template-columns: max-content 1fr; }
  .card { padding: 20px; }
}
@media (max-width: 480px) {
  .filters, .filters.cols-3, .filters.cols-2 { grid-template-columns: 1fr; }
  .header-divider, .header-tool { display: none; }
}
