/* FastTrack custom styles on top of Bootstrap 5 */

:root {
  --brand: #6366f1;
}

body {
  padding-bottom: 4.75rem; /* room for the fixed bottom tab bar */
}

/* SVG sprite icons (Bootstrap Icons style: 16x16, currentColor) */
.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: currentColor; /* official sprite paths inherit fill from here */
}
.navbar-brand .icon {
  width: 1.25em;
  height: 1.25em;
}

.tab-content {
  padding-top: 1rem;
}

/* ---- bottom tab bar: icon over label ---- */
.bottom-tab-bar {
  background: var(--bs-body-bg);
  border-top: 1px solid var(--bs-border-color);
}
.bottom-tab-bar .nav-link {
  color: var(--bs-secondary-color);
}
.bottom-tab-bar .nav-link.active {
  background: transparent;
  color: var(--brand);
}
.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 0.45rem 1.1rem 0.35rem;
  line-height: 1.1;
}
.tab-btn .icon {
  width: 1.35rem;
  height: 1.35rem;
}
.tab-btn span {
  font-size: 0.72rem;
}

/* ---- fasting ring ---- */
.ring-wrap {
  position: relative;
  width: 240px;
  height: 240px;
}
.ring {
  width: 100%;
  height: 100%;
}
.ring-bg {
  fill: none;
  stroke: var(--bs-tertiary-bg);
  stroke-width: 14;
}
.ring-fg {
  fill: none;
  stroke: var(--brand);
  stroke-width: 14;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s linear, stroke 0.3s ease;
}
.ring-fg.overtime {
  stroke: var(--bs-success);
}
.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ring-percent {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}
.ring-state {
  font-size: 0.85rem;
  color: var(--bs-secondary-color);
}
.ring-time {
  font-size: 1.35rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-top: 0.15rem;
}
.ring-sub {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
  font-variant-numeric: tabular-nums;
}

/* ---- stats ---- */
.stat-card {
  text-align: center;
}
.stat-num {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
}
.stat-lab {
  font-size: 0.78rem;
  color: var(--bs-secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- 7-day chart (pure CSS bars) ---- */
.chart {
  display: flex;
  gap: 0.5rem;
  height: 150px;
  align-items: stretch;
}
.chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 0.25rem;
  height: 100%;
}
.chart-fill {
  width: 55%;
  min-height: 3px;
  border-radius: 0.3rem 0.3rem 0 0;
  background: var(--brand);
  transition: height 0.3s;
}
.chart-fill.zero {
  background: var(--bs-tertiary-bg);
}
.chart-val {
  font-size: 0.65rem;
  color: var(--bs-secondary-color);
}
.chart-lab {
  font-size: 0.7rem;
  color: var(--bs-secondary-color);
}

#toasts {
  z-index: 1080;
}
