.kosm-price-history {
  color: var(--base-medium);
  font-size: var(--text-xs);
  line-height: 1.5;
}
.kosm-price-history__package {
  color: var(--base-dark);
  font-weight: 600;
}
.kosm-price-history .wc-price-history-shortcode {
  display: inline;
}
.kosm-price-history .woocommerce-Price-amount {
  color: inherit;
  font-size: inherit;
  font-weight: 600;
}
/* Keep the price and its history together above the controls on small screens. */
@media (max-width: 991px) {
  .product-packages-wrapper .package-option:has(.kosm-price-history) {
    grid-template-columns: minmax(0, 1fr) max-content !important;
    grid-template-areas: "teza teza" "cena cena" "kolicina kosarica" !important;
    gap: var(--space-xs) !important;
  }
  .package-price-wrapper:has(.kosm-price-history) {
    min-width: 0;
    max-width: 100%;
  }
}
.package-option:has(.kosm-price-history) .package-weight {
  white-space: nowrap;
}
/* Override the centered text inherited by simple products without a package label. */
.simple-product-wrapper .package-price-wrapper .kosm-price-history {
  text-align: right;
}
@media (max-width: 991px) {
  .simple-product-wrapper .package-price-wrapper .kosm-price-history {
    text-align: left;
  }
}
/* Match the existing package-selection basis from snippet 42, without enlarging the oval. */
.kosm-package-choice {
  flex: 0 0 280px;
  max-width: 100%;
  min-width: 0;
}
.kosm-package-choice .kosm-price-history {
  margin-block-start: var(--space-2xs);
  text-align: center;
}
.kosm-package-choice .woocommerce-Price-amount {
  white-space: nowrap;
}
@media (max-width: 991px) {
  /* Let the existing mobile grid place weight, price and controls as before. */
  .kosm-package-choice {
    display: contents;
  }
  .product-packages-wrapper .package-option:has(.kosm-package-choice .kosm-price-history) {
    /* Full-width history stays below the price and controls, allowing an inline amount. */
    grid-template-columns: minmax(0, 1fr) max-content max-content !important;
    grid-template-areas: "teza teza teza" "cena kolicina kosarica" "zgodovina zgodovina zgodovina" !important;
    column-gap: var(--space-2xs) !important;
    row-gap: var(--space-2xs) !important;
  }
  .kosm-package-choice .kosm-price-history {
    grid-area: zgodovina;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    margin-block-start: 0;
    text-align: left;
  }
}
/* The additional row uses the oval's width instead of squeezing into its price column. */
.kosm-package-choice .package-selection:has(.kosm-price-history) {
  flex-wrap: wrap;
}
.kosm-package-choice .package-selection > .kosm-price-history {
  flex: 0 0 100%;
  min-width: 0;
}
