/*
 * Dish cards — the shared component, used in three places.
 *
 *   - the two related-dishes rows at the foot of a dish page
 *   - the "Dishes with <ingredient>" grid on an /ingredients/ page
 *   - the listing on a country, food-type or ingredient archive
 *
 * These rules used to live in dish.css scoped under the .wfa-dish body class,
 * which meant the cards rendered with no styling at all anywhere except a dish
 * page. They are unscoped here on purpose; nothing else in the atlas uses the
 * .wfa-rel* names.
 */
/* ----------------------------------------------------------------- related */
/* Two rows: the dish's own country, then its food type. Headings match the
   section slabs so the page reads as one design to the bottom. */
.wfa-related { margin: 44px 0 0; }

.wfa-relrow + .wfa-relrow { margin-top: 34px; }

.wfa-relcard {
  display: block;
  height: 100%;
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 3px solid var(--wfa-ink);
  box-shadow: 5px 5px 0 var(--wfa-ink);
  padding: 0 0 14px;
  overflow: hidden;
}

.wfa-relcard:hover { box-shadow: 5px 5px 0 var(--wfa-accent); }

.wfa-relcard:focus-visible { outline: 3px solid var(--wfa-accent); outline-offset: 3px; }

.wfa-relthumb { display: block; border-bottom: 3px solid var(--wfa-ink); margin-bottom: 12px; }

/* No illustration yet: the band names the food type rather than sitting blank. */
.wfa-relthumb.is-empty {
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wfa-accent);
}

.wfa-relthumb.is-empty i {
  font-family: Bangers, Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-style: normal;
  font-size: 21px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  opacity: .92;
  text-align: center;
  padding: 0 12px;
}

.wfa-relthumb img {
  display: block;
  width: 100%;
  height: 128px;
  object-fit: cover;
}

.wfa-relcard b {
  display: block;
  padding: 0 14px;
  font-family: Bangers, Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: .04em;
  line-height: 1.15;
}

/* Descriptions run to a sentence or two; two lines keeps the cards level.
   Selected by class, not by element: the thumbnail wrapper is a <span> and a
   direct child of the card too, so a bare `span` here out-specified
   .wfa-relthumb and washed every picture down to opacity .8 inside a 14px
   inset. */
.wfa-reldesc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 4px 14px 0;
  font-size: 15px;
  line-height: 1.4;
  opacity: .8;
}

.wfa-relgrid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 16px;
	/* Every card carries a band and a clamped description, so equal-height rows
	   line up instead of leaving holes. */
	grid-auto-rows: 1fr;
}

/* The row heading, for the pages that are not dish pages — on a dish page the
   slab rule in dish.css is more specific and still wins, which is what keeps
   the related rows looking identical to the sections above them. */
.wfa-relrow h2 {
	display: table;
	font-family: Bangers, "Barlow Condensed", sans-serif;
	font-weight: 400;
	font-size: 30px;
	letter-spacing: .04em;
	background: var(--wp--preset--color--text);
	color: var(--wp--preset--color--bg);
	padding: 4px 16px 2px;
	transform: rotate(-1.2deg);
	box-shadow: 5px 5px 0 var(--wp--preset--color--accent, #f2b134);
	margin: 0 0 18px;
}

/* ------------------------------------------------------------- filter bar
   The archive filter form. Ink borders and hard offset shadows, to match the
   controls on the home page and /explore/ rather than inventing a third look
   for the same job. */
.wfa-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px;
	margin: 0 0 18px;
	padding: 16px 18px;
	border: 3px solid var(--wp--preset--color--text);
	box-shadow: 6px 6px 0 var(--wp--preset--color--text);
	background: var(--wp--preset--color--bg);
}
.wfa-fl { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wfa-fl > span {
	font-family: Bangers, "Barlow Condensed", sans-serif;
	font-size: 13px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--neutral-700);
}
.wfa-fl input, .wfa-fl select {
	font: inherit;
	font-size: 15px;
	padding: 9px 11px;
	border: 2px solid var(--wp--preset--color--text) !important;
	background: var(--wp--preset--color--bg);
	color: var(--wp--preset--color--text);
	max-width: 100%;
}
.wfa-fl-q { flex: 1 1 240px; }

.wfa-ftoggles { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.wfa-ftog { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; white-space: nowrap; }

.wfa-fbtns { display: flex; align-items: center; gap: 12px; }
.wfa-fbtns button {
	font-family: Bangers, "Barlow Condensed", sans-serif;
	font-size: 20px;
	letter-spacing: .06em;
	padding: 8px 20px;
	border: 3px solid var(--wp--preset--color--text) !important;
	background: #f2b134;
	color: #1d1f20;
	cursor: pointer;
	/* The theme flattens every control with box-shadow:none !important, so this
	   one has to shout back. Same reason the dish page's SAVE and PRINT do. */
	box-shadow: 3px 3px 0 var(--wp--preset--color--text) !important;
}
.wfa-fclear { font-size: 14px; text-decoration: underline; }

.wfa-fcount {
	font-size: 14.5px;
	color: var(--wp--preset--color--neutral-700);
	margin: 0 0 16px;
}
.wfa-fnone { font-size: 16px; max-width: 60ch; }

.wfa-fpages {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 28px;
	font-family: Bangers, "Barlow Condensed", sans-serif;
	letter-spacing: .06em;
}
.wfa-fpages .page-numbers {
	border: 2px solid var(--wp--preset--color--text);
	padding: 5px 12px;
	text-decoration: none;
	font-size: 17px;
}
.wfa-fpages .page-numbers.current { background: var(--wp--preset--color--text); color: var(--wp--preset--color--bg); }
.wfa-fpages .page-numbers.dots { border: 0; }

@media (max-width: 600px) {
	.wfa-filters { padding: 12px 13px; box-shadow: 4px 4px 0 var(--wp--preset--color--text); }
	.wfa-fl, .wfa-fl select, .wfa-fl input { width: 100%; }
}

/* The theme's fallback archive query. It exists so that turning this plugin
   off leaves an ordinary WordPress archive rather than a bare heading, so it
   is hidden only when the plugin's own listing is on the page. */
.wfa-archived .wfa-archive-fallback { display: none; }

/* ------------------------------------------------- reviews on the home page
   Rendered by [wfa_home_reviews], which sits between the last generated
   section and the footer part. It has to bring its own container: the front
   page's .wrap is inside the static wp:html block this section deliberately
   sits outside of. */
.wfa-homerev { margin: 56px 0 0; }
.wfa-hr-in { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.wfa-hr-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(0, 0, 0, .18);
  padding-bottom: 8px;
  margin-bottom: 18px;
}
.wfa-hr-head h2 {
  font-family: Bangers, "Barlow Condensed", sans-serif;
  font-weight: 400;
  font-size: clamp(30px, 6vw, 44px);
  letter-spacing: .04em;
  margin: 0;
}
.wfa-hr-head p { margin: 0; font-size: 15px; opacity: .75; }
.wfa-hr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.wfa-hr-card {
  display: block;
  background: #fff;
  border: 3px solid var(--wfa-ink, #141414);
  box-shadow: 5px 5px 0 var(--wfa-ink, #141414);
  padding: 14px 16px 16px;
  text-decoration: none;
  color: inherit;
}
.wfa-hr-card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--wfa-ink, #141414); }
.wfa-hr-card b {
  display: block;
  font-family: Bangers, "Barlow Condensed", sans-serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: .05em;
}
.wfa-hr-card .wfa-stars { display: block; margin: 2px 0 8px; }
/* The review itself in the hand, the same as on the dish page — a quotation
   from a person, set apart from the atlas's own voice. <q> adds the marks. */
.wfa-hr-card q {
  display: block;
  font-family: "Patrick Hand", "Comic Neue", sans-serif;
  font-size: 18px;
  line-height: 1.35;
}
.wfa-hr-dish {
  display: block;
  margin-top: 10px;
  font-family: Bangers, "Barlow Condensed", sans-serif;
  font-size: 15px;
  letter-spacing: .06em;
  opacity: .8;
}

/* ------------------------------------------------ reviews: the form and the
   posted panels. Unscoped, like the cards above and for the same reason: this
   is one component rendering in two places — the reviews section of a dish
   page, and the "what cooks are saying" section on the home page, where the
   review is of the atlas rather than of a dish. It used to be scoped under
   .wfa-dish in dish.css, which loads on dish pages only, so on the home page
   the dialog opened completely unstyled. */

.wfa-stars { letter-spacing: -1px; font-size: 22px; }
.wfa-stars .on { color: var(--wfa-accent, #1F6F5C); }
.wfa-stars .off { color: #c9cdc4; }

/* The reply title needs its own display face here: it used to borrow one from
   a grouped rule in dish.css that this file cannot see. */
/* The star picker: radios painted as stars. Laid out in reverse so that
   hovering or selecting one star also lights the ones below it, which is what
   a reader expects — CSS can only style siblings that come after. */
.wfa-rating-field { border: 0; padding: 0; margin: 0 0 14px; }
.wfa-rating-field legend { font-weight: 700; padding: 0; }
.wfa-picker { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.wfa-picker input { position: absolute; opacity: 0; width: 0; height: 0; }
.wfa-picker label { font-size: 34px; line-height: 1; color: #c9cdc4; cursor: pointer; padding: 0 2px; }
.wfa-picker input:checked ~ label,
.wfa-picker label:hover,
.wfa-picker label:hover ~ label { color: var(--wfa-accent); }
.wfa-picker input:focus-visible + label { outline: 2px solid var(--wfa-ink); outline-offset: 2px; }

.comment-reply-title {
  display: table;
  font-family: Bangers, Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-weight: 400;
  letter-spacing: .06em;
  font-size: clamp(20px, 4vw, 26px);
  background: var(--wfa-accent);
  color: #fff;
  padding: 3px 14px;
  margin: 34px auto 16px 0 !important;
  text-align: left !important;
  transform: rotate(-1deg);
  box-shadow: 4px 4px 0 var(--wfa-ink);
}

/* The comment form ships as WordPress's default, which on this page reads as a
   different website: a label floated beside a small textarea and a grey system
   button. It is styled here rather than in the theme so it travels with the
   rest of the dish design. */
.comment-form { max-width: 62ch; }
.comment-form p { margin: 0 0 16px; }
.comment-form label {
  display: block;
  font-weight: 700;
  margin: 0 0 6px;
}
.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  padding: 10px 12px;
  background: #fff;
  border: 3px solid var(--wfa-ink);
  border-radius: 0 !important;
  box-shadow: 4px 4px 0 var(--wfa-ink) !important;
}
.comment-form textarea { min-height: 130px; resize: vertical; }
.comment-form :focus-visible {
  outline: 3px solid var(--wfa-accent);
  outline-offset: 2px;
}
.comment-form .submit {
  font-family: Bangers, Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 22px;
  letter-spacing: .06em;
  cursor: pointer;
  padding: 8px 26px;
  color: #fff;
  background: var(--wfa-ink);
  border: 3px solid var(--wfa-ink);
  border-radius: 0 !important;
  box-shadow: 5px 5px 0 var(--wfa-hi) !important;
}
.comment-form .submit:hover { background: var(--wfa-accent); border-color: var(--wfa-accent); }
.comment-form .submit:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--wfa-hi) !important; }
.comment-notes,
.comment-form-cookies-consent label { font-weight: 400; font-size: 15px; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form-cookies-consent label { margin: 0; }

/* Posted reviews. One panel each, same border language as a method step.
   The name is the comic face and the review itself is the hand — the same two
   voices the home page uses for a heading and its lede, so a review reads as
   part of the atlas rather than as a WordPress comment that wandered in. */
.wfa-revlist { margin: 26px 0 0; }
.wfa-review {
  background: #fff;
  border: 3px solid var(--wfa-ink);
  box-shadow: 5px 5px 0 var(--wfa-ink);
  padding: 16px 18px;
  max-width: 62ch;
  margin: 0 0 18px;
}
.wfa-rev-who {
  font-family: Bangers, "Barlow Condensed", sans-serif;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: .05em;
  margin: 0;
}
.wfa-review .wfa-stars { display: block; margin: 2px 0 8px; }
.wfa-rev-body {
  font-family: "Patrick Hand", "Comic Neue", sans-serif;
  font-size: 19px;
  line-height: 1.4;
}
.wfa-rev-body p { margin: 0 0 10px; }
.wfa-rev-body p:last-child { margin: 0; }
/* A review only its author can see needs to say so, or it reads as published. */
.wfa-review.is-pending { border-style: dashed; box-shadow: none; }
.wfa-rev-pending { margin: 10px 0 0; font-size: 14px; opacity: .7; }

/* The button that opens the form, and the dialog it opens. */
.wfa-rev-open {
  font-family: Bangers, "Barlow Condensed", sans-serif;
  font-size: 21px;
  letter-spacing: .05em;
  margin: 22px 0 0;
  padding: 10px 22px;
  border: 3px solid var(--wfa-ink);
  box-shadow: 5px 5px 0 var(--wfa-ink);
  background: var(--wfa-hi, #f2b134);
  color: #1d1f20;
  cursor: pointer;
}
.wfa-rev-open:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--wfa-ink); }
.wfa-rev-dlg {
  width: min(560px, calc(100vw - 32px));
  padding: 26px 28px 28px;
  border: 4px solid var(--wfa-ink);
  box-shadow: 10px 10px 0 var(--wfa-ink);
  background: var(--wp--preset--color--bg, #f2f2f3);
  color: inherit;
}
.wfa-rev-dlg::backdrop { background: rgba(29, 31, 32, .55); }
.wfa-rev-close {
  float: right;
  /* Not Bangers: its multiplication sign is a lopsided scrawl at this size. */
  font-size: 24px;
  line-height: 1;
  padding: 2px 10px 4px;
  border: 3px solid var(--wfa-ink);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
/* Without JavaScript the dialog renders inline, where a 10px offset shadow and
   a 560px cap are wrong — it is a section of the page then, not a panel over
   it. :not([open]) cannot express that, but the script only ever closes it. */
.wfa-rev-dlg[open]:not(:modal) {
  width: auto;
  max-width: 62ch;
  margin: 22px 0 0;
  box-shadow: 5px 5px 0 var(--wfa-ink);
}

/* The newsletter opt-in, last thing before the button. */
.wfa-nl-optin { display: flex; gap: 9px; align-items: flex-start; margin: 0 0 16px; }
/* Beats .comment-form label{font-weight:700} on specificity, which it has to:
   a consent question set in bold reads as part of the required fields. */
.comment-form .wfa-nl-optin label { font-weight: 400; font-size: 15px; margin: 0; }
.wfa-nl-optin input { margin-top: 3px; flex: none; }


@media (prefers-reduced-motion: reduce) {
  .comment-reply-title { transform: none; }
}

/* "optional" beside a label, and the line under the email box saying what the
   address is actually for. Both exist because the field is no longer required
   and a reference site asking for an address owes an explanation. */
.comment-form label .wfa-opt {
  font-weight: 400;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .6;
  margin-left: 6px;
}
.comment-form .wfa-fieldnote {
  display: block;
  margin-top: 6px;
  font-size: 13.5px;
  opacity: .7;
}
