/*
 * Styles for WordPress core blocks used in posts and pages.
 * Plain CSS, not part of the Gulp build: enqueued as-is by lib/setup.php.
 */

/* ── Button (core/button) ──────────────────────────────────────────
 * From the Mitsou Magazine design system (Button component): square,
 * 44px tall, black fill, uppercase tracked label, trailing chevron.
 * Futura instead of Sofia Pro, at the weight the site loads (400).
 * Styles: default = black fill; "Contour" (is-style-outline) = 1px black
 * border; "Rose" (is-style-feather) = Feather fill, ink label.
 * Colours, radius and width set in the editor still win (inline styles
 * and has-* classes), so a pill is just a radius setting.
 */
.wp-block-button .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-sizing: border-box;
  min-height: 44px;
  padding: 12px 26px;
  border: 0;
  border-radius: 0;
  background-color: #000;
  background-image: none; /* drops the theme's underline on article links */
  color: #fff;
  font-family: futura, Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  box-shadow: none;
  transition: background-color .2s ease-out, opacity .2s ease-out;
}

.wp-block-button .wp-block-button__link::after {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus {
  color: #fff;
  text-decoration: none;
  background-color: rgba(0, 0, 0, .8);
}
.wp-block-button .wp-block-button__link:active { opacity: .88; }
.wp-block-button .wp-block-button__link:focus { outline: none; }
.wp-block-button .wp-block-button__link:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

/* Outline ("Contour"). The :not() parts match core's own outline selectors,
   which would otherwise win on specificity. */
.wp-block-button.is-style-outline > .wp-block-button__link {
  padding: 11px 25px;
  border: 1px solid currentColor;
}
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background) { background-color: transparent; }
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) { color: #000; }
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):hover,
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):focus {
  background-color: #f3dede;
}

/* Feather ("Rose") */
.wp-block-button.is-style-feather > .wp-block-button__link {
  background-color: #f3dede;
  color: #161616;
}
.wp-block-button.is-style-feather > .wp-block-button__link:hover,
.wp-block-button.is-style-feather > .wp-block-button__link:focus {
  background-color: rgba(243, 222, 222, .8);
  color: #161616;
}

/* Gap between buttons side by side (space-3). Zero specificity: a block
   spacing chosen in the editor still wins. */
:where(.wp-block-buttons.is-layout-flex) { gap: 12px; }

/* Spacing in an article: visually the same gap as between two paragraphs.
   Paragraphs are 0.75em apart plus their half-leading (line-height 1.75,
   so 0.375em on each side); a button has no leading, so 0.75 + 0.375. */
.article__row--text .wp-block-buttons {
  margin-top: 1.125em;
  margin-bottom: 0;
}
.article__row--text .wp-block-buttons:first-child { margin-top: 0; }
.article__row--text .wp-block-buttons + * { margin-top: 1.125em; }

@media (prefers-reduced-motion: reduce) {
  .wp-block-button .wp-block-button__link { transition: none; }
}
