/**
 * Site customizations for pages using Bootstrap 5 (see _Layout5.cshtml).
 * Bootstrap 3 pages continue to use custom.css; when a page is migrated,
 * move/adapt any styles it needs from custom.css into this file.
 */

/**
 * General Customizations
 */

/* This makes room for the fixed nav bar. */
body {
  padding-top: 70px;
}

/* Bootstrap 5 underlines all links by default; restore the Bootstrap 3 behavior
 * (underline on hover only) to match the rest of the site. */
a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Centers the footer and adds some extra space at the bottom of the page. */
footer {
  text-align: center;
  margin-bottom: 20px;
}

/* Use Montserrat for all headers, it's pretty. */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: 'Montserrat','Helvetica Neue',Helvetica,Arial,sans-serif;
  font-weight: 400;
}

/**
 * Misc
 */

.clear {
  clear: both;
}

.clear.left {
  clear: left;
}

.clear.right {
  clear: right;
}

/**
 * Navbar Customizations
 */

/* Paprika logo in nav bar should be Futura in red. */
.navbar .navbar-brand {
  color: #d10505;
  font-family: Futura,"futura-pt",sans-serif;
  font-size: 24px;
}

/* Use Montserrat for the menu font. */
#menu .nav-link {
  font-weight: 400;
  text-transform: uppercase;
  font-family: 'Montserrat','Helvetica Neue',Helvetica,Arial,sans-serif;
}

/**
 * Bootstrap Overrides
 */

/* Set the table headings to slightly off-white. */
.table-bordered tr.heading > td, .table-bordered tr.heading > th {
  background-color: #fafafa;
}

/* Change the default 2px bottom border to 1px. */
.table-bordered > thead > tr > th, .table-bordered > thead > tr > td {
    border-bottom-width: 1px;
}

.btn-paragraph {
  margin-bottom: 10px;
}

/**
 * Home Page
 */

#splash {
  background:url("../images/feature_images/pepper_bg_blur_crop.jpg") center center;
  border-radius:5px;
  margin-bottom:10px;
  background-size: cover;
}

#tagline {
  letter-spacing: 6px;
  font-family: Futura,"futura-pt",sans-serif;
  font-weight: normal;
  text-align: center;
  color: #fff;
  font-size:50px;
}

#sub_tagline {
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: Futura,"futura-pt",sans-serif;
  font-weight: normal;
  text-align: center;
  color: #fff;
  font-size:20px;
}

@media (min-width: 768px) {

  #splash {
    border-radius: 10px;
    margin-top:10px;
    margin-bottom:30px;
  }

  #tagline {
    font-size: 80px;
    letter-spacing: 8px;
  }

  #sub_tagline {
    letter-spacing: 4px;
    font-size:30px;
  }

}

/* Increase font size for the "What Is Paprika?" text. Also used in Windows page. */
#what-is {
  font-size: 16px;
}

/* Center the Downloads, Our Best Features, Screenshots, and Press headings. */
.heading {
  text-align: center;
  margin-bottom: 20px;
}

/* Center aligns the images and text for each download link. */
.download {
  margin-top: 20px;
  text-align: center;
}

/* Center the pricing note. */
#pricing-note {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
}

/* Add extra spacing below the features. */
.feature {
  margin: 20px 0 20px 0;
}

/* Bootstrap 5 has no panels; cards are the equivalent. This makes card headers
 * that contain a link use their normal color instead of the blue link color,
 * and removes the outline around the link when it is clicked. */
.card-header > a {
  color: inherit;
  outline-style: none;
}

/* Adds a bit more vertical space between the heading and the accordion, centers it better vertically. */
#screenshots-accordion {
  margin-top: 40px;
}

/* Adds a bit more vertical space between the screenshot thumbnails and the top of the accordion panel. */
.screenshot.thumbnail {
  margin-top: 20px;
}

/* Center the press images. */
#press {
  text-align: center;
}

/* Space out the images a bit better. */
#press img {
  margin: 20px;
}

/* Kills the underline that appears on hover over the images. */
#press a:hover {
  text-decoration: none;
}

/*
 * Windows buy page
 */

#windows-intro-image {
  margin-top: 10px;
  border: 1px solid #DDDDDD;
}

/* Right-aligns the image on large devices. */
@media (min-width: 768px) {

  #windows-intro-image {
    float: right;
  }

}

/* Centers the image on small devices. */
@media (max-width: 768px) {

  #windows-intro-image {
    margin: 0 auto;
  }

}

#windows-intro-header {
  color: #d10505;
  font-family: Futura,"futura-pt",sans-serif;
}

#windows-intro-text {
  font-size: 16px;
  margin-top: 15px;
  margin-bottom: 15px;
}

#windows-intro-buttons {
  margin-top: 20px;
}

#windows-intro-buttons a {
  margin-bottom: 10px;
  margin-right: 10px;
}

#windows-intro-requirements {
  margin-top: 10px;
  font-size: 13px;
}

#windows-features {
  font-size: 16px;
}

.windows-caption {
  margin-top: 10px;
  font-size: 13px;
  font-style: italic;
}

/**
 * Help Pages
 */

/* Keep anchor targets from hiding under the fixed navbar. This covers every way the page
 * scrolls to a heading -- a click in the sidebar, a link from another section, an anchor in
 * the address bar -- not only the element that happens to be :target. */
.help[id],
.help [id] {
  scroll-margin-top: 80px;
}

/* Every other page on the site sits in a centred, max-width container. A guide does not: the
 * outline belongs against the left edge of the window, and on a wide display the centred
 * container starts a fifth of the way across. Widening it here, keyed off the guide's own
 * wrapper, leaves _Layout5 alone for every other page -- including the navbar, which is
 * matched too so the brand keeps lining up with the outline below it. Browsers without :has()
 * simply get the centred layout. */
@media (min-width: 992px) {
  .container:has(> .help-layout),
  body:has(.help-layout) .navbar > .container {
    max-width: none;
    padding-left: 24px;
    padding-right: 24px;
  }

  /* A share of the window would make the outline 600px wide on a large display, and the prose
   * beside it unreadably long, so both are given a width instead. */
  .help-layout > .help-toc {
    flex: 0 0 260px;
    max-width: 260px;
  }

  /* Basis zero rather than the column's 75%, or the two together overflow the row just above
   * the breakpoint and the prose wraps underneath the outline. min-width lets it shrink past
   * the width of a wide table.
   *
   * The margin centres the prose in the window rather than in whatever room is left beside
   * the outline. It clamps at zero, so on a narrower window the prose simply sits against the
   * outline instead of being pushed into it; the two meet at about 1500px. */
  .help-layout > .col-lg-9 {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: 960px;
    margin-left: max(0px, calc(50vw - 752px));
  }
}

/* The link to whichever of the two views you are not reading, under the intro. */
.help-view {
  margin: 20px 0;
}

/* Previous and next, at the foot of a guide section's own page -- and of a news post, and the news index. */
.help-pager {
  display: flex;
  gap: 20px;
  margin: 40px 0 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.help-pager a {
  flex: 0 1 45%;
  padding: 10px 14px;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  color: #333;
}

.help-pager a:hover {
  border-color: #d10505;
  color: #d10505;
  text-decoration: none;
}

/* The next link sits against the right edge even when there is no previous one. */
.help-pager .next {
  margin-left: auto;
  text-align: right;
}

.help-pager span {
  display: block;
  font-size: 12px;
  color: #777;
}

/* The sidebar outline, a column from the lg breakpoint up. align-self is load bearing: the
 * sidebar is a flex item in a .row, so without it the column stretches to the full height of
 * the content beside it and sticky positioning never has anywhere to stick.
 *
 * All of this is lg and up only. Below it the same element is Bootstrap's offcanvas drawer,
 * which is position: fixed -- and this stylesheet loads after Bootstrap's, so a sticky here
 * at every width would win and pin the closed drawer into the page. */
@media (min-width: 992px) {
  .help-toc {
    position: sticky;
    top: 80px;
    align-self: flex-start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-top: 10px;
    padding-bottom: 20px;
  }

  /* The rail runs down the column's gutter rather than beside the text, so the entries still
   * start where the rest of the page does -- the brand in the navbar, and the headings in the
   * column alongside. Dropping the left gutter here and spending it on the rail and its gap is
   * what keeps the two lined up; setting the padding shorthand instead would take the right
   * gutter with it. */
  .help-toc {
    padding-left: 0;
  }
}

/* Below lg: the sidebar as a drawer from the left, over the navbar, scrolling on its own. The
 * entries are a little larger than in the column, to be tapped rather than clicked. */
@media (max-width: 991.98px) {
  .help-toc {
    --bs-offcanvas-width: min(320px, 85vw);
    overflow-y: auto;
    padding: 0 16px 24px;
  }

  /* The title and close button stay at the top of the drawer while its list scrolls, which
   * it does as soon as it opens: it scrolls to the entry the reader is at. */
  .help-toc .offcanvas-header {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 16px 0 12px;
    background: #fff;
  }

  .help-toc .offcanvas-title {
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
  }

  .help-toc .help-platforms {
    margin-left: 0;
  }

  .help-toc .nav-link {
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 15px;
  }

  .help-toc > .nav > .nav-item > .nav-link {
    font-size: 16px;
  }

  /* The bar below adds its height to the navbar's, so a heading jumped to has to stop that
   * much lower to land clear of both. */
  .help[id],
  .help [id] {
    scroll-margin-top: 130px;
  }
}

/* The drawer's handle below lg: a bar that stays under the fixed navbar as the page scrolls,
 * reading Contents and the heading the reader has reached. It runs the width of the column,
 * out into the gutters, with a white ground so the prose scrolls out of sight beneath it. */
.help-toc-bar {
  position: sticky;
  top: 63px;
  z-index: 1020;
  margin: -10px -12px 16px;
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.help-toc-bar button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 10px;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  color: #333;
  background: #fff;
  border: 1px solid #d6d6d6;
  border-radius: 6px;
}

.help-toc-bar svg {
  flex: none;
  width: 20px;
  height: 20px;
}

.help-toc-bar-title {
  flex: none;
  font-weight: 600;
}

/* The heading the reader is in, cut short with an ellipsis rather than wrapping the bar onto
 * a second line. */
.help-toc-bar-current {
  min-width: 0;
  padding-left: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #777;
  border-left: 1px solid #ddd;
}

.help-toc .nav-link {
  padding: 3px 0 3px 10px;
  font-size: 13px;
  line-height: 1.4;
  color: #555;
  border-left: 2px solid #e3e3e3;
}

.help-toc .nav-link:hover {
  color: #d10505;
  text-decoration: none;
  border-left-color: #bbb;
}

/* Which platform's guide this is, above the outline: the current one filled in, the others a
 * click away. Indented to where the outline's text starts, clear of the rail. */
.help-platforms {
  margin: 0 0 18px 12px;
}

.help-platforms-title {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #777;
}

.help-platforms-list {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid #d6d6d6;
  border-radius: 6px;
  overflow: hidden;
}

.help-platforms-list li {
  flex: 1 1 auto;
}

.help-platforms-list li + li > * {
  border-left: 1px solid #d6d6d6;
}

.help-platforms-list a,
.help-platforms-list span {
  display: block;
  padding: 5px 6px;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  color: #555;
}

.help-platforms-list a:hover {
  color: #d10505;
  text-decoration: none;
  background: #fbf3f3;
}

.help-platforms-list .active {
  font-weight: 600;
  color: #fff;
  background: #d10505;
}

/* help-guide.js marks the current entry and every level above it. */
.help-toc .nav-link.active {
  color: #d10505;
  font-weight: 600;
}

/* The rail marks one place: the entry itself, not its section as well. */
.help-toc .nav-link.current {
  border-left-color: #d10505;
}

/* Sections are the first level; their headings are indented under them. */
.help-toc > .nav > .nav-item > .nav-link {
  font-weight: 600;
  font-size: 14px;
}

.help-toc .nav .nav .nav-link {
  padding-left: 24px;
}

/* Bootstrap 3 components used heavily by the user guides that Bootstrap 5 dropped,
 * recreated here so the guide markup carries over. */
.page-header {
  padding-bottom: 9px;
  margin: 40px 0 20px;
  border-bottom: 1px solid #eee;
}

.page-header h1 small {
  font-size: 65%;
  font-weight: 400;
  color: #777;
}

.well {
  min-height: 20px;
  padding: 19px;
  margin-bottom: 20px;
  background-color: #f5f5f5;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}

.pre-scrollable {
  max-height: 340px;
  overflow-y: scroll;
}

.help img {
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-top: 10px;
  margin-bottom: 10px;
}

.help img.left {
  float: left;
  margin: 0 20px 20px 0;
}

.help img.right {
  float: right;
  margin: 0 0 20px 20px;
}

/* A section's reference figure: one screenshot of the screen it describes, numbered callouts
 * over the controls the prose talks about, and a legend beside it linking each to its
 * subsection. help-guide.js lights a callout and its legend entry together on hover, and keeps
 * the one for the subsection being read lit as the page scrolls.
 *
 * Callouts are positioned in percentages of the picture, written inline by HelpPage, so they
 * hold at every width. The stage does not clip: a callout on a control at the edge of the
 * screen hangs its number past the picture rather than losing it. */
.help-figure {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px 24px;
  align-items: start;
  margin: 24px 0 8px;
}

@media (min-width: 768px) {
  .help-figure {
    grid-template-columns: minmax(0, 1fr) 220px;
  }

  /* A phone screen is taller than it is wide. Across the column it would be the height of
   * three windows, so it sits at a phone's width with the legend taking the rest. */
  .help-figure.portrait {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

/* The width is set rather than left to the image: with auto margins a grid item shrinks to
 * its content, and a lazy image not yet loaded has none. */
.help-figure.portrait .help-figure-stage {
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.help-figure-stage {
  position: relative;
  margin-top: 14px;
  line-height: 0;
  background-color: #f5f5f5;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
}

/* Not the border and shadow .help img gives a screenshot in the prose; the stage carries those. */
.help-figure-stage img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 5px;
  box-shadow: none;
}

/* Where a figure will go once its screenshot has been captured. Development only. */
.help-figure-missing {
  aspect-ratio: 16 / 10;
  line-height: 1.5;
}

.help-figure-missing p {
  margin: 20px;
  color: #6c757d;
}

.help-callout {
  position: absolute;
  font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
  transition: box-shadow 120ms ease, background-color 120ms ease;
}

/* A pin is a ring centred on its point and a region an outline round its pane, both open so
 * the control shows through. The number sits on a corner of it, the way a notification badge
 * sits on an icon: touching it, so there is no question which control it belongs to, and
 * outside it, so it hides nothing of that control. help-guide.js picks the corner. */
.help-callout.pin {
  --corner: 16px;
  --edge: 25px;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 2.5px solid #d10505;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.8);
}

/* A phone's controls are drawn about three times the size of a desktop's at the width the
 * figure is shown, and a ring that fits a toolbar button on the Mac sits inside one on iOS. */
.help-figure.portrait .help-callout.pin {
  --corner: 19px;
  --edge: 29px;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-width: 3px;
}

.help-callout.region {
  border: 2px solid #d10505;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.7);
}

/* The badge's size and how far it stands off a region are variables, so a narrow screen can
 * shrink them in one place below. */
.help-figure {
  --badge: 22px;
  --off: 17px;
}

.help-callout > span {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--badge);
  height: var(--badge);
  border-radius: 50%;
  background-color: #d10505;
  color: #fff;
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 120ms ease;
}

/* On a pin the badge is centred --corner out from the ring's centre on each axis, which puts
 * its edge on the ring's stroke and none of it over what the ring encloses. Where controls sit
 * too close for a corner, it goes straight above, below or beside, --edge out. */
.help-callout.pin > span {
  top: calc(50% - var(--badge) / 2);
  left: calc(50% - var(--badge) / 2);
}

.help-callout.pin.ne > span { margin: calc(-1 * var(--corner)) 0 0 var(--corner); }
.help-callout.pin.nw > span { margin: calc(-1 * var(--corner)) 0 0 calc(-1 * var(--corner)); }
.help-callout.pin.se > span { margin: var(--corner) 0 0 var(--corner); }
.help-callout.pin.sw > span { margin: var(--corner) 0 0 calc(-1 * var(--corner)); }
.help-callout.pin.n > span { margin-top: calc(-1 * var(--edge)); }
.help-callout.pin.s > span { margin-top: var(--edge); }
.help-callout.pin.e > span { margin-left: var(--edge); }
.help-callout.pin.w > span { margin-left: calc(-1 * var(--edge)); }

/* On a region it is centred just outside the corner, over the outline, or rests against the
 * middle of an edge -- clear of it, since a region can be a thin one round a single line of
 * text. */
.help-callout.region.nw > span { top: calc(-1 * var(--off)); left: calc(-1 * var(--off)); }
.help-callout.region.ne > span { top: calc(-1 * var(--off)); right: calc(-1 * var(--off)); }
.help-callout.region.sw > span { bottom: calc(-1 * var(--off)); left: calc(-1 * var(--off)); }
.help-callout.region.se > span { bottom: calc(-1 * var(--off)); right: calc(-1 * var(--off)); }
.help-callout.region.n > span { top: calc(-2px - var(--badge)); left: calc(50% - var(--badge) / 2); }
.help-callout.region.s > span { bottom: calc(-2px - var(--badge)); left: calc(50% - var(--badge) / 2); }
.help-callout.region.e > span { right: calc(-2px - var(--badge)); top: calc(50% - var(--badge) / 2); }
.help-callout.region.w > span { left: calc(-2px - var(--badge)); top: calc(50% - var(--badge) / 2); }

/* On a phone a desktop screenshot is shown at a third of its size, where full-size rings and
 * numbers would crowd each other. */
@media (max-width: 575.98px) {
  .help-figure:not(.portrait) {
    --badge: 17px;
    --off: 13px;
  }

  .help-figure:not(.portrait) .help-callout {
    font-size: 10px;
  }

  .help-figure:not(.portrait) .help-callout.pin {
    --corner: 12px;
    --edge: 19px;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border-width: 2px;
  }
}

.help-callout.hot,
.help-callout.current {
  background-color: rgba(209, 5, 5, 0.09);
}

.help-callout.pin.hot,
.help-callout.pin.current {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 0 0 6px rgba(209, 5, 5, 0.32);
}

.help-callout.region.hot,
.help-callout.region.current {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 0 0 6px rgba(209, 5, 5, 0.32);
}

.help-callout.hot > span,
.help-callout.current > span {
  transform: scale(1.15);
}

.help-figure-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: callout;
  font-size: 0.92rem;
  line-height: 1.35;
}

.help-figure-legend li {
  margin: 0;
}

.help-figure-legend a {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  padding: 6px 8px 6px 6px;
  border-left: 2px solid transparent;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}

.help-figure-legend a::before {
  counter-increment: callout;
  content: counter(callout);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background-color: #d10505;
  color: #fff;
  font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 12px;
}

.help-figure-legend a small {
  display: block;
  color: #6c757d;
  font-size: 0.82rem;
}

.help-figure-legend a:hover,
.help-figure-legend a.hot {
  background-color: rgba(209, 5, 5, 0.09);
}

.help-figure-legend a.current {
  border-left-color: #d10505;
}

.help-figure-legend a:focus-visible {
  outline: 3px solid rgba(209, 5, 5, 0.32);
}

.help-figure figcaption {
  grid-column: 1 / -1;
  margin-top: -4px;
  color: #6c757d;
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  .help-callout,
  .help-callout > span {
    transition: none;
  }
}

@media print {
  .help-figure {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The rules between subsections carry bootstrap's 1rem, which is the same gap as between
 * two paragraphs and so does not read as a break at all. clear is what puts the rule below
 * a floated screenshot rather than beside it.
 *
 * The colour matches the borders under a page header and above the pager. Bootstrap draws an
 * hr in the text colour at a quarter opacity, which comes out darker than those and makes the
 * three kinds of horizontal line on a guide page look like two. */
.help hr {
  clear: both;
  margin: 40px 0;
  border-top-color: #eee;
  opacity: 1;
}

.help table {
  margin-top: 20px;
}

/* Use letters first nested outline level. */
.help ol > li > ol {
  list-style: lower-alpha;
}

/* Use Roman numerals for second nested outline level. */
.help ol > li > ol > li > ol {
  list-style: lower-roman;
}

/* Markdig's alert blocks ("> [!NOTE]" and friends) come with markup but no styling: a
 * div.markdown-alert, a title paragraph holding an inline svg icon and the word, then the
 * text. Drawn as a bar on the left over a tinted panel. A Note keeps the [[Note]] badge's
 * blue but mutes it: bootstrap's info-bg-subtle is loud enough to pull the eye off the page.
 * The other kinds use bootstrap's subtle colours as they are. Scoped to the whole guide layout
 * rather than .help, because the beta banner above each page's title is an alert too and sits
 * outside the .help section it heads -- and to news posts, which write them the same way. */
:is(.help-layout, .post) .markdown-alert {
  --alert-color: #31606e;
  --alert-border: #8fc3d3;
  --alert-bg: #f2f8fa;
  margin: 20px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--alert-border);
  border-radius: 4px;
  background-color: var(--alert-bg);
}

:is(.help-layout, .post) .markdown-alert-tip {
  --alert-color: var(--bs-success-text-emphasis);
  --alert-border: var(--bs-success);
  --alert-bg: var(--bs-success-bg-subtle);
}

:is(.help-layout, .post) .markdown-alert-important {
  --alert-color: var(--bs-primary-text-emphasis);
  --alert-border: var(--bs-primary);
  --alert-bg: var(--bs-primary-bg-subtle);
}

:is(.help-layout, .post) .markdown-alert-warning {
  --alert-color: var(--bs-warning-text-emphasis);
  --alert-border: var(--bs-warning);
  --alert-bg: var(--bs-warning-bg-subtle);
}

:is(.help-layout, .post) .markdown-alert-caution {
  --alert-color: var(--bs-danger-text-emphasis);
  --alert-border: var(--bs-danger);
  --alert-bg: var(--bs-danger-bg-subtle);
}

:is(.help-layout, .post) .markdown-alert-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-weight: 600;
  color: var(--alert-color);
}

:is(.help-layout, .post) .markdown-alert-title svg {
  flex-shrink: 0;
  fill: currentColor;
}

:is(.help-layout, .post) .markdown-alert > :last-child {
  margin-bottom: 0;
}

/* A [[Save]] or [[icon:plus-lg]] badge is a control the reader presses, drawn in the apps' blue
 * button colour (BlueButton in paprika-swift) rather than Bootstrap's grey. */
.help .text-bg-button {
  color: #fff;
  background-color: #4990e2;
}

/* The Paprika 4 guides set their text looser than Bootstrap's 1.5, which is exactly as tall as
 * a button: buttons on neighbouring lines would touch. Headings and the figure legends set
 * their own line heights and are unaffected. */
.help-layout .help {
  line-height: 1.75;
}

/* Buttons are 2em tall (24px against a 28px line), so a text button and an icon button beside
 * it are the same height. On the baseline a button hangs a couple of pixels low; raising it
 * centres it on the words. */
.help .badge.text-bg-button {
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  vertical-align: 0.17em;
}

/* A [[Premium]] chip after a heading's text, as What's New marks the features that need a
 * subscription. Bootstrap sizes a badge at .75em of its parent, which in a heading comes out
 * nearly as big as the words it follows, and in the headings' Montserrat. A rem size and the
 * body font make it the same chip as one at the end of a line of body text, and middle
 * alignment centres it on the heading's words. */
.help h3 .badge,
.help h4 .badge {
  margin-left: 6px;
  font-family: var(--bs-body-font-family);
  font-size: 0.75rem;
  vertical-align: middle;
}

/* [[icon:name]] draws a Bootstrap Icons glyph inside the badge. The svg carries no size of its
 * own, so it is set here in ems to follow the badge's text. It is drawn larger than the text,
 * centred in a flex badge of the same 2em height as a text button; one with no label is as wide
 * as it is tall, a square like the button it stands for. A glyph followed by a label -- which
 * the renderer marks, since the label is a bare text node css cannot select -- gets a gap. */
.help .badge.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2em;
  padding-top: 0;
  padding-bottom: 0;
  /* A flex badge's baseline is the foot of the glyph rather than the text's, which lifts it off
   * the line; this drops it so it is centred on the same line as the text badges beside it. */
  vertical-align: -0.2em;
}

.help .badge.help-icon svg {
  width: 1.4em;
  height: 1.4em;
}

.help .badge.help-icon:not(.help-icon-label) {
  width: 2em;
  padding-left: 0;
  padding-right: 0;
}

.help .badge.help-icon-label svg {
  margin-right: 0.35em;
}

/* A ✓ alone in a table cell, which the renderer swaps for a check icon: green, and larger than
 * the text around it, so an included feature stands out from an empty cell. */
.help td.help-check svg {
  width: 1.4em;
  height: 1.4em;
  color: #198754;
  vertical-align: -0.3em;
}

/**
 * Forms
 */

/* Extra top and bottom margin separates the first form field from the text above. Used on
 * the password reset, bookmarklet login, change email, and supported sites search forms. */
form {
  margin: 20px 0;
}

/* Prevent zooming on search field */
form input[type="search"] {
  font-size: 18px;
  width: 100%;
  border: 1px solid #ccc;
}

/* Remove padding from error lists. */
div.validation-summary-errors ul {
  padding: 0;
}

/* Make error lists red and italic and remove list indicators. */
div.validation-summary-errors ul li {
  list-style-type: none;
  color: #b94a48;
  font-style: italic;
}

/**
 * Single panels (cards in Bootstrap 5). Used for bookmarklet, password reset, but also in the blog.
 */

/* Push the card away from the nav bar. */
.card-single {
  margin-top: 20px;
}

/* Increases padding on single cards from 1rem to 20px. */
.card-single .card-body {
  padding: 20px;
}

/* Same layout as form-text except italicized. */
.error-block {
  display: block;
  margin-top: 5px;
  margin-bottom: 10px;
  color: #b94a48;
  font-style: italic;
}

/**
 * Sites
 */

/* Adds a bit more vertical space between the heading and the accordion, centers it better vertically. */
#recommended-sites {
  margin-top: 20px;
}

/* Removes default bottom padding, so the last element doesn't end before the card does. */
#recommended-sites .card-body {
  padding: 0;
}

/* Removes default left padding and bottom margin, lets the inner link elements expand to fill the box. */
ul.sites {
  padding: 0;
  margin: 0;
}

/* Give each site link its own line, and make them big and easy to click. */
ul.sites li a {
  border-bottom: 1px solid #DDDDDD;
  display: block;
  padding: 10px 15px;
  position: relative;
}

/**
 * Bookmarklet
 */

/* Float the image left of the description on the login screen, with appropriate margins from the text. */
#bookmarklet img#example {
  float: left;
  margin: 0 20px 10px 0;
}

/* Customize sizing of bookmarklet 'Save Recipe' button. */
#bookmarklet a#script {
  font-size: 16px;
  color: #ffffff;
  background-color: #666666;
  padding: 5px 15px 5px;
  border-radius: 16px;
  text-decoration: none;
  text-shadow: 0 -1px #000000;
  margin: 10px 0 20px 0;
  display: inline-block;
}

/* Authorization */
#authorize-email {
  display: inline-block;
  margin: 10px 0 20px 0;
}

#authorize-logout {
  padding: 0;
  vertical-align: baseline;
}

/* Admin */
#statistics-days {
    margin-bottom: 20px;
}

/**
 * Windows screenshots
 */

/* Raw Windows app captures carry the app's own title bar, so the frame is only the Windows 11
 * corner, a hairline edge and a soft shadow -- no bezel. Mac shots use a larger radius. */
.win-frame {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 24px 48px -12px rgba(80, 20, 20, .25);
  background-color: #fff;
}
