/* Price Skin Care Clinic: WPBakery layer (MIG-WO-14, from the FEIC MIG-WO-10 layer; same element rules as the approved Christmas MIG-WO-2e, Malaga MIG-WO-4 and Keith
   Jenkins MIG-WO-9 themes; rows follow the live FEIC 980 px line).
   Tokens only (tokens.css). Pages are built with STOCK WPBakery elements. WPBakery's own front-end CSS loads unchanged;
   this file (our code) sets the site's flow on top of it. The markup this file relies on is listed in inc/wpbakery.php
   (psc_wpb_markup_contract) and checked in wp-admin after a WPBakery update.
   Selectors start with .entry-content (and one more class where WPBakery's own rule has two), so they never depend
   on which stylesheet loads last. */

/* ---- Rows: the live FEIC line (MIG-WO-10). Every row sits on the 980 px content line inside the 1040 px box (live:
   30 px gutters). A band row ("Section" dropdown: dark, grey, sage, rule, footer) spans the box and pads its columns
   back to the content line. Rows are spaced by one step; bands carry their own padding. */
.entry-content > .wpb-content-wrapper { width: 100%; margin: 0; }
.entry-content .vc_row { margin-inline: 0; }
.wpb-content-wrapper > .vc_row { width: min(var(--container-ratio), var(--container)); margin-inline: auto; }
.wpb-content-wrapper > .vc_row.psc-band { width: 100%; padding-block: var(--section-pad); padding-inline: max((100% - var(--container-ratio)) / 2, (100% - var(--container)) / 2); }
.wpb-content-wrapper > .vc_row + .vc_row { margin-top: var(--space-xl); }
.wpb-content-wrapper > .vc_row + .vc_row.psc-band,
.wpb-content-wrapper > .vc_row.psc-band + .vc_row,
.wpb-content-wrapper > .psc-spot-row + .vc_row { margin-top: 0; }
.wpb-content-wrapper > .vc_row.psc-band + .vc_row:not(.psc-band),
.wpb-content-wrapper > .vc_row:first-child:not(.psc-band):not(.psc-spot-row) { margin-top: var(--section-pad); }
.wpb-content-wrapper > .vc_row:last-child:not(.psc-band) { margin-bottom: var(--section-pad); }
.wpb-content-wrapper > .psc-spot-row { width: 100%; }
.entry-content .vc_row::before,
.entry-content .vc_row::after,
.entry-content .vc_column-inner::before,
.entry-content .vc_column-inner::after { content: none; }

/* A row with one column is plain block flow, so margins meet and collapse as they did between 2d blocks (a heading
   after a columns row keeps its 1.6 em, a form's last margin is not added twice). Rows with two or more columns sit
   side by side, with the same gap and stacking as the 2d Columns block (os-refresh .wp-block-columns).
   :where() keeps these at one class, so a section's own layout (hero, letter, Don't Wait) always wins. */
.entry-content :where(.vc_row) { display: block; }
.entry-content :where(.vc_row:has(> .wpb_column + .wpb_column)) {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg) var(--space-xl);
}
.entry-content .vc_row > .wpb_column {
  float: none;
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  min-height: 0;
  padding-inline: 0;
}
.entry-content .vc_column_container > .vc_column-inner { padding-inline: 0; }
/* A column with a width keeps it as its flex basis, as the 2d Columns block did (style="flex-basis: 50%"), so a
   column with padding (Tinted box) shares the row the same way. */
.entry-content .vc_row > .vc_col-sm-3 { flex-basis: 25%; }
.entry-content .vc_row > .vc_col-sm-4 { flex-basis: 33.33%; }
.entry-content .vc_row > .vc_col-sm-5 { flex-basis: 41.66%; }
.entry-content .vc_row > .vc_col-sm-6 { flex-basis: 50%; }
.entry-content .vc_row > .vc_col-sm-7 { flex-basis: 58.33%; }
.entry-content .vc_row > .vc_col-sm-8 { flex-basis: 66.66%; }
.entry-content .vc_row > .vc_col-sm-9 { flex-basis: 75%; }
@media (max-width: 781px) {
  .entry-content .vc_row > .wpb_column { flex-basis: 100%; }
}
@media (min-width: 782px) {
  .entry-content :where(.vc_row) { flex-wrap: nowrap; } /* as the 2d Columns block from 782 px (WordPress block CSS) */
}

/* Reading width: plain text rows ("White, text at reading width") keep lines at about 72 characters, left on the line. */
.entry-content .psc-reading .wpb_text_column,
.entry-content .psc-reading .vc_custom_heading { max-width: var(--measure); }
.entry-content .psc-narrow > .vc_column-inner > .wpb_wrapper > :not(.vc_row) { max-width: var(--measure); margin-inline: auto; }

/* ---- Element flow: 1 em between parts, 1.6 em before a heading (as .wp-block-group > * + *). */
.entry-content .wpb_wrapper > *,
.entry-content .wpb_content_element { margin-top: 0; margin-bottom: 0; }
.entry-content .wpb_wrapper > * + * { margin-top: 1em; }
.entry-content .wpb_wrapper > * + :is(h2, h3, h4) { margin-top: 1.6em; }
.entry-content .wpb_text_column > .wpb_wrapper > :first-child { margin-top: 0; }
/* A heading that opens a row right after another row keeps the 2d gap before a heading (1.6 em; it meets the row's
   1 em and the larger one counts, as between 2d blocks). */


/* ---- Single Image: a block, as the 2d image block (WPBakery shows it inline-block). */
.entry-content .wpb_single_image .vc_figure,
.entry-content .wpb_single_image .vc_single_image-wrapper { display: block; }
.entry-content .wpb_single_image img { display: block; }
/* A photo floated in a Text Block (the editor's Add Media): the same size cap as the 2d floated image block, and it
   stays floated on phones too, as in 2d (text wraps round a 40% wide photo). */
.entry-content .wpb_text_column :is(.alignleft, .alignright) { max-width: min(40vw, 22rem); height: auto; }
.entry-content .wpb_text_column .alignright { float: right; margin: 0.35em 0 var(--space-sm) var(--space-md); }
.entry-content .wpb_text_column .alignleft { float: left; margin: 0.35em var(--space-md) var(--space-sm) 0; }
.entry-content .wpb_text_column p:has(> img:is(.alignleft, .alignright):only-child) { margin-top: 0; }
/* After a heading, a floated photo starts 0.35 em under it and the text 1 em under it, as in 2d. */
.entry-content .wpb_wrapper > * + .wpb_text_column > .wpb_wrapper > p:first-child > img:is(.alignleft, .alignright):only-child { margin-top: -0.65em; }

/* ---- Button element: the site's button (one primary, one secondary; audit section 5: 46 px, 6 px radius, the live
   yellow with black text, 15 px 600, labels as typed). WPBakery's Style, Shape, Size and colour settings are not used: the "Button
   look" dropdown sets the look (inc/wpbakery.php). Hover changes the fill in 160 ms; press moves 1 px (kit pm-btn) and
   darkens the fill. Every state uses brand tokens and wins by specificity (PORCH_RULES structural rules). */
.entry-content .wpb_btn-container .wpb_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: var(--btn-height);
  padding: 0 var(--btn-pad-x);
  border: 1px solid var(--color-accent);
  border-radius: var(--btn-radius);
  background: var(--color-accent);
  background-image: none;
  box-shadow: none;
  color: var(--color-on-accent);
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: var(--fw-ui);
  line-height: var(--lh-ui);
  letter-spacing: var(--ui-tracking);
  text-transform: var(--ui-transform);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--pm-dur-micro) var(--pm-ease-micro),
    border-color var(--pm-dur-micro) var(--pm-ease-micro),
    color var(--pm-dur-micro) var(--pm-ease-micro),
    box-shadow var(--pm-dur-micro) var(--pm-ease-micro),
    transform var(--pm-dur-micro) var(--pm-ease-micro);
}
.entry-content .wpb_btn-container .wpb_btn:visited { color: var(--color-on-accent); }
.entry-content .wpb_btn-container .wpb_btn:hover,
.entry-content .wpb_btn-container .wpb_btn:focus-visible {
  border-color: var(--color-accent-hover);
  background: var(--color-accent-hover);
  color: var(--color-on-accent);
}
.entry-content .wpb_btn-container .wpb_btn:focus-visible { outline: var(--pm-focus-ring); outline-offset: var(--pm-focus-offset); }
.entry-content .wpb_btn-container .wpb_btn:active { border-color: var(--color-accent-active); background: var(--color-accent-active); }

/* Secondary: ink outline on a light background. Hover fills with ink. */
.entry-content .psc-btn--secondary .wpb_btn,
.entry-content .psc-btn--secondary .wpb_btn:visited {
  border-color: var(--color-text-1);
  background: transparent;
  color: var(--color-text-1);
}
.entry-content .psc-btn--secondary .wpb_btn:hover,
.entry-content .psc-btn--secondary .wpb_btn:focus-visible { border-color: var(--color-text-1); background: var(--color-text-1); color: var(--c-paper); }
.entry-content .psc-btn--secondary .wpb_btn:active { background: var(--c-night); color: var(--c-paper); }

/* Light: white outline on a dark band. Hover fills white, text ink. */
.entry-content .psc-btn--light .wpb_btn,
.entry-content .psc-btn--light .wpb_btn:visited {
  border-color: var(--c-paper);
  background: transparent;
  color: var(--c-paper);
}
.entry-content .psc-btn--light .wpb_btn:hover,
.entry-content .psc-btn--light .wpb_btn:focus-visible { border-color: var(--c-paper); background: var(--c-paper); color: var(--color-text-1); }
.entry-content .psc-btn--light .wpb_btn:focus-visible { outline-color: var(--color-focus-on-dark); }
.entry-content .psc-btn--light .wpb_btn:active { background: var(--color-title-band); color: var(--color-text-1); }

/* The button box is as tall as the button (no text line under it). The Button's own Alignment setting still works
   (WPBakery prints it as a custom property). */
.entry-content .wpb_btn-container { display: flex; align-items: flex-start; justify-content: var(--wpb-btn-container-text-align, flex-start); }
/* A column that ends with two or more buttons shows them in one row with one gap. */
.entry-content .wpb_wrapper:has(> .wpb_btn-container + .wpb_btn-container) { display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: var(--space-sm); }
.entry-content .wpb_wrapper:has(> .wpb_btn-container + .wpb_btn-container) > :not(.wpb_btn-container) { flex: 0 0 100%; }
.entry-content .wpb_wrapper > :not(.wpb_btn-container) + .wpb_btn-container,
.entry-content .wpb_wrapper:has(> .wpb_btn-container + .wpb_btn-container) > .wpb_btn-container { margin-top: var(--space-lg); }
@media (max-width: 599px) {
  .entry-content .wpb_wrapper:has(> .wpb_btn-container + .wpb_btn-container) > .wpb_btn-container + .wpb_btn-container { margin-top: var(--space-sm); }
  .entry-content .wpb_wrapper:has(> .wpb_btn-container + .wpb_btn-container) > .wpb_btn-container,
  .entry-content .wpb_wrapper:has(> .wpb_btn-container + .wpb_btn-container) > .wpb_btn-container .wpb_btn { flex: 1 1 100%; width: 100%; }
}

/* Arrow (dropdown "Arrow: Yes"): one SVG line arrow (16 px, 1.75 px stroke), drawn as a mask in the text colour, so
   the button text stays the editor's own. It moves 3 px on hover and focus (kit token). Reduced motion: no move. */
.entry-content .psc-arrow .wpb_btn::after {
  content: "";
  flex: none;
  width: 1rem;
  height: 1rem;
  background: currentColor;
  -webkit-mask: var(--psc-arrow-mask) center / contain no-repeat;
  mask: var(--psc-arrow-mask) center / contain no-repeat;
  transition: transform var(--pm-dur-micro) var(--pm-ease-micro);
}
@media (prefers-reduced-motion: no-preference) {
  .entry-content .psc-arrow .wpb_btn:hover::after,
  .entry-content .psc-arrow .wpb_btn:focus-visible::after { transform: translate3d(var(--pm-btn-icon-shift), 0, 0); }
}

/* ---- WPBakery frontend editor preview only (body.vc_editor, set by WPBakery in its editing frame).
   There WPBakery wraps every row, column and element in a div.vc_element for its controls. These rules let those
   wrappers take no part in the layout, so the preview follows the page. The public page never has the wrappers, so
   nothing here applies to visitors. Our CSS only; WPBakery's editor files are not touched. */
.vc_editor .wpb-content-wrapper > .vc_element { width: 100%; margin: 0; }
.vc_editor .wpb-content-wrapper > .vc_element > .vc_row:not(.psc-band) { width: min(var(--container-ratio), var(--container)); margin-inline: auto; }
.vc_editor .wpb-content-wrapper > .vc_element > .vc_row.psc-band { width: 100%; padding-block: var(--section-pad); padding-inline: max((100% - var(--container-ratio)) / 2, (100% - var(--container)) / 2); }
.vc_editor .wpb-content-wrapper > .vc_element + .vc_element > .vc_row:not(.psc-band) { margin-top: var(--space-xl); }
.vc_editor .entry-content .vc_row > .vc_element,
.vc_editor .entry-content .wpb_wrapper > .vc_element { display: contents; }
.vc_editor .entry-content :where(.vc_row:has(> .vc_element + .vc_element)) { display: flex; flex-wrap: wrap; gap: var(--space-lg) var(--space-xl); }
.vc_editor .entry-content :where(.vc_row > .vc_element > .wpb_column) { float: none; flex: 1 1 0; width: auto; min-width: 0; padding-inline: 0; }
@media (max-width: 781px) { .vc_editor .entry-content :where(.vc_row > .vc_element > .wpb_column) { flex-basis: 100%; } }
@media (min-width: 782px) { .vc_editor .entry-content :where(.vc_row) { flex-wrap: nowrap; } }
.vc_editor .entry-content .wpb_wrapper > .vc_element + .vc_element > * { margin-top: 1em; }
.vc_editor .entry-content .wpb_wrapper > .vc_element + .vc_element > :is(h2, h3, h4) { margin-top: 1.6em; }
