/* -------------------------------------------------------- */
/* 🔹 Forecast Week Section                                 */
/* -------------------------------------------------------- */
/* The Plus price forecast after the example day — text and  */
/* selling points beside an example week drawn like the      */
/* app's 7 dagar tab: known days as bars, forecast days as   */
/* their likely interval with the average marked. Tinted     */
/* blue to set the Plus feature apart                        */

.forecast-week {
  padding-block: var(--website-section-spacing);
  background-color: var(--color-primary-container);
}

.forecast-week__inner {
  display: flex;
  align-items: center;
  gap: var(--website-section-spacing);
}

.forecast-week__content {
  flex: 1;
  min-width: 0;
}

.forecast-week__points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}

.forecast-week__point {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  font-size: var(--text-body-large);
  color: var(--color-on-surface);
}

.forecast-week__check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--color-secondary);
}


/* -------------------------------------------------------- */
/* 🔹 Example week                                          */
/* -------------------------------------------------------- */

.forecast-week__example {
  flex: 1;
  min-width: 0;
  max-width: 520px;
  padding: var(--space-xl);
  border: 1px solid var(--color-outline);
  border-radius: var(--radius);
  background-color: var(--color-surface);
}

/* Room above the columns for the value labels */
.forecast-week__plot {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  height: 220px;
  padding-top: var(--space-xl);
  border-bottom: 1px solid var(--color-outline);
}

/* Dashed line before the first forecast day, labelled Prognos */
.forecast-week__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px dashed var(--color-on-surface-variant);
}

.forecast-week__divider-label {
  position: absolute;
  top: 0;
  left: var(--space-xs);
  font-size: var(--text-body-small);
  color: var(--color-on-surface-variant);
  white-space: nowrap;
}

.forecast-week__day {
  --level-color: var(--color-price-yellow);
  position: relative;
}

.forecast-week__day--low { --level-color: var(--color-price-green); }
.forecast-week__day--high { --level-color: var(--color-price-red); }

.forecast-week__bar,
.forecast-week__span {
  position: absolute;
  left: 18%;
  right: 18%;
  border-radius: var(--radius-small);
}

.forecast-week__bar {
  bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background-color: var(--level-color);
}

.forecast-week__span {
  border: 1px solid var(--level-color);
  background-color: color-mix(in srgb, var(--level-color) 22%, transparent);
}

.forecast-week__day--rough .forecast-week__span {
  border-style: dashed;
}

.forecast-week__mark {
  position: absolute;
  left: 18%;
  right: 18%;
  height: 3px;
  transform: translateY(50%);
  border-radius: var(--radius-pill);
  background-color: var(--level-color);
}

.forecast-week__value {
  position: absolute;
  left: 50%;
  transform: translate(-50%, calc(-1 * var(--space-xs)));
  font-size: var(--text-body-small);
  font-weight: var(--text-title-weight);
  color: var(--color-on-surface);
  white-space: nowrap;
}

.forecast-week__day--forecast .forecast-week__value {
  font-weight: 400;
  color: var(--color-on-surface-variant);
}

.forecast-week__axis {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  padding-top: var(--space-s);
  margin-bottom: var(--space-m);
}

.forecast-week__label {
  text-align: center;
  font-size: var(--text-body-small);
  color: var(--color-on-surface-variant);
  white-space: nowrap;
}

.forecast-week__label:first-child {
  font-weight: var(--text-title-weight);
  color: var(--color-on-surface);
}

.forecast-week__caption {
  font-size: var(--text-body-small);
  color: var(--color-on-surface-variant);
}


/* -------------------------------------------------------- */
/* 🔹 Responsive                                            */
/* -------------------------------------------------------- */
/* Stacked below 900px — text first, the week under it */

@media (max-width: 899px) {
  .forecast-week__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .forecast-week__example {
    max-width: none;
  }
}

@media (max-width: 767px) {
  .forecast-week__point {
    font-size: var(--text-body-medium);
  }

  .forecast-week__example {
    padding: var(--space-l);
  }

  .forecast-week__plot {
    height: 180px;
  }
}
