/* Auction fees: the comparison table on /auctions/ and the "fees and house
   rules" box on each auction house page. Loaded through pageStyles on those
   two templates only. Colours and type come from tokens.css. */

/* -- Text sections on the auctions hub ----------------------------------- */
.auction-hub-intro {
  max-width: 860px;
  margin: 2rem 0 0;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--ink-700);
}

.auction-hub-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-display);
  font-size: var(--text-meta);
}

.auction-hub-jump a {
  color: var(--teal-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auction-hub-section {
  margin-top: var(--space-section);
}

.auction-hub-section > h2 {
  margin-bottom: 0.75rem;
}

.auction-hub-section > p,
.auction-hub-section > ul,
.auction-hub-section > ol {
  max-width: 860px;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--ink-700);
}

.auction-hub-section > ul,
.auction-hub-section > ol {
  padding-left: 1.25rem;
}

.auction-hub-section > ul li,
.auction-hub-section > ol li {
  margin-bottom: 0.6rem;
}

/* -- The table ----------------------------------------------------------- */
.auction-fees__scroll {
  margin-top: 1.5rem;
  border: 1px solid var(--line-200);
  border-radius: var(--radius-card);
  background: var(--paper);
  overflow-x: auto;
}

.auction-fees__table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink-700);
}

.auction-fees__table caption {
  caption-side: bottom;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--line-200);
  font-size: var(--text-meta);
  color: var(--ink-500);
  text-align: left;
}

.auction-fees__table th,
.auction-fees__table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line-100);
  text-align: left;
  vertical-align: top;
}

.auction-fees__table thead th {
  background: var(--teal-700);
  color: var(--paper);
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 0;
}

.auction-fees__table tbody th {
  font-weight: 600;
  min-width: 11rem;
}

.auction-fees__table tbody th a {
  color: var(--teal-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auction-fees__table tbody tr:last-child th,
.auction-fees__table tbody tr:last-child td {
  border-bottom: 0;
}

.auction-fees__table tbody tr:nth-child(even) {
  background: var(--wash-050);
}

.auction-fees__bill {
  font-weight: 700;
  color: var(--ink-900);
  white-space: nowrap;
}

.auction-fees__blank {
  color: var(--ink-500);
}

.auction-fees__next {
  display: block;
  margin-top: 0.3rem;
  font-size: var(--text-meta);
  font-weight: 400;
  color: var(--ink-500);
}

.auction-fees__next a,
.auction-fees__source a {
  color: var(--teal-700);
}

.auction-fees__source {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  font-weight: 400;
}

.auction-fees__note {
  max-width: 860px;
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: var(--text-meta);
  line-height: 1.55;
  color: var(--ink-500);
}

/* Phone: each house becomes a block, each cell a labelled line. */
@media (max-width: 760px) {
  .auction-fees__scroll {
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .auction-fees__table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .auction-fees__table,
  .auction-fees__table tbody,
  .auction-fees__table tr,
  .auction-fees__table th,
  .auction-fees__table td,
  .auction-fees__table caption {
    display: block;
    width: 100%;
  }

  .auction-fees__table tbody tr {
    margin-bottom: 1rem;
    border: 1px solid var(--line-200);
    border-radius: var(--radius-card);
    background: var(--paper);
    overflow: hidden;
  }

  .auction-fees__table tbody tr:nth-child(even) {
    background: var(--paper);
  }

  .auction-fees__table tbody th {
    padding: 0.85rem 1rem;
    background: var(--wash-050);
    border-bottom: 1px solid var(--line-200);
    font-size: 1.05rem;
  }

  .auction-fees__table td {
    display: grid;
    grid-template-columns: 9.5rem 1fr;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
  }

  .auction-fees__table td::before {
    content: attr(data-label);
    font-size: var(--text-eyebrow);
    font-weight: 600;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--ink-500);
  }

  .auction-fees__table tbody tr:last-child td {
    border-bottom: 1px solid var(--line-100);
  }

  .auction-fees__table tbody tr td:last-child {
    border-bottom: 0;
  }

  .auction-fees__table caption {
    padding: 0 0 1rem;
    border-top: 0;
  }
}

/* -- Every auction house, as plain links --------------------------------- */
.auction-hub-houses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem 1.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-display);
}

.auction-hub-houses li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line-200);
}

.auction-hub-houses a {
  font-weight: 600;
  color: var(--teal-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auction-hub-houses span {
  display: block;
  margin-top: 0.15rem;
  font-size: var(--text-meta);
  color: var(--ink-500);
}

/* -- The box on an auction house page ------------------------------------ */
.house-rules {
  margin-top: 2.5rem;
}

.house-rules__list {
  margin: 1.25rem 0 0;
  border-top: 1px solid var(--line-200);
  font-family: var(--font-display);
}

.house-rules__row {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-200);
}

.house-rules__row dt {
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--ink-500);
  padding-top: 0.2rem;
}

.house-rules__row dd {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-700);
}

.house-rules__bill {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--teal-700);
  border-radius: 0 6px 6px 0;
  background: #f3f6f5;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-700);
}

.house-rules__notes {
  margin: 1.25rem 0 0;
  padding-left: 1.25rem;
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

.house-rules__source {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: var(--text-meta);
  line-height: 1.55;
  color: var(--ink-500);
}

.house-rules__source a {
  color: var(--teal-700);
}

@media (max-width: 600px) {
  .house-rules__row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
