/* Call tracking: the Calls tab (src/routes/calls.ts). Layout only: cards,
   pills, stats, fields and tables come from ui.css; the fee table from
   app-automations.css (.tx-fees). Every value is a token. */

.cl-page {
  max-width: 880px;
  margin-top: var(--space-4);
}

/* What call tracking does: three lines, each with its mark. */
.cl-what {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.cl-what li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  align-items: start;
  color: var(--text-dim);
}

.cl-what strong {
  color: var(--text);
  font-weight: var(--weight-medium);
}

.cl-what svg {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--accent);
}

.cl-step {
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--accent);
}

/* The two kinds of number, as two big choices. */
.cl-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.cl-choice {
  display: grid;
  align-content: start;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-4);
  color: var(--text);
  text-decoration: none;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
}

.cl-choice:hover {
  border-color: var(--accent);
  box-shadow: var(--elev-1);
}

.cl-choice span {
  font-size: var(--type-small);
  color: var(--text-dim);
}

.cl-choice .cl-price {
  margin-top: var(--space-1);
  font-size: var(--type-ui);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.cl-period {
  display: flex;
  justify-content: flex-end;
}

.cl-headline {
  font-size: var(--type-heading);
  font-weight: var(--weight-medium);
  color: var(--text);
}

.cl-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
}

/* The call log: one row per call, the outcome and time on the right. */
.cl-log,
.cl-nums,
.cl-found {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cl-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2) var(--space-4);
  align-items: center;
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
}

.cl-row:first-child {
  border-top: 0;
}

.cl-row-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cl-from {
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

.cl-who {
  font-size: var(--type-small);
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}

.cl-row-side {
  display: grid;
  justify-items: end;
  gap: var(--space-1);
}

.cl-time {
  font-size: var(--type-small);
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
  white-space: nowrap;
}

.cl-rec {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.cl-rec audio {
  width: min(100%, 360px);
  height: var(--ctl-h-md);
}

.cl-sub {
  font-size: var(--type-ui);
  font-weight: var(--weight-medium);
  color: var(--text-dim);
}

.cl-num {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  min-height: 44px;
  border-top: 1px solid var(--line);
}

.cl-num:first-child {
  border-top: 0;
}

.cl-num-phone {
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.cl-num-label {
  min-width: 0;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

.cl-found li {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: baseline;
  padding: var(--space-2) 0;
  font-variant-numeric: tabular-nums;
  border-top: 1px solid var(--line);
}

.cl-found li:first-child {
  border-top: 0;
}

.cl-cost {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-tint);
  border-radius: var(--r-md);
}

.cl-group {
  display: grid;
  gap: var(--space-2);
}

.cl-src {
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

.cl-settings .switch {
  min-height: 44px;
}

.cl-indent {
  margin: 0;
}

.cl-select {
  max-width: 240px;
}

.cl-kind {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.cl-record {
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .cl-choices {
    grid-template-columns: 1fr;
  }

  .cl-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cl-period {
    justify-content: stretch;
  }

  .cl-select {
    max-width: none;
  }

  /* Calls by source fits a phone with three columns. */
  .cl-wide {
    display: none;
  }
}

/* The Phone calls dashboard widget (public/static/app/analytics.js callsBody). */
.dw-calls-line {
  margin: 0 0 var(--space-3);
  font-size: var(--type-small);
  color: var(--text-dim);
}
