/* Bareface product configurator. Measurements from the "Product Page Configurator"
   canvas (DW9, DW10, A10, DA2–DA5). Colours are the site's: ink #1B1B1B, grey
   #5D5F69, line #E1E2E5, ground #F7F7F7. Type is the page's own Inter. */

/* The sticky bar and the panels live outside the mount (on body), so they carry the tokens too. */
.bfc, .bfc_sticky, .bfc_panel {
  --bfc-ink: #1B1B1B;
  --bfc-grey: #5D5F69;
  --bfc-line: #E1E2E5;
  --bfc-ground: #F7F7F7;
  --bfc-off-bg: #F4F4F5;
  --bfc-off-ink: #9A9CA5;
}
.bfc {
  display: flex;
  flex-direction: column;
  gap: 32px;
  color: var(--bfc-ink);
  font-size: 12px;
  line-height: 18px;
}
.bfc.is-loading { min-height: 240px; }
/* Stood down (gift card, or a page that keeps its own form): display:flex above would otherwise beat [hidden]. */
.bfc[hidden] { display: none; }
.bfc.is-failed::before {
  content: "Something went wrong loading the options. Refresh the page, or email studio@barefaceportraits.com.";
  color: var(--bfc-grey);
}
/* Open on desktop: 88px between Add to cart and the links below (Chris, 2026-10-01). */
.bfc.is-desktop { margin-bottom: 48px; }
.bfc.is-desktop.is-open { margin-bottom: 88px; }

.bfc button { font: inherit; color: inherit; cursor: pointer; }
.bfc_icon { display: inline-flex; flex-shrink: 0; }
.bfc_icon svg { display: block; }
.bfc_icon.is-up svg { transform: rotate(180deg); }
.bfc_icon.is-right svg { transform: rotate(-90deg); }
.bfc_icon.is-left svg { transform: rotate(90deg); }

.bfc_group { display: flex; flex-direction: column; gap: 10px; }
.bfc_label-row { display: flex; justify-content: space-between; align-items: baseline; }
.bfc_label { font-size: 12px; font-weight: 500; line-height: 18px; letter-spacing: 0.1px; color: var(--bfc-ink); }
.bfc_label-link, .bfc_inline-link, .bfc_text-link {
  font-size: 12px; line-height: 15px; color: var(--bfc-grey);
  text-decoration: underline; text-underline-offset: 3px;
}
.bfc_text-link { color: var(--bfc-ink); background: none; border: 0; padding: 0; }

/* Series: the live variant row, stacked. A 1px grid of line colour; selected is a 1px black ring. */
.bfc_series-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; padding: 1px; background: var(--bfc-line); }
.bfc_series-option {
  height: 52px; padding: 0 16px; border: 0; background: #FFFFFF;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; text-align: left;
}
.bfc_series-option.is-selected { box-shadow: 0 0 0 1px #000000; position: relative; z-index: 1; }
.bfc_series-name { font-weight: 500; line-height: 16px; }
.bfc_series-count { color: var(--bfc-grey); line-height: 16px; text-align: center; }
.bfc_series-price { color: var(--bfc-grey); line-height: 16px; text-align: right; }

/* The fold (desktop). Black when closed, a pale bar once open. */
.bfc_fold { display: flex; flex-direction: column; gap: 12px; }
.bfc_fold-button, .bfc_button {
  width: 100%; height: 52px; padding: 0 16px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.2px; text-transform: uppercase;
  background: var(--bfc-ink); color: #FFFFFF !important; border: 1px solid var(--bfc-ink);
}
.bfc_fold-button.is-open { background: var(--bfc-off-bg); border-color: var(--bfc-off-bg); color: var(--bfc-ink) !important; font-weight: 500; }
.bfc_fold-note { margin: 0; color: var(--bfc-grey); }
.bfc_button[disabled], .bfc_button.is-busy { opacity: 0.6; cursor: default; }
.bfc_button.is-off { background: var(--bfc-off-bg); border-color: var(--bfc-off-bg); color: var(--bfc-off-ink) !important; cursor: default; }

.bfc_options { display: flex; flex-direction: column; gap: 32px; }
.bfc_choice {
  width: 100%; height: 24px; padding: 0; border: 0; background: none;
  display: flex; align-items: center; gap: 12px; text-align: left;
}
.bfc_choice-value { flex-grow: 1; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bfc_choice-hint { color: var(--bfc-grey); white-space: nowrap; }
.bfc_swatch-dot { width: 10px; height: 10px; flex-shrink: 0; display: inline-block; }
.bfc_photos { margin: 0; color: var(--bfc-grey); }

/* Phones: the price and Add to cart ride in a bar along the bottom (A″). */
.bfc_sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  background: #FFFFFF; border-top: 1px solid #E1E2E5; color: #1B1B1B;
}
.bfc_sticky-summary { display: flex; flex-direction: column; gap: 2px; width: 118px; flex-shrink: 0; }
.bfc_sticky-name { font-size: 12px; line-height: 16px; color: #5D5F69; }
.bfc_sticky-price { font-size: 13px; font-weight: 500; line-height: 18px; }
.bfc_sticky .bfc_button { flex-grow: 1; width: auto; cursor: pointer; font-family: inherit; }
body.has-bfc-sticky { padding-bottom: 89px; }

/* Panels. The overlay matches the site's slide-outs: rgba(35,35,35,.2) under a 5px blur.
   Branded panels blur only the strip of details column between the gallery and the panel,
   so the portrait stays sharp while the colour is chosen. */
.bfc_overlay {
  position: fixed; inset: 0; z-index: 998;
  background: rgba(35, 35, 35, 0.2); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  opacity: 0; transition: opacity 200ms ease;
}
.bfc_overlay.is-in { opacity: 1; }
.bfc_overlay.is-strip { left: 50%; right: 520px; }
.bfc_panel {
  position: fixed; z-index: 999; background: #FFFFFF; color: #1B1B1B; box-sizing: border-box;
  display: flex; flex-direction: column; outline: none;
  font-size: 12px; line-height: 18px;
}
.bfc_panel button { font: inherit; color: inherit; cursor: pointer; }
.bfc_panel.is-side {
  top: 0; right: 0; bottom: 0; width: 520px; max-width: 100vw; padding: 40px 32px 32px;
  transform: translateX(100%); transition: transform 200ms ease;
}
.bfc_panel.is-sheet {
  left: 0; right: 0; bottom: 0; max-height: calc(100% - 90px); padding: 0 0 24px;
  transform: translateY(100%); transition: transform 200ms ease;
}
.bfc_panel.is-in { transform: none; }
.bfc_panel-head { display: flex; align-items: center; flex-shrink: 0; }
.bfc_panel.is-side .bfc_panel-head { margin-bottom: 32px; }
.bfc_panel.is-sheet .bfc_panel-head { height: 56px; padding: 0 8px 0 20px; margin-bottom: 8px; }
.bfc_panel-title { margin: 0; flex-grow: 1; font-weight: 400; color: #000000; }
.bfc_panel.is-side .bfc_panel-title { font-size: 24px; line-height: 36px; letter-spacing: -0.496px; }
.bfc_panel.is-sheet .bfc_panel-title { font-size: 13px; font-weight: 500; line-height: 18px; color: #1B1B1B; }
.bfc_close, .bfc_back { width: 44px; height: 44px; padding: 0; border: 0; background: none; display: flex; align-items: center; justify-content: center; }
.bfc_panel.is-side .bfc_close { position: absolute; top: 12px; right: 12px; }
.bfc_back { margin: -4px 0 -4px -14px; }
.bfc_panel-body { flex-grow: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 24px; }
.bfc_panel.is-sheet .bfc_panel-body { padding: 0 20px; gap: 20px; }
.bfc_panel-foot { display: flex; gap: 10px; padding-top: 24px; flex-shrink: 0; }
.bfc_panel.is-sheet .bfc_panel-foot { padding: 16px 20px 0; }
.bfc_panel .bfc_button {
  width: 100%; height: 52px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; letter-spacing: 0.2px; text-transform: uppercase;
  background: #1B1B1B; color: #FFFFFF; border: 1px solid #1B1B1B;
}
.bfc_panel .bfc_button.is-off { background: #F4F4F5; border-color: #F4F4F5; color: #9A9CA5; cursor: default; }
.bfc_panel-intro { margin: 0; font-size: 13px; line-height: 22px; color: #5D5F69; }
.bfc_panel.is-sheet .bfc_panel-intro { font-size: 12px; line-height: 18px; }
.bfc_panel .bfc_label { font-size: 12px; font-weight: 500; line-height: 18px; letter-spacing: 0.1px; }
.bfc_panel .bfc_group { display: flex; flex-direction: column; gap: 10px; }
.bfc_panel .bfc_text-link { font-size: 12px; line-height: 15px; color: #1B1B1B; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* The page behind an open panel does not scroll, as with the site's own slide-outs. */
body.bfc-panel-open { overflow: hidden; }

/* Choice cards: a 1px ring, black when selected. */
.bfc_cards { display: flex; flex-direction: column; gap: 12px; }
.bfc_card {
  width: 100%; display: flex; gap: 14px; padding: 24px; border: 0; background: #FFFFFF; text-align: left;
  box-shadow: inset 0 0 0 1px #E1E2E5;
}
.bfc_card.is-selected { box-shadow: inset 0 0 0 1px #000000; }
.bfc_card-image { width: 72px; height: 90px; object-fit: cover; object-position: center 70%; display: block; flex-shrink: 0; background: #F7F7F7; }
.bfc_card-text { flex-grow: 1; display: flex; flex-direction: column; gap: 4px; }
.bfc_card.has-image .bfc_card-text { justify-content: center; }
.bfc_card-top { display: flex; justify-content: space-between; gap: 12px; }
.bfc_card-name { font-weight: 500; }
.bfc_card-price, .bfc_card-desc { color: #5D5F69; }

/* Colour code field: a chip of the colour, then the code. */
.bfc_field { display: flex; flex-direction: column; gap: 8px; }
.bfc_code { display: flex; align-items: center; height: 52px; border: 1px solid #E1E2E5; background: #FFFFFF; }
.bfc_code:focus-within { border-color: #000000; }
.bfc_code-chip { width: 50px; height: 50px; flex-shrink: 0; border-right: 1px solid #E1E2E5; }
.bfc_code-input { flex-grow: 1; min-width: 0; height: 50px; border: 0; padding: 0 14px; font: inherit; letter-spacing: 0.2px; background: transparent; color: #1B1B1B; outline: none; }
.bfc_code-msg { margin: 0; color: #1B1B1B; }
.bfc_code-msg:empty { display: none; }

.bfc_swatches { display: flex; justify-content: space-between; }
.bfc_swatch { width: 56px; height: 56px; padding: 0; border: 0; position: relative; overflow: hidden; }
.bfc_panel.is-sheet .bfc_swatch { width: 50px; height: 50px; }
.bfc_swatch-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 44%; }
.bfc_swatch.is-selected { outline: 1px solid #000000; outline-offset: 3px; }
.bfc_swatch-caption { color: #5D5F69; }
.bfc_swatch-caption.is-named { color: #1B1B1B; }

.bfc_site { display: flex; height: 52px; border: 1px solid #E1E2E5; }
.bfc_site:focus-within { border-color: #000000; }
.bfc_site-input { flex-grow: 1; min-width: 0; border: 0; padding: 0 16px; font: inherit; background: transparent; outline: none; color: #1B1B1B; }
.bfc_site-go { border: 0; background: none; padding: 0 16px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.2px; }
.bfc_site-list { display: flex; flex-direction: column; gap: 8px; }
.bfc_site-color { height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 16px 0 8px; border: 0; background: #FFFFFF; box-shadow: inset 0 0 0 1px #E1E2E5; text-align: left; }
.bfc_site-color.is-selected { box-shadow: inset 0 0 0 1px #000000; }
.bfc_site-chip { width: 40px; height: 40px; flex-shrink: 0; }
.bfc_site-role { flex-grow: 1; }
.bfc_site-hex { color: #5D5F69; }

.bfc :focus-visible, .bfc_panel :focus-visible, .bfc_sticky :focus-visible { outline: 1px solid #000000; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .bfc_overlay, .bfc_panel { transition: none; }
}
