/* Projection charge / condition / fatigue — section Charge Inside Pace */
.ip-projection {
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(520px 220px at 100% 0%, rgba(255, 196, 71, 0.12), transparent 72%),
    radial-gradient(420px 240px at 0% 100%, rgba(34, 160, 107, 0.12), transparent 74%),
    rgba(3, 13, 37, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ip-projection.is-open {
  border-color: rgba(255, 206, 91, 0.26);
}

.ip-projection-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 14px 15px;
  border: 0;
  color: #fff;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.ip-projection-toggle-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ip-projection-toggle-copy b {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.97);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ip-projection-toggle-copy small {
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  font-weight: 700;
}

.ip-projection-confidence {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.06);
  font-size: 10px;
  font-weight: 900;
  text-transform: capitalize;
  white-space: nowrap;
}

.ip-projection-confidence.is-good {
  border-color: rgba(74, 222, 128, 0.25);
  color: #9bf2bd;
  background: rgba(74, 222, 128, 0.1);
}

.ip-projection-confidence.is-warn {
  border-color: rgba(246, 196, 83, 0.28);
  color: #ffe09a;
  background: rgba(246, 196, 83, 0.1);
}

.ip-projection-body {
  display: grid;
  gap: 13px;
  padding: 0 14px 14px;
}

.ip-projection-warning {
  padding: 10px 12px;
  border: 1px solid rgba(246, 196, 83, 0.24);
  border-radius: 12px;
  color: #ffe4a5;
  background: rgba(246, 196, 83, 0.08);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.45;
}

.ip-projection-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ip-projection-metric {
  min-width: 0;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.ip-projection-metric > span {
  color: rgba(255, 255, 255, 0.44);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.ip-projection-metric > strong {
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.ip-projection-metric > small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.52);
  font-size: 10.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ip-projection-metric.is-good {
  border-color: rgba(74, 222, 128, 0.2);
  background: rgba(74, 222, 128, 0.065);
}

.ip-projection-metric.is-good > strong {
  color: #9bf2bd;
}

.ip-projection-metric.is-warn {
  border-color: rgba(246, 196, 83, 0.24);
  background: rgba(246, 196, 83, 0.075);
}

.ip-projection-metric.is-warn > strong {
  color: #ffe09a;
}

.ip-projection-chart-wrap {
  position: relative;
  min-width: 0;
  padding: 11px 9px 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  background: rgba(0, 8, 26, 0.5);
}

.ip-projection-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 13px;
  padding: 1px 6px 4px;
}

.ip-projection-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 9.5px;
  font-weight: 760;
}

.ip-projection-legend i {
  width: 14px;
  height: 3px;
  border-radius: 999px;
}

.ip-projection-legend i.is-bar {
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
}

.ip-projection-chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.ip-projection-grid {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.ip-projection-zero {
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.ip-projection-axis-label,
.ip-projection-date-label {
  fill: rgba(255, 255, 255, 0.38);
  font-family: Inter, sans-serif;
  font-size: 9px;
  font-weight: 700;
}

.ip-projection-load {
  fill: rgba(255, 255, 255, 0.09);
}

.ip-projection-load.is-planned {
  fill: rgba(255, 216, 117, 0.18);
}

.ip-projection-today {
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 1.4;
  stroke-dasharray: 4 4;
}

.ip-projection-today-label {
  fill: rgba(255, 255, 255, 0.72);
  font-family: Inter, sans-serif;
  font-size: 9.5px;
  font-weight: 850;
}

.ip-projection-race {
  stroke: #f6c453;
  stroke-width: 1.5;
  stroke-dasharray: 2 4;
}

.ip-projection-race-label {
  fill: #ffe09a;
  font-family: Inter, sans-serif;
  font-size: 9.5px;
  font-weight: 900;
}

.ip-projection-hit {
  fill: transparent;
  stroke: transparent;
  cursor: crosshair;
}

.ip-projection-hit:focus {
  fill: rgba(255, 255, 255, 0.12);
  stroke: rgba(255, 255, 255, 0.35);
  outline: none;
}

.ip-projection-tooltip {
  position: absolute;
  top: 43px;
  right: 14px;
  max-width: 220px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 9px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(2, 10, 31, 0.92);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  font-size: 9.5px;
  font-weight: 700;
  pointer-events: none;
}

.ip-projection-tooltip strong {
  width: 100%;
  color: #fff;
  font-size: 10.5px;
}

.ip-projection-diagnostic {
  padding: 11px 12px;
  border-left: 3px solid rgba(246, 196, 83, 0.78);
  border-radius: 0 12px 12px 0;
  background: rgba(246, 196, 83, 0.075);
}

.ip-projection-diagnostic strong {
  color: #ffe09a;
  font-size: 11px;
  font-weight: 900;
}

.ip-projection-diagnostic p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.45;
}

.ip-projection-weeks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 7px;
}

.ip-projection-week {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
}

.ip-projection-week span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.ip-projection-week strong {
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.ip-projection-week small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 9.5px;
  font-weight: 700;
}

.ip-projection-method {
  margin: 0;
  color: rgba(255, 255, 255, 0.36);
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .ip-projection-toggle {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ip-projection-toggle > svg {
    display: none;
  }

  .ip-projection-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ip-projection-metric {
    min-height: 76px;
  }

  .ip-projection-chart-wrap {
    padding-inline: 3px;
  }

  .ip-projection-tooltip {
    top: 50px;
    right: 8px;
  }
}

@media (max-width: 420px) {
  .ip-projection-toggle {
    padding: 13px 12px;
  }

  .ip-projection-confidence {
    padding-inline: 7px;
    font-size: 9px;
  }

  .ip-projection-body {
    padding: 0 10px 11px;
  }

  .ip-projection-metric {
    min-height: 70px;
    padding: 9px 10px;
  }

  .ip-projection-metric > strong {
    font-size: 18px;
  }

  .ip-projection-legend {
    gap: 5px 8px;
  }

  .ip-projection-legend span {
    font-size: 8.5px;
  }
}
