/* The Wine Routes brochure page (M2-ROUTES, SRC): the page image in a scrollable region, its zoom, the text equivalents, the downloads
   and the source file's facts. The design system's tokens only; the head, the notice, the tabs, the buttons are the shared ones
   (components.css, institution.css, places.css). */

.brochure-body {
  gap: var(--spacing-24);
}

/* The tabs sit directly under the notice and above the tools */
.brochure-body > .tabs {
  margin-bottom: calc(-1 * var(--spacing-8));
}

.brochure-tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-12);
}

.brochure-tools [hidden] {
  display: none;
}

.brochure-tools [aria-disabled="true"] {
  background: var(--color-surface-muted);
  color: var(--color-text-disabled);
  border-color: var(--color-border);
  cursor: not-allowed;
}

/* The page image: the whole page at the width of the column; zoomed, the region scrolls inside itself. */
.brochure-view {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow: auto;
  border: var(--border-width-1) solid var(--color-border);
  background: var(--color-surface);
}

.brochure-view[hidden] {
  display: none;
}

.brochure-view img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
}

.brochure-view[data-zoom="150"] img { width: 150%; }
.brochure-view[data-zoom="200"] img { width: 200%; }
.brochure-view[data-zoom="250"] img { width: 250%; }
.brochure-view[data-zoom="300"] img { width: 300%; }

.brochure-view figcaption {
  position: sticky;
  inset-inline-start: 0;
  padding: var(--spacing-8) var(--spacing-12);
  border-top: var(--border-width-1) solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

.brochure-section {
  display: grid;
  gap: var(--spacing-16);
  align-content: start;
}

.brochure-section h2 {
  margin: 0;
  overflow-wrap: anywhere;
}

.brochure-note,
.brochure-disclaimer {
  max-width: var(--size-44rem);
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

.brochure-disclaimer {
  color: var(--color-text);
  font-size: var(--font-size-16);
  line-height: var(--line-height-24);
}

.brochure-equivalents,
.brochure-downloads {
  display: grid;
  gap: var(--spacing-16);
  margin: 0;
  padding: 0;
  list-style: none;
}

.brochure-equivalents {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--size-16rem)), 1fr));
}

.brochure-equivalents li {
  display: grid;
  gap: var(--spacing-8);
  align-content: start;
  padding: var(--spacing-16);
  border: var(--border-width-1) solid var(--color-border);
  border-radius: var(--border-radius-8);
  background: var(--color-surface);
}

.brochure-equivalents p {
  margin: 0;
}

.brochure-equivalent-name {
  font-weight: var(--font-weight-semibold);
  overflow-wrap: anywhere;
}

.brochure-equivalent-text {
  color: var(--color-text-secondary);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

.brochure-equivalent-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-4) var(--spacing-16);
}

.brochure-equivalent-links .button.text {
  justify-content: flex-start;
  padding-inline: 0;
  text-align: start;
}

.brochure-downloads li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-12);
}

.brochure-file-meta {
  color: var(--color-text-secondary);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

.brochure-facts {
  display: grid;
  gap: var(--spacing-16);
  margin: 0;
}

@media (min-width: 768px) {
  .brochure-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.brochure-facts dt {
  color: var(--color-text-secondary);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

.brochure-facts dd {
  margin: var(--spacing-4) 0 0;
  overflow-wrap: anywhere;
}

.brochure-hash {
  font-family: inherit;
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
  overflow-wrap: anywhere;
  word-break: break-all;
}
