/* ==========================================================================
   Time conversion pages — shared page styles for /decimal-to-minutes/ and
   /hours-to-decimal/, plus the chart-download bar used by all three time
   pages (including the older /minutes-to-decimal/, which keeps its own
   minutes-decimal.css for everything else — that page carries most of the
   site's search impressions, so its existing styles are left untouched).
   Reuses tokens and shared classes (.field, .btn) from /assets/css/main.css.
   ========================================================================== */

/* ---- Converter card ---- */
.time-convert__card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.time-convert__fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: end;
}
@media (min-width: 640px) {
  .time-convert__fields {
    grid-template-columns: 1fr auto 1fr;
  }
}

.time-convert__equals {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-ink-muted);
  padding-bottom: var(--space-3);
}
@media (min-width: 640px) {
  .time-convert__equals {
    padding-bottom: var(--space-4);
  }
}

.time-convert__hint {
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  margin-top: var(--space-1);
}

.time-convert__readout {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
}
.time-convert__readout-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.time-convert__readout-label {
  font-size: 0.85rem;
  color: var(--color-ink-muted);
}
.time-convert__readout-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-accent);
}

/* ---- Timesheet rows (hours page) ---- */
.timesheet {
  background: var(--color-paper-alt);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
}
.timesheet__title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin-bottom: var(--space-2);
}
.timesheet__intro {
  font-size: 0.9rem;
  color: var(--color-ink-muted);
  margin-bottom: var(--space-4);
}
.timesheet__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3);
  align-items: end;
  margin-bottom: var(--space-3);
}
@media (min-width: 640px) {
  .timesheet__row {
    grid-template-columns: 1.4fr 1fr auto auto;
  }
}
.timesheet__row-decimal {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--color-ink-soft);
  padding-bottom: var(--space-3);
  min-width: 5.5rem;
}
.timesheet__remove {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-ink-muted);
  cursor: pointer;
  font-size: 0.85rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0 var(--space-3);
}
.timesheet__remove:hover,
.timesheet__remove:focus-visible {
  color: var(--color-ink);
  border-color: var(--color-ink-muted);
}
.timesheet__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
}
.timesheet__total {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-left: auto;
  text-align: right;
}
.timesheet__total-label {
  font-size: 0.85rem;
  color: var(--color-ink-muted);
}
.timesheet__total-value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-accent);
}
/* Inline per-row parse-error hint (shares .field__hint's sizing from
   main.css, just recolored — set via JS when a row's time input can't be
   parsed by parseHours()). */
.timesheet__row-hint--error {
  color: var(--color-error);
}

/* ---- Chart + download bar (all three time pages) ---- */
.time-chart {
  margin-bottom: var(--space-6);
}
.time-chart__head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.time-chart__title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
}
.time-chart__scroll {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
  max-height: 30rem;
}
.time-chart__table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.time-chart__table caption {
  text-align: left;
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  padding: var(--space-3) var(--space-4) 0;
}
.time-chart__table th,
.time-chart__table td {
  padding: var(--space-2) var(--space-3);
  text-align: right;
  border-bottom: 1px solid var(--color-divider);
  min-width: 88px;
}
.time-chart__table th:first-child,
.time-chart__table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--color-ink);
}
.time-chart__table thead th {
  background: var(--color-paper-alt);
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-ink);
  border-bottom: 2px solid var(--color-border);
  position: sticky;
  top: 0;
}
.time-chart__table td {
  font-family: var(--font-mono);
  color: var(--color-ink-soft);
}
.time-chart__table tbody tr:nth-child(5n) td,
.time-chart__table tbody tr:nth-child(5n) th {
  background: var(--color-paper-alt);
}

/* ---- Download-the-chart bar ---- */
.chart-download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-paper-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
}
.chart-download__text {
  flex: 1 1 16rem;
}
.chart-download__title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin-bottom: var(--space-1);
}
.chart-download__blurb {
  font-size: 0.9rem;
  color: var(--color-ink-muted);
}
.chart-download__status {
  flex-basis: 100%;
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  min-height: 1.2em;
}
.chart-download__status--error {
  color: var(--color-error);
}

/* ---- Summing variant of the shared before/after strip ----
   main.css strikes through the "from" value, which reads correctly as a
   before/after conversion (1h 30m -> 1.5h). On /hours-to-decimal/ the left
   side is a LIST OF ENTRIES being added up, and a strike-through there reads
   as "these were cancelled" instead of "these total". */
.tidy-strip--sum .tidy-strip__side--from .tidy-strip__value {
  text-decoration: none;
}
