/* Compare page — tablet portrait and landscape layout.
 * Mobile (<=640px) and desktop (>1180px) retain their established designs. */
@media screen and (min-width: 641px) and (max-width: 1180px) {
  body.page-template-page-compare .wcp-page {
    --wcp-visible-n: 3;
  }

  body.page-template-page-compare .wcp-glass {
    max-width: 100%;
    padding: 16px;
    overflow: visible;
  }

  body.page-template-page-compare .wcp-glass .wcp-calc-inner {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.35fr);
    grid-template-areas:
      "area dest groove"
      "team wage cement";
    width: 100%;
    max-width: none;
    margin: 0;
    gap: 12px 10px;
    align-items: stretch;
    justify-items: stretch;
  }

  body.page-template-page-compare .wcp-glass .wcp-calc-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    gap: 5px;
  }

  body.page-template-page-compare .wcp-glass .wcp-calc-label {
    min-width: 0;
    font-size: 11px;
    line-height: 1.35;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  body.page-template-page-compare .wcp-glass .wcp-calc-area-wrap,
  body.page-template-page-compare .wcp-glass .wcp-dest-wrap,
  body.page-template-page-compare .wcp-glass .wcp-calc-btns {
    width: auto;
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
  }

  body.page-template-page-compare .wcp-glass .wcp-calc-area-wrap {
    justify-content: flex-start;
  }

  body.page-template-page-compare .wcp-glass .wcp-calc-area-wrap input {
    width: min(72px, 56%);
    min-width: 54px;
  }

  body.page-template-page-compare .wcp-glass .wcp-dest-wrap input[type="search"] {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  body.page-template-page-compare .wcp-glass .wcp-calc-item--groove .wcp-calc-btns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    max-width: none;
    border-radius: 12px;
  }

  body.page-template-page-compare .wcp-glass .wcp-calc-item--groove .wcp-calc-btns button {
    width: 100%;
    min-width: 0;
    padding: 7px 4px;
  }

  body.page-template-page-compare .wcp-prod-row,
  body.page-template-page-compare .wcp-row-vals,
  body.page-template-page-compare .wcp-summary-grid,
  body.page-template-page-compare .wcp-mini-prod-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.page-template-page-compare .wcp-prod-cell,
  body.page-template-page-compare .wcp-row-val,
  body.page-template-page-compare .wcp-mini-cell {
    min-width: 0;
  }

  body.page-template-page-compare .wcp-prod-cell {
    padding-left: 10px;
    padding-right: 10px;
  }

  body.page-template-page-compare .wcp-prod-name {
    font-size: 14px;
    overflow-wrap: anywhere;
  }
}

/* Transport detail: keep the route readable and reserve the brick red accent
   for the distance and the total price. */
.wcp-page #wcp-row-transport .wcp-sub-cost,
.wcp-page #wcp-row-transport .wcp-route,
.wcp-page #wcp-row-transport .wcp-route-place,
.wcp-page #wcp-row-transport .wcp-route-arrow,
.wcp-page #wcp-row-transport .wcp-route-vehicle,
.wcp-page #wcp-row-transport .wcp-route-trips {
  color: var(--wcp-ink, #202124);
}

.wcp-page #wcp-row-transport .wcp-sub-cost {
  margin-top: 5px;
}

.wcp-page #wcp-row-transport .wcp-route {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.wcp-page #wcp-row-transport .wcp-route--vehicle {
  margin-top: 1px;
}

.wcp-page #wcp-row-transport .wcp-route-distance {
  color: var(--wcp-brick, #a3322c);
  font-weight: 700;
  white-space: nowrap;
}
