/* ==========================================================================
   TeamTrek — the day log
   --------------------------------------------------------------------------
   The legal instrument, inside the shared panel frame.

   An in-house legal day is not one block of work. It is a contract review
   interrupted by a compliance question, a discovery request, a policy call,
   and the column that matters is who asked. A board of people cannot show
   that, and a chart of totals loses the thing the section is arguing: the
   ten-minute question that a day rebuilt on Friday never includes. So this
   is the day in sequence, one entry at a time.

   The frame around it -- the box, the bar, the rail, the status strip --
   lives in panel.css. Everything here is the log.
   ========================================================================== */

/* -------------------------------------------------------------- the rows */
.daylog__rows { min-width: 0; padding: .5rem 0; overflow: hidden; }

.daylog__head,
.daylog__row {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) 9rem 4rem 3.5rem;
  align-items: center; gap: .75rem;
  padding: 0 .875rem;
}
.daylog__head {
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--neutral-150);
  font-size: .625rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--neutral-500);
}
.daylog__row {
  /* 60, so six entries and the head fill the body rather than leaving a
     band of white above the status strip. */
  height: 60px;
  border-bottom: 1px solid var(--neutral-100);
  transition: background-color var(--dur-ui) var(--ease-ui);
}
.daylog__row:last-child { border-bottom: 0; }

/* When the clock is the first column, it has to read as a column: tabular,
   so the colons line up down the day. */
.daylog__at {
  font-size: .75rem; color: var(--neutral-500);
  font-variant-numeric: tabular-nums;
}

/* The work, and the team that asked for it. */
.daylog__what { min-width: 0; font-size: .75rem; color: var(--neutral-500); }
.daylog__what b {
  display: block;
  font-size: .8125rem; font-weight: 700; color: var(--neutral-900);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* The kind of request, as a quiet tag rather than a coloured badge: five
   kinds on one panel in five colours is a chart nobody asked for. */
.daylog__kind {
  display: inline-flex; align-items: center; gap: .4375rem;
  min-width: 0;
  font-size: .75rem; color: var(--neutral-700);
}
.daylog__kind i {
  flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary-400);
}
.daylog__kind span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.daylog__dur {
  text-align: right;
  font-size: .8125rem; font-weight: 700; color: var(--neutral-900);
  font-variant-numeric: tabular-nums;
}

/* The entry the timer is on. A short entry is the one most often lost, so
   the running mark sits on the row rather than somewhere else on the
   panel. */
.daylog__live {
  display: inline-flex; align-items: center; gap: .375rem;
  font-size: .625rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--primary-700);
}
.daylog__live i {
  flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary-500);
  animation: daylogPulse 2.4s var(--ease-ui) infinite;
}
@keyframes daylogPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.74); }
}
.daylog__live[hidden] { display: none; }

/* An entry that has just arrived. It fades up once; nothing loops. */
.daylog__row--new { animation: daylogIn .32s var(--ease-brand) both; }
@keyframes daylogIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ------------------------------------------------------ the day, by type */
/* Four short bars in the rail, each against the largest, so the shape of
   the day reads without any number being read. */
.daylog__split { display: grid; gap: .625rem; margin: 0; padding: 0; list-style: none; }
.daylog__splitrow { display: grid; gap: .25rem; }
.daylog__splitlabel {
  display: flex; align-items: baseline; justify-content: space-between; gap: .5rem;
  font-size: .6875rem; color: var(--neutral-600);
}
.daylog__splitlabel b { color: var(--neutral-900); font-variant-numeric: tabular-nums; }
.daylog__splitbar {
  height: 6px; border-radius: var(--r-pill);
  background: var(--neutral-150);
  overflow: hidden;
}
.daylog__splitbar span {
  display: block; height: 100%; width: var(--w, 0%);
  border-radius: var(--r-pill);
  background: var(--primary-500);
  transition: width var(--dur-ui) var(--ease-ui);
}

@media (prefers-reduced-motion: reduce) {
  .daylog__row,
  .daylog__splitbar span { transition: none; }
  .daylog__live i { animation: none; }
  .daylog__row--new { animation: none; }
}

/* ------------------------------------------------------------- narrower */
@media (max-width: 959px) {
  /* The kind and the running mark are the two a small log can lose: the
     time, the work and the duration carry the row on their own. */
  .daylog__head,
  .daylog__row { grid-template-columns: 4rem minmax(0, 1fr) 4rem; }
  .daylog__kind,
  .daylog__kindhead,
  .daylog__live,
  .daylog__livehead { display: none; }
}

/* --------------------------------------------------------------- phones */
@media (max-width: 599px) {
  .daylog__head,
  .daylog__row { grid-template-columns: 3.5rem minmax(0, 1fr) 3.5rem; padding: 0 .625rem; }
  .daylog__head { font-size: .75rem; }
  .daylog__at { font-size: .75rem; }
  .daylog__what { font-size: .75rem; }
  .daylog__what b { font-size: .8125rem; }
  .daylog__dur { font-size: .8125rem; }
  .daylog__splitlabel { font-size: .75rem; }
}
