/**
 * Press review
 * One of the stylesheets of the website, loaded in a fixed order by php/include/header.php
 * (list and order: AGENTS.md, "Stylesheets").
 */

/**
 * @section Press
 */
ul#articles {
  list-style: none;
}
/* (only the articles: their categories are a list, too)
   one article: the preview (or the logo of the newspaper) left, the texts right */
ul#articles > li {
  --article-thumb: 120px;

  background: transparent url(/img/press.png) left 0.5em / var(--article-thumb) auto no-repeat;
  column-gap: 20px;
  display: grid;
  grid-template-columns: var(--article-thumb) minmax(0, 1fr);
  margin: 0.5em 0 1.5em;
  min-height: 130px;
  padding-top: 0.5em;
}
ul#articles > li > * {
  grid-column: 2;
}
ul#articles > li h2 {
  font-style: italic;
  font-weight: bold;
  margin: 0 !important;
}
ul#articles > li h2 a {
  color: inherit;
  text-decoration: none;
}
ul#articles > li h2 a:hover,
ul#articles > li h2 a:focus {
  text-decoration: underline;
}
ul#articles > li .article-meta {
  display: block;
}
/* preview of the cut-out article (Cron::press()) in place of the newspaper logo */
ul#articles > li.has-thumb {
  background: none;
}
ul#articles > li a.article-thumb {
  grid-column: 1;
  grid-row: 1 / span 10;
  margin: 0;
}
ul#articles > li a.article-thumb img {
  border: 1px solid var(--color-lightgray);
  box-shadow: 0 1px 3px var(--color-shadow);
  display: block;
  max-height: 160px;
  object-fit: cover;
  object-position: top;
  width: 100%;
}
ul#articles ul.categories,
.press-article ul.categories {
  display: flex;
  flex-wrap: wrap;
  margin: 0.3em 0 0 3px;
  padding: 0;
}
/* list and page of an article – wide: the categories at the end of the line with date and paper;
   narrow: in a line of their own */
@media (min-width: 991px) {
  ul#articles > li .article-meta-row,
  .press-article .article-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 1em;
  }
  /* 3px on both sides make up for the negative margin of the tags (ul.categories li) */
  ul#articles > li .article-meta-row ul.categories,
  .press-article .article-meta-row ul.categories {
    margin: 0 3px 0 auto;
  }
}
ul#articles > li p.article-summary {
  margin: 0.4em 0 0;
}
ul#articles > li p.article-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25em 1.25em;
  margin: 0.4em 0 0;
}
ul#articles > li p.article-links .icon,
.press-article-bar .icon {
  margin-right: 0.3em;
}
/* page of one article (modules/press/page.Article.php) */
.press-article-bar {
  margin-bottom: 1em;
}
.press-article-bar .press-download {
  margin-left: auto;
}
.press-article header h2 {
  margin: 0 0 0.2em;
}
.press-article-meta {
  margin: 0;
}
.press-article-summary {
  margin: 0.8em 0 0;
  padding: 0.6em 0.9em;
  background: var(--color-yellow-transparent-light);
  border-left: 4px solid var(--color-yellow);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}
/* full text left, the article as printed right; on phones one below the other */
.press-article-body {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1.5em 2em;
  align-items: start;
  margin-top: 1.5em;
}
.press-article-body.no-pages {
  grid-template-columns: minmax(0, 1fr);
}
.press-article-text > :first-child {
  margin-top: 0;
}
.press-article-text h2 {
  font-size: 1.4em;
}
.press-article-text h3 {
  font-size: 1.15em;
}
.press-article-text h4 {
  font-size: 1em;
  font-weight: normal;
  font-style: italic;
  margin-top: 0.3em;
}
.press-article-text p.caption {
  color: var(--color-gray);
  font-size: 0.9em;
  font-style: italic;
}
/* info box of the article (not the sidebar of the page, also an <aside>) */
.press-article-text aside {
  display: block;
  width: auto;
  margin: 1em 0;
  padding: 0.2em 1em 0.5em;
  background: var(--color-ultralightgray);
  border: 1px solid var(--color-lightgray);
  border-radius: var(--border-radius);
}
.press-article-text aside > * {
  padding: 0;
}
.press-article-pages {
  display: flex;
  flex-direction: column;
  gap: 1em;
}
.press-article-pages a.press-page {
  display: block;
  cursor: zoom-in;
}
.press-article-pages img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-lightgray);
  box-shadow: 0 1px 3px var(--color-shadow);
}
@media (max-width: 700px) {
  .press-article-body {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* phones: both buttons fill their line (side by side or one below the other) */
@media (max-width: 640px) {
  .press-article-bar > .filter-btn {
    flex: 1 1 auto;
  }
}
/* the search is part of the filter bar (css/filter.css) */
p.press-search-result {
  font-style: italic;
}

/* phones and narrow windows (the sidebar moves below the content) */
@media (max-width: 990px) {
  ul#articles > li {
    --article-thumb: 60px;

    column-gap: 12px;
    min-height: 0;
  }
  ul#articles > li a.article-thumb img {
    max-height: 80px;
  }
}
