/**
 *  @package michael-travels-theme
 *
 *  Disclosures. Deliberately plain and legible rather than tucked away in
 *  small print: the point of keeping the record is that somebody can find it.
 */

.travels-disclosures {
  padding: var(--mt-space-5);
  background: var(--mt-ground-alt);
  border-radius: var(--mt-radius);
}

.background-alt .travels-disclosures {
  background: var(--mt-ground);
}

.travels-disclosures-heading {
  margin-bottom: var(--mt-space-3);
  font-family: var(--mt-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/**
 *  Two columns from tablet up.
 *
 *  These entries are short -- a company, a label, a line about what was
 *  provided -- and stacked one per row they ran a long way down the page for
 *  very little said. Side by side, a trip with several arrangements is taken
 *  in at a glance.
 *
 *  minmax(0, 1fr) rather than 1fr: a grid column's default minimum is its
 *  content, so a long unbroken company name or address would push the column
 *  wider than its share instead of wrapping inside it.
 */
.travels-disclosures-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--mt-space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

/**
 *  Two only when there are two.
 *
 *  A lone disclosure in a two-column grid sat in the left half of the panel
 *  with the right half empty, which reads as something missing rather than as
 *  a layout. On its own it takes the width it always had.
 */
@media screen and (min-width: 768px) {

  .travels-disclosures-list:has(> :nth-child(2)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--mt-space-6);
  }

}

/**
 *  The rule belongs to the entry, not to the gap between two of them.
 *
 *  It used to be a border-top on every entry after the first, which is the
 *  right idiom for a single stack and the wrong one for a grid: in two columns
 *  it drew a line above the second entry of the first row and none above the
 *  first. Every entry carries its own, so each column reads the same.
 */
.travels-disclosure {
  padding-top: var(--mt-space-3);
  border-top: 1px solid var(--mt-line);
}

.travels-disclosure-top {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mt-space-2);
  align-items: baseline;
  margin-bottom: var(--mt-space-1);
}

.travels-disclosure-company {
  font-weight: 600;
}

.travels-disclosure-label {
  padding: 3px 10px;
  border: 1px solid var(--mt-line);
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/**
 *  Complimentary and above is marked rather than left to blend in. A
 *  disclosure a reader has to hunt for is not really a disclosure.
 */
.travels-disclosure--grade-3 .travels-disclosure-label,
.travels-disclosure--grade-4 .travels-disclosure-label,
.travels-disclosure--grade-5 .travels-disclosure-label {
  background: var(--mt-accent);
  color: var(--mt-on-accent);
  border-color: var(--mt-accent);
}

.travels-disclosure-provided {
  margin: 0 0 var(--mt-space-1);
}

.travels-disclosure-statement {
  margin: 0;
  color: var(--mt-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.travels-disclosure-scope {
  margin: var(--mt-space-1) 0 0;
  color: var(--mt-muted);
  font-size: 0.8125rem;
  font-style: italic;
}
