/**
 * Backzauber 2.0 — unified Art Director layer for Backhelfer, My Backzauber
 * and the in-page Maria assistant.
 *
 * Scope is deliberately narrow. Calculator logic, account grid fixes,
 * Maria artwork/launcher and all Woo product-card styles remain untouched.
 */
:where(.bz-calculator-hub, .bz-helper-lab, .bz-my, .bz-maria) {
  --bz-ad-blue: #133a8a;
  --bz-ad-pink: #e40c55;
  --bz-ad-cream: #f6efe4;
  --bz-ad-paper: #fffaf3;
  --bz-ad-ink: #0b1838;
  --bz-ad-line: rgba(11, 24, 56, .22);
  color: var(--bz-ad-ink);
}

/* Backhelfer hub and calculator entry points */
.bz-calculator-hub {
  position: relative;
  isolation: isolate;
  overflow: clip;
  border: 1px solid var(--bz-ad-ink);
  border-radius: 0 0 2rem 2rem;
  background:
    linear-gradient(135deg, transparent 0 72%, rgba(228, 12, 85, .09) 72% 82%, transparent 82%),
    var(--bz-ad-cream);
}

.bz-calculator-hub::before {
  position: absolute;
  z-index: -1;
  top: -9rem;
  right: -7rem;
  width: clamp(15rem, 32vw, 30rem);
  aspect-ratio: 1;
  border: clamp(1.25rem, 3vw, 3rem) solid rgba(19, 58, 138, .12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.bz-calculator-hub__head {
  max-width: 58rem;
}

.bz-calculator-hub__head h1,
.bz-calculator-hub__head h2,
.bz-helper-lab__head h2 {
  max-width: 13ch;
  color: var(--bz-ad-blue);
  font-family: var(--bz-display, "BZ Display", "Arial Narrow", Impact, sans-serif);
  font-size: clamp(2.8rem, 6vw, 6.5rem);
  line-height: .84;
  letter-spacing: -.05em;
  text-wrap: balance;
  text-transform: uppercase;
}

.bz-calculator-hub__grid,
.bz-helper-lab__grid {
  gap: 1rem;
}

.bz-helper-card,
.bz-live-helper {
  min-width: 0;
  overflow: clip;
  border: 1px solid var(--bz-ad-ink);
  border-radius: .55rem;
  background: var(--bz-ad-paper);
  box-shadow: 7px 8px 0 rgba(19, 58, 138, .15);
}

.bz-helper-card {
  border-top: .7rem solid var(--bz-ad-blue);
}

.bz-helper-card--portion,
.bz-helper-card--next {
  border-color: var(--bz-ad-ink);
  border-top-color: var(--bz-ad-pink);
}

.bz-helper-card--portion {
  background: var(--bz-ad-blue);
  color: #fff;
}

.bz-helper-card--next {
  background: var(--bz-ad-pink);
  color: #fff;
}

.bz-helper-card h3,
.bz-live-helper h3 {
  overflow-wrap: normal;
  text-wrap: balance;
}

.bz-helper-card :where(.wp-element-button, a),
.bz-calculator-hub__bridge .wp-element-button {
  min-height: 48px;
}

.bz-calculator-hub__bridge {
  margin-top: 1rem;
  border: 1px solid var(--bz-ad-ink);
  border-radius: .55rem;
  background: var(--bz-ad-ink);
  box-shadow: 7px 8px 0 rgba(228, 12, 85, .55);
}

.bz-live-helper {
  border-top: .7rem solid var(--bz-ad-blue);
}

.bz-live-helper:nth-child(even) {
  border-top-color: var(--bz-ad-pink);
}

.bz-live-helper__tag {
  color: var(--bz-ad-blue);
}

.bz-live-helper__fields :is(select, input) {
  min-height: 48px;
  border: 2px solid var(--bz-ad-ink);
  border-radius: .35rem;
  background: #fff;
}

.bz-live-helper__answer {
  border: 1px solid var(--bz-ad-ink);
  border-radius: .45rem;
  background: var(--bz-ad-blue);
  box-shadow: 5px 6px 0 rgba(228, 12, 85, .55);
}

.bz-ganache-compare > div {
  border: 1px solid var(--bz-ad-line);
  border-radius: .45rem;
  background: var(--bz-ad-cream);
}

/* My Backzauber — preserve the accepted Woo grid and state semantics. */
.bz-my {
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.bz-my__hero {
  position: relative;
  max-width: none;
  overflow: clip;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border: 1px solid var(--bz-ad-ink);
  border-radius: .65rem;
  background: var(--bz-ad-blue);
  color: #fff;
  box-shadow: 8px 9px 0 rgba(228, 12, 85, .62);
}

.bz-my__hero::after {
  position: absolute;
  right: clamp(1rem, 5vw, 4rem);
  bottom: clamp(.75rem, 3vw, 2rem);
  width: clamp(4.5rem, 11vw, 9rem);
  height: .9rem;
  background: var(--bz-ad-cream);
  box-shadow: 0 1.7rem 0 rgba(255, 255, 255, .2);
  content: "";
  pointer-events: none;
  transform: rotate(-7deg);
}

.bz-my__hero h2 {
  position: relative;
  z-index: 1;
  max-width: 12ch;
  margin: 0 0 .6rem;
  color: #fff;
  font-family: var(--bz-display, "BZ Display", "Arial Narrow", Impact, sans-serif);
  font-size: clamp(2.5rem, 5.5vw, 5.5rem);
  line-height: .84;
  letter-spacing: -.045em;
  text-wrap: balance;
  text-transform: uppercase;
}

.bz-my__hero p {
  position: relative;
  z-index: 1;
  max-width: 42rem;
}

.bz-my__privacy {
  padding: 1rem 1.15rem;
  border: 1px solid var(--bz-ad-ink);
  border-left: .65rem solid var(--bz-ad-pink);
  border-radius: .35rem;
  background: var(--bz-ad-cream);
}

.bz-my__grid,
.bz-my__orders {
  gap: 1rem;
}

.bz-my__panel {
  border: 1px solid var(--bz-ad-ink);
  border-top: .65rem solid var(--bz-ad-blue);
  border-radius: .55rem;
  background: var(--bz-ad-paper);
  box-shadow: 6px 7px 0 rgba(19, 58, 138, .14);
}

.bz-my__panel:nth-child(even) {
  border-top-color: var(--bz-ad-pink);
}

.bz-my__panel--muted {
  background: var(--bz-ad-cream);
}

.bz-my__panel h3 {
  font-family: var(--bz-display, "BZ Display", "Arial Narrow", Impact, sans-serif);
  font-size: clamp(1.65rem, 2.5vw, 2.5rem);
  line-height: .95;
  text-wrap: balance;
  text-transform: uppercase;
}

.bz-my__item {
  border-top-color: var(--bz-ad-line);
}

.bz-my__actions :where(a, button),
.bz-my :where(.button, .wp-element-button) {
  min-height: 48px;
}

.bz-my__remove,
.bz-my__secondary,
.bz-my__clear-device {
  border: 2px solid var(--bz-ad-blue);
  border-radius: .35rem;
  color: var(--bz-ad-blue);
  font-weight: 800;
}

.bz-my__order {
  border: 1px solid var(--bz-ad-ink);
  border-left: .55rem solid var(--bz-ad-blue);
  border-radius: .45rem;
  background: #fff;
}

.bz-my__order--warning {
  border-left-color: var(--bz-ad-pink);
}

.bz-my__order-kicker {
  color: var(--bz-ad-blue);
}

/* In-page Maria panel only. Approved full-body artwork and launcher are excluded. */
.bz-maria {
  border: 3px solid var(--bz-ad-blue);
  border-radius: .65rem;
  background:
    radial-gradient(circle at 92% 8%, rgba(228, 12, 85, .18) 0 8%, transparent 8.5%),
    radial-gradient(circle at 84% 17%, rgba(19, 58, 138, .14) 0 5%, transparent 5.5%),
    var(--bz-ad-paper);
  box-shadow: 9px 10px 0 var(--bz-ad-pink);
}

.bz-maria__portrait {
  border: 3px solid var(--bz-ad-blue);
  background: var(--bz-ad-pink);
  box-shadow: 5px 5px 0 var(--bz-ad-blue);
}

.bz-maria__controls select,
.bz-maria__query-row input {
  min-width: 0;
  min-height: 50px;
  border: 2px solid var(--bz-ad-ink);
  border-radius: .35rem;
  background: #fff;
  color: var(--bz-ad-ink);
}

.bz-maria__query-row button,
.bz-maria .wp-element-button {
  min-height: 50px;
  border: 2px solid var(--bz-ad-blue);
  border-radius: .35rem;
  background: var(--bz-ad-blue);
  color: #fff;
  box-shadow: 4px 4px 0 var(--bz-ad-pink);
}

.bz-maria__query-row button:hover,
.bz-maria__query-row button:focus-visible,
.bz-maria .wp-element-button:hover,
.bz-maria .wp-element-button:focus-visible {
  background: var(--bz-ad-pink);
}

.bz-maria__answer,
.bz-maria__verified-results {
  border: 1px solid var(--bz-ad-line);
  border-radius: .45rem;
  background: #fff;
}

.bz-maria__verified-results {
  border: 2px solid var(--bz-ad-blue);
  box-shadow: 5px 5px 0 rgba(19, 58, 138, .16);
}

:where(.bz-calculator-hub, .bz-helper-lab, .bz-my, .bz-maria)
  :where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--bz-ad-pink);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--bz-ad-paper);
}

@media (max-width: 760px) {
  .bz-calculator-hub {
    border-radius: 0 0 1.25rem 1.25rem;
  }

  .bz-calculator-hub__head h1,
  .bz-calculator-hub__head h2,
  .bz-helper-lab__head h2 {
    max-width: 11ch;
    font-size: clamp(2.65rem, 12vw, 4.6rem);
  }

  .bz-my__hero h2 {
    max-width: 10ch;
    font-size: clamp(2.45rem, 11vw, 4.2rem);
  }

  .bz-my__hero::after {
    opacity: .45;
  }
}

@media (max-width: 560px) {
  .bz-calculator-hub,
  .bz-helper-lab {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .bz-helper-card,
  .bz-live-helper,
  .bz-my__panel,
  .bz-maria {
    box-shadow: 4px 5px 0 rgba(19, 58, 138, .16);
  }

  .bz-calculator-hub__bridge {
    box-shadow: 4px 5px 0 rgba(228, 12, 85, .55);
  }

  .bz-maria__query-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .bz-my__actions > * {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 360px) {
  .bz-calculator-hub__head h1,
  .bz-calculator-hub__head h2,
  .bz-helper-lab__head h2 {
    font-size: clamp(2.25rem, 13vw, 3.25rem);
  }

  .bz-my__hero {
    padding: 1.25rem;
  }

  .bz-my__hero h2 {
    font-size: clamp(2.15rem, 13vw, 3.15rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bz-helper-card,
  .bz-live-helper,
  .bz-my__panel,
  .bz-maria {
    scroll-behavior: auto;
    transition: none;
  }
}
