/**
 * Display fixes for the static archive of ddd23.drupalcamp.at.
 *
 * Loaded after the theme's own CSS on every page. Fixes what broke when the
 * Drupal site moved to Drupal 10 (image width attributes, copyright badge
 * position) and gives a few images a size that suits the archive.
 */

/* Content images: Drupal 10 writes width="325" on images whose srcset goes up
   to 1300px, so photos stayed 325px wide in a ~980px column. Let them use the
   column, but keep portrait photos from becoming taller than the screen. The
   figure is sized exactly to the photo, so the "i" copyright badge and its
   caption sit on the photo instead of at the left edge of the column. */
.paragraph--type--image .media--type-image {
  /* --ratio (width / height) is written onto each figure by build/postprocess.py. */
  width: min(100%, 760px, calc(80vh * var(--ratio, 1.5)));
  margin: 0 auto 2rem;
}

.paragraph--type--image .media--type-image img {
  display: block;
  width: 100%;
  height: auto;
}

/* Site plan on the official party page: shown from the 600px version instead
   of the 220px thumbnail. */
img.static-map {
  display: block;
  width: min(100%, 420px);
  height: auto;
}

/* Sponsors page: the theme lays the levels out in a grid of narrow 305px cells,
   so every level stacked at the left of the white card. Give each level the full
   card width, its logos in a centred, wrapping row, and a little more size.
   The sidebar list on other pages (view-sponsors-sidebar) is not affected. */
.view-all-sponsors.view-display-id-block_2,
.view-all-sponsors.view-display-id-block_2 .view-content {
  display: block;
}

.view-all-sponsors.view-display-id-block_2 {
  padding: 2rem 2.5rem;
}

.view-all-sponsors.view-display-id-block_2 .views__content {
  width: 100%;
  float: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem 3rem;
  margin-bottom: 3rem;
}

.view-all-sponsors.view-display-id-block_2 .views__content > h3 {
  flex-basis: 100%;
  margin: 0;
  text-align: center;
}

.view-all-sponsors.view-display-id-block_2 .views-field {
  width: auto;
}

.view-all-sponsors.view-display-id-block_2 .sponsor-teaser {
  margin-bottom: 0;
}

.view-all-sponsors.view-display-id-block_2 .sponsor-teaser img {
  max-width: 160px;
  max-height: 90px;
  width: auto;
  height: auto;
}

.view-all-sponsors.view-display-id-block_2 .sponsor-teaser--level--platinum-sponsors img {
  max-width: 280px;
  max-height: 120px;
}

.view-all-sponsors.view-display-id-block_2 .sponsor-teaser--level--gold-sponsors img {
  max-width: 220px;
  max-height: 100px;
}

/* Venue map: link that replaces the embedded Google map. */
.static-map-link {
  display: inline-block;
  margin: 1rem 0 2rem;
}

/* Notice that replaces forms that cannot work on a static site. */
.static-notice {
  padding: 1rem 1.25rem;
  border-left: 4px solid currentColor;
  margin: 1.5rem 0;
}
