#pricing-quotes-view > .pv2-kpi-grid {
  margin-block-end: 18px;
}

.pv2-table.quote-venue-table :is(th, td) {
  padding-inline: 6px;
}

.quote-venue-table :is(td, thead th) {
  white-space: nowrap;
}

.pv2-table-scroll--sticky-header .quote-venue-table tbody th {
  inset-block-start: auto;
  inset-inline-start: 0;
  z-index: 0;
  box-shadow: 1px 0 var(--line);
}

.pv2-quotes-list > :is(form, #pv2-quotes-body, .pv2-pager) {
  margin: 0;
}

.pv2-quotes-list > .pv2-pager {
  padding: 10px 16px;
}

.pv2-quotes-list form > :first-child {
  flex: 1 1 17rem;
}

.pv2-quotes-list [name='reason'] + .inventory-select .inventory-select-trigger {
  max-inline-size: 100%;
}

.pv2-quotes-list [name='reason'] + .inventory-select .inventory-select-face {
  max-inline-size: 11rem;
}

.pv2-quotes-table :is(th, td):first-child {
  min-width: 15rem;
  border-inline-end: 1px solid var(--line-subtle);
}

.pv2-quotes-table .pv2-quote-item {
  text-align: start;
  white-space: normal;
}

.pv2-quotes-table .pv2-cell-sub {
  color: var(--muted);
  font-size: 11px;
}

.pv2-quotes-table :is(th, td):nth-child(4) {
  min-inline-size: 14rem;
}

.pv2-quotes-table td:nth-child(4) .pv2-cell-sub {
  max-inline-size: 16rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.pv2-quote-reason {
  display: block;
  max-inline-size: 15rem;
  white-space: normal;
}

.pv2-quote-reason-counts {
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

#pricing-quote-panel {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(58rem, 100%);
  max-width: none;
  height: 100%;
  max-height: none;
  padding: 0;
  border: 0;
  border-inline-start: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  overflow: hidden;
}

#pricing-quote-panel[open] {
  display: flex;
  flex-direction: column;
}

#pricing-quote-panel:modal {
  overscroll-behavior: contain;
}

#pricing-quote-panel::backdrop {
  background: rgb(0 0 0 / 55%);
  overflow: hidden;
  overscroll-behavior: contain;
}

#pricing-quote-panel .side-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
}

#pricing-quote-panel .side-panel__title {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

#pricing-quote-panel .side-panel__title p {
  overflow: visible;
  white-space: normal;
}

#pricing-quote-panel h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

#pricing-quote-panel .side-panel__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 28px;
  container: quote-drawer / inline-size;
  overscroll-behavior: contain;
}

#pricing-quote-panel .pv2-quote-card {
  flex: none;
}

.pv2-quote-answer {
  align-items: baseline;
  justify-content: flex-start;
  gap: 4px 12px;
}

.pv2-quote-answer .pv2-card__title {
  font-size: 17px;
}

.pv2-quote-answer p,
.pv2-quote-summary__metrics dd {
  margin: 0;
}

.pv2-quote-answer p,
.pv2-quote-summary__metrics dt,
.pv2-quote-notice,
.pv2-quote-missing {
  color: var(--muted);
  font-size: 12px;
}

.pv2-quote-summary > .pv2-quote-summary__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
  gap: 12px 16px;
  margin: 0;
  padding: 12px 18px;
}

.pv2-quote-summary__metrics dd {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.pv2-quote-summary__metrics .pv2-quote-missing {
  font-weight: 400;
}

.pv2-quote-notice {
  margin: 0;
  padding-inline: 4px;
}

.pv2-quote-card > .pv2-quote-table-wrap {
  margin: 0;
}

.pv2-quote-table {
  font-variant-numeric: tabular-nums;
  table-layout: fixed;
}

.pv2-quote-card .pv2-quote-table :is(th, td) {
  white-space: normal;
  overflow-wrap: break-word;
}

.pv2-quote-table tbody th {
  font-weight: 600;
}

.pv2-quote-table[data-columns='2'] thead th:first-child {
  inline-size: 33%;
}

.pv2-quote-table[data-columns='3'] thead th:first-child {
  inline-size: 25%;
}

.pv2-quote-table[data-columns='3'] thead th:nth-child(2) {
  inline-size: 19%;
}

.pv2-quote-table[data-columns='5'] thead th:first-child {
  inline-size: 34%;
}

.pv2-quote-table[data-columns='6'] thead th:first-child {
  inline-size: 16%;
}

.pv2-quote-table[data-columns='6'] thead th:nth-child(2) {
  inline-size: 14%;
}

.pv2-quote-table[data-columns='6'] thead th:nth-child(3) {
  inline-size: 16%;
}

.pv2-quote-table[data-columns='6'] thead th:nth-child(4) {
  inline-size: 15%;
}

.pv2-quote-table[data-columns='6'] thead th:nth-child(5) {
  inline-size: 12%;
}

.pv2-quote-table tbody td:last-child {
  color: var(--muted);
}

.pv2-quote-table tbody tr:last-child > * {
  border-bottom: 0;
}

.pv2-quote-table .pv2-quote-row--total,
.pv2-quote-table .pv2-quote-row--final {
  background: var(--panel-raised);
  font-weight: 600;
}

.pv2-quote-table .pv2-quote-row--simulation th {
  color: var(--muted);
}

.pv2-quote-table .pv2-quote-row--best-price {
  background: color-mix(in srgb, var(--success) 10%, transparent);
}

.pv2-quote-table .pv2-quote-row--worst-price {
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

.pv2-quote-table .pv2-quote-row--own-offer :is(th, td:nth-child(2)) {
  font-weight: 700;
}

.pv2-quote-table .pv2-quote-row--blocked {
  background: color-mix(in srgb, var(--danger) 9%, var(--panel));
}

.pv2-quote-table .pv2-quote-row--blocked th {
  box-shadow: inset 2px 0 var(--danger);
}

.pv2-quote-cell-label {
  display: none;
}

@container quote-drawer (width <= 37rem) {
  .pv2-quote-table--stack,
  .pv2-quote-table--stack tbody {
    display: block;
  }

  .pv2-quote-table--stack thead {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .pv2-quote-table--stack tbody tr {
    display: grid;
    gap: 5px;
    padding: 10px 12px;
    border-block-end: 1px solid var(--line-subtle, #2c2c2c);
  }

  .pv2-quote-table--stack tbody tr:last-child {
    border-block-end: 0;
  }

  .pv2-quote-card .pv2-quote-table--stack tbody :is(th, td) {
    padding: 0;
    border: 0;
  }

  .pv2-quote-table--stack tbody td {
    display: grid;
    grid-template-columns: minmax(5.75rem, 1fr) minmax(0, 2.2fr);
    gap: 10px;
  }

  .pv2-quote-cell-label {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
  }

  .pv2-quote-table .pv2-quote-row--blocked {
    box-shadow: inset 2px 0 var(--danger);
  }

  .pv2-quote-table .pv2-quote-row--blocked th {
    box-shadow: none;
  }
}

.pv2-quote-outcomes {
  display: grid;
  gap: 4px;
  justify-items: start;
}

@media (max-width: 520px) {
  #pv2-quotes-totals > :last-child {
    grid-column: 1 / -1;
  }
}
