.price-history-summary {
  margin-top: 12px;
  font-size: 0.95rem;
}

.price-history-summary__lowest {
  margin: 0 0 8px;
  font-weight: 600;
}

.price-history-trigger {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cfd8dc;
  background: #fff;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.price-history-trigger::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
}

.price-history-trigger:hover,
.price-history-trigger:focus-visible {
  border-color: #137bbb;
}

body.price-history-modal-open {
  overflow: hidden;
}

.price-history-modal[hidden] {
  display: none;
}

.price-history-modal {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.price-history-modal__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.66);
  cursor: pointer;
}

.price-history-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 32px;
  background: #fff;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.3);
}

.price-history-modal__dialog h2 {
  margin: 0 48px 24px 0;
  font-size: 1.65rem;
  line-height: 1.25;
}

.price-history-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

.price-history-modal__table-wrapper {
  overflow-x: auto;
}

.price-history-modal__table {
  width: 100%;
  border-collapse: collapse;
}

.price-history-modal__table th,
.price-history-modal__table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e2e2e2;
  text-align: left;
  vertical-align: top;
}

.price-history-modal__table th {
  font-weight: 700;
}

@media (max-width: 700px) {
  .price-history-modal {
    align-items: flex-end;
    padding: 0;
  }

  .price-history-modal__dialog {
    width: 100%;
    max-height: 90vh;
    padding: 24px 18px;
  }

  .price-history-modal__dialog h2 {
    font-size: 1.25rem;
  }

  .price-history-modal__table th,
  .price-history-modal__table td {
    padding: 10px 7px;
    font-size: 0.88rem;
  }
}
