/* VDOT calculator — extended styling on top of shared/style.css */

/* ---- time input triplet ---- */
.fn-time-row .fn-time-inputs {
  display: flex;
  gap: 8px;
}
.fn-time-inputs > div {
  flex: 1;
  position: relative;
}
.fn-time-inputs input {
  width: 100%;
  padding: 10px 12px 22px;
  border: 1px solid var(--fn-border);
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  text-align: center;
}
.fn-time-inputs input:focus {
  border-color: var(--fn-teal);
}
.fn-time-inputs span {
  position: absolute;
  bottom: 5px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  color: var(--fn-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- sections ---- */
.fn-section {
  margin-top: 28px;
}
.fn-section h3 {
  margin: 0 0 14px;
  font-size: 16px;
}
.fn-hint {
  font-weight: 400;
  font-size: 12px;
  color: var(--fn-light);
  margin-left: 6px;
}

/* ---- VDOT headline ---- */
.fn-vdot-headline {
  background: linear-gradient(135deg, #e8f6f4 0%, #f0f7ff 100%);
  border-radius: var(--fn-radius);
  padding: 24px;
  margin-top: 24px;
  text-align: center;
}
.fn-vdot-num {
  font-size: 56px !important;
  line-height: 1;
  background: linear-gradient(135deg, #2a9d8f, #1d6f66);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.fn-vdot-tier {
  margin: 10px 0 0;
  font-weight: 600;
  font-size: 15px;
}

/* ---- training pace cards ---- */
.fn-paces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.fn-pace-card {
  background: var(--fn-bg);
  border-radius: var(--fn-radius);
  padding: 14px;
  border-left: 4px solid var(--fn-teal);
  transition: transform 0.15s;
}
.fn-pace-card:hover {
  transform: translateY(-2px);
}
.fn-pace-name {
  margin: 0 0 6px;
  font-weight: 600;
  font-size: 14px;
}
.fn-pace-val {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: var(--fn-teal-dark);
  font-variant-numeric: tabular-nums;
}
.fn-pace-mi {
  font-size: 12px;
  font-weight: 400;
  color: var(--fn-light);
}
.fn-pace-desc {
  margin: 0;
  font-size: 11px;
  color: var(--fn-muted);
}

/* ---- equivalents table ---- */
.fn-eq-input {
  background: var(--fn-teal-soft);
  font-weight: 600;
}
.fn-tag {
  display: inline-block;
  background: var(--fn-teal);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-left: 6px;
}

/* ---- percentile section ---- */
.fn-pct-section {
  background: var(--fn-bg);
  border-radius: var(--fn-radius);
  padding: 20px;
}
.fn-pct-hero {
  text-align: center;
  margin-bottom: 16px;
}
.fn-pct-value {
  font-size: 56px !important;
  line-height: 1;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* animated gauge bar */
.fn-gauge {
  margin: 14px 0 6px;
}
.fn-gauge-track {
  height: 22px;
  background: #e6e9ec;
  border-radius: 11px;
  overflow: hidden;
  position: relative;
}
.fn-gauge-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2a9d8f 0%, #4cb5a8 50%, #e74c3c 100%);
  border-radius: 11px;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}
.fn-gauge-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 100%
  );
  animation: fn-shimmer 2.2s infinite;
}
@keyframes fn-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.fn-gauge-label {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--fn-muted);
  margin-top: 6px;
}
.fn-pct-note {
  font-size: 12px;
  color: var(--fn-light);
  margin: 8px 0 0;
  text-align: center;
}
.fn-pct-chart-wrap {
  height: 320px;
  margin-top: 16px;
}

/* ---- sources ---- */
.fn-sources {
  margin-top: 24px;
  background: var(--fn-bg);
  border-radius: var(--fn-radius);
  padding: 4px 16px;
  font-size: 13px;
  color: var(--fn-muted);
}
.fn-sources summary {
  cursor: pointer;
  padding: 10px 0;
  font-weight: 500;
  color: var(--fn-text);
}
.fn-sources-body {
  padding: 0 0 12px;
  line-height: 1.6;
}
.fn-sources-body pre {
  background: #fff;
  border: 1px solid var(--fn-border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.fn-sources-body ul {
  margin: 8px 0;
  padding-left: 20px;
}
.fn-sources-body li {
  margin-bottom: 4px;
}

@media (max-width: 600px) {
  .fn-time-inputs {
    gap: 6px;
  }
  .fn-vdot-num,
  .fn-pct-value {
    font-size: 44px !important;
  }
  .fn-pct-chart-wrap {
    height: 260px;
  }
}

/* ---- multi-distance distribution chart caption / footnote ---- */
.fn-cmp-footnote {
  font-size: 12px;
  color: var(--fn-muted);
  margin: 12px 2px 0;
  line-height: 1.5;
}
.fn-cmp-footnote sup {
  color: var(--fn-teal);
}
.fn-cmp-footnote em {
  color: var(--fn-e74c, #e74c3c);
  font-style: normal;
  font-weight: 600;
}
