/*
 * Zone `blog`: the editorial: its index and every article of it.
 *
 * Rules only that family of pages needs. Every page of it links this file
 * last of all, after `site.css`, so a rule written here answers for a rule of
 * the whole site at the same specificity; no other page links it at all.
 *
 * The theme already dresses almost everything the editorial prints: the row of
 * tabs, the search that folds down to its magnifier, the shapes a card photo is
 * boxed in, the fixed header, the share block, the step to the next article and
 * the two arrows of the most read list are all in the downloaded stylesheets.
 * What is missing is the scaffolding of the three widgets the origin loads
 * beside them — the grid the cards are placed on, the rails the carousel slides
 * along and the box the whole list of categories is read in — because each of
 * those ships its own stylesheet and the theme only paints the skin over it.
 * That scaffolding is what is here, together with the four rules the theme
 * hangs off a wrapper these pages do not have.
 */

/* ----------------------------------------------------------- the card grid */

/*
 * The cards are placed one by one by `blog.js`, which writes a left and a top
 * on each of them and a height on the list. They are taken out of the flow for
 * that, so the list has to be the box they are measured against — and the two
 * boxes the column width and the gap are read from must take up no room of
 * their own, or the first card would start below them.
 */
.the-edit .post-list-grid {
  position: relative;
}

.the-edit .post-list-grid .grid-sizer,
.the-edit .post-list-grid .gutter-sizer {
  position: absolute;
  top: 0;
  height: 0;
  pointer-events: none;
}

.the-edit .post-list-grid .editorial-post-item.is-placed {
  position: absolute;
  top: 0;
  left: 0;
  float: none;
}

/* The answer to a search nothing in the editorial matches. */
.the-edit .search-error-message {
  padding-bottom: 48px;
}

/* ------------------------------------------------------- the most read list */

/*
 * The rails of the carousel. The theme paints the slides and the two arrows and
 * takes it for granted that something else has laid the track out, so this is
 * that: one window, one row inside it, and the row stepped along by the script.
 */
.the-edit .popular-post-list.slick-slider {
  position: relative;
  display: block;
  box-sizing: border-box;
  touch-action: pan-y;
}

.the-edit .popular-post-list .slick-list {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.the-edit .popular-post-list .slick-track {
  position: relative;
  top: 0;
  left: 0;
  display: flex;
}

.the-edit .popular-post-list .slick-slide {
  display: block;
  box-sizing: border-box;
  flex: 0 0 auto;
  min-height: 1px;
}

.the-edit .popular-post-list.slick-slider .popular-post-item:not(:last-child) {
  margin-bottom: 0;
}

/* An arrow that cannot step any further says so rather than leading nowhere. */
.the-edit .popular-items-container .slick-arrow.slick-disabled {
  opacity: 0.3;
  cursor: default;
}

/* ------------------------------------------ what the page wrapper would say */

/*
 * The origin wraps every page in a `div.page-wrapper` and hangs four rules of
 * the editorial off it: the pale ground the index is laid on, and the three
 * that let an article with a banner run edge to edge and under the header —
 * which prints itself in white over the picture — with the trail on top of it.
 * The pages of this folder carry no such wrapper, so all four reach nothing:
 * the index comes out on white paper and the white header on white paper too.
 *
 * What is written here is those very rules with the one step the markup does
 * not have taken out. Nothing of the look is decided here: every value is the
 * one the theme set. The class they are keyed on carries a name this folder may
 * not write down, so what is matched is the part of it that is not the name.
 */

/* The ground the whole index is laid on. */
[class*='_blog-editorial-grid'] {
  background-color: #fbf6f6;
}

.the-edit[class*='_blog-editorial-view'] #maincontent {
  margin-top: -70px;
  padding: 0;
  max-width: 100%;
}

.the-edit[class*='_blog-editorial-view'] .breadcrumbs {
  position: absolute;
  top: 108px;
  z-index: 2;
}

.the-edit[class*='_blog-editorial-view'] .breadcrumbs .items .item a,
.the-edit[class*='_blog-editorial-view'] .breadcrumbs .items .item strong {
  color: #fff;
}

/* ------------------------------------------------- what the foot does not say */

/*
 * The origin prints no bar for booking an appointment at the foot of any page
 * of the editorial — not on the index and not on a single article, in any of
 * the five store views. This folder prints one, because the foot of the page
 * is read once per store view and printed on every page of it; on a narrow
 * screen that bar sits exactly where the editorial keeps its own, and the
 * reader cannot reach the categories at all.
 */
.blog-page .nav-button-home {
  display: none;
}

/* ----------------------------------------------------- the whole categories */

/*
 * The box the whole list of categories is read in. The theme dresses the inside
 * of it — the heading, the list, the glyph of the close button — and leaves the
 * frame to the widget of the shop, which this folder does not carry.
 */
.journal-categories-modal .modal-inner-wrap {
  box-sizing: border-box;
  width: 75%;
}

.journal-categories-modal .modal-header .action-close {
  background: none;
  border: none;
  cursor: pointer;
}

.journal-categories-modal .modal-header .action-close .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
