/* Goals: the Goals tab on a commitment's page (a list of goals, each with its deadline and how much
   of its time is done). Loaded after windows.css, before calendars.css. The tab's bar is the
   shared .tab-bar in commitments.css. */

/* ---------- the tab ---------- */
.goals-tab {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.goals-tab__add {
  align-self: center;
  margin-left: auto;
}
.goals-tab__empty {
  margin: 0;
  padding: 0 var(--space-16);
  font-size: var(--font-size-sm);
}

/* ---------- one goal ---------- */
.goals-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  margin: 0;
  padding: 0;
  list-style: none;
}
.goal-row {
  display: grid;
  gap: var(--space-6);
  padding: var(--space-10) var(--space-16);
  border-radius: var(--radius-10);
  background: var(--colour-surface-frame);
}
.goal-row__top {
  display: flex;
  align-items: baseline;
  gap: var(--space-12);
}
.goal-row__name {
  font-weight: var(--font-weight-medium);
}
.goal-row__due {
  font-size: var(--font-size-sm);
}
.goal-row__edit {
  margin-left: auto;
  align-self: center;
}
.goal-row__progress {
  font-size: var(--font-size-sm);
}

/* The bar: a <progress>, drawn by hand so it matches the app (track, then the filled part). */
.goal-row__bar {
  appearance: none;
  width: 100%;
  height: var(--size-8);
  border: 0;
  border-radius: var(--radius-4);
  background: var(--colour-surface-strong);
  overflow: hidden;
}
.goal-row__bar::-webkit-progress-bar {
  background: var(--colour-surface-strong);
}
.goal-row__bar::-webkit-progress-value {
  background: var(--colour-accent);
}
.goal-row__bar::-moz-progress-bar {
  background: var(--colour-accent);
}
