/* Timeline filters */

form.filters {
  margin-top: 1.4rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 2rem;
  font-size: var(--text-sm);
  max-width: none;
}

form.filters .group {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

form.filters .name {
  font-size: var(--text-xs);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

form.filters .segment,
form.filters .under {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--sheet);
  padding: 2px;
  gap: 2px;
}

form.filters .segment a,
form.filters .segment input[type=date] {
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  color: var(--muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  background: transparent;
}

form.filters .segment a:hover {
  color: var(--ink);
  text-decoration: none;
}

form.filters .segment a.on,
form.filters .segment input[type=date].on,
form.filters .segment input[type=date]:focus {
  background: var(--wash);
  color: var(--ink);
  font-weight: 500;
}

form.filters .segment .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

form.filters .segment .dot.in { background: var(--in); }
form.filters .segment .dot.out { background: var(--out); }

form.filters .under {
  padding-left: 0.6rem;
  min-width: 16rem;
}

form.filters .under.on {
  border-color: var(--ink);
}

form.filters .under input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.2rem 0.2rem;
}

form.filters .under input::placeholder {
  color: var(--muted);
}

form.filters .under .clear {
  color: var(--muted);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

form.filters .under .clear:hover {
  background: var(--wash);
  color: var(--ink);
  text-decoration: none;
}

.applied {
  margin-top: 0.75rem;
  font-size: var(--text-sm);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.2rem;
  align-items: baseline;
}

.applied b {
  color: var(--ink);
  font-weight: 500;
}

.applied .in b { color: var(--in); }
.applied .out b { color: var(--out); }
.applied b a { color: inherit; }

/* Timeline days */

.rows.timeline {
  margin-top: 0.4rem;
}

.rows.timeline .day .in,
.rows.timeline .day .out {
  font-weight: 500;
}

.rows.timeline .row {
  grid-template-columns: 3rem 10px minmax(0, 1fr) max-content;
  column-gap: 0.7rem;
  padding: 0.32rem 0;
}

.rows.timeline .t {
  color: var(--muted);
  font-size: var(--text-sm);
}

.rows.timeline .mark {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  top: -1px;
}

.rows.timeline .row.in .mark { background: var(--in); }
.rows.timeline .row.out .mark { background: var(--out); }

.rows.timeline .what {
  min-width: 0;
  overflow-wrap: anywhere;
}

.rows.timeline .who {
  font-weight: 500;
}

.rows.timeline .row.in .who { color: var(--in); }
.rows.timeline .row.out .who { color: var(--out); }

.rows.timeline .kind,
.rows.timeline .note {
  color: var(--muted);
  font-size: var(--text-sm);
}

.rows.timeline .facts {
  color: var(--muted);
  font-size: var(--text-sm);
  white-space: nowrap;
  display: inline-flex;
  gap: 0.9rem;
}

.rows.timeline .facts a {
  color: var(--muted);
}

.rows.timeline .facts .v {
  font-family: var(--mono);
  font-size: 12px;
}

@media (max-width: 700px) {
  .rows.timeline .row {
    grid-template-columns: 3rem 10px minmax(0, 1fr);
  }

  .rows.timeline .facts {
    grid-column: 3;
    white-space: normal;
  }

  form.filters .under {
    min-width: 0;
    flex: 1;
  }
}
