/* ==========================================================================
 * Planting Zone — Top Bar variants TB1/TB2/TB3/TB4 (v14.5.0).
 * Lifted from D:\Downloads\topbar-sidebar-lab.html. All rules scoped
 * under .pz-tb so they can't leak into other planting-guide templates.
 * Loaded only when the top bar is enabled (PZ_Sticky_Bar::maybe_enqueue).
 * ========================================================================== */

.pz-tb {
  --pz-tb-parchment: #F4ECDC;
  --pz-tb-cream:     #FAF5EA;
  --pz-tb-forest:    #2C3E2D;
  --pz-tb-forest-deep: #1E2C1F;
  --pz-tb-forest-darker: #121A13;
  --pz-tb-moss:      #5A7052;
  --pz-tb-terracotta:    #B5543A;
  --pz-tb-terracotta-bright: #D36649;
  --pz-tb-terracotta-deep: #9A4330;
  --pz-tb-honey:     #D4A73C;
  --pz-tb-honey-deep: #B88C28;
  --pz-tb-ink:       #2A2723;
  --pz-tb-ink-soft:  #4A453E;

  --pz-tb-serif:    'Fraunces', Georgia, serif;
  --pz-tb-sans:     'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  position: fixed;
  left: 0; right: 0;
  z-index: 500;
  display: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  font-family: var(--pz-tb-sans);
  box-sizing: border-box;
}
.pz-tb.pz-tb-open { display: block; }
.pz-tb--top    { top: 0; }
.pz-tb--bottom { bottom: 0; }

/* WP admin bar offset for logged-in users */
body.admin-bar .pz-tb--top { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .pz-tb--top { top: 46px; }
}

.pz-tb * { box-sizing: border-box; }

/* Universal close button (each variant restyles ::hover background) */
.pz-tb__close {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(0, 0, 0, 0.18);
  color: inherit;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.15s ease, transform 0.2s ease;
  z-index: 5;
}
.pz-tb__close:hover { opacity: 1; transform: translateY(-50%) rotate(90deg); }

/* Page-push offset (set by JS) so theme content sits below the bar. */
html.pz-tb-pushing {
  scroll-padding-top: var(--pz-tb-offset, 0);
}
html.pz-tb-pushing body {
  padding-top: var(--pz-tb-offset, 0);
}
html.pz-tb-pushing .main-navigation.navigation-stick,
html.pz-tb-pushing .main-navigation.is_stuck,
html.pz-tb-pushing #masthead.is-sticky,
html.pz-tb-pushing .site-header.is-sticky,
html.pz-tb-pushing .ast-primary-header-bar.ast-sticky-active,
html.pz-tb-pushing .header-main.header-sticky-show,
html.pz-tb-pushing header[class*="sticky"]:not(.pz-tb) {
  top: calc(var(--pz-tb-offset, 0px) + var(--wp-admin--admin-bar--height, 0px)) !important;
}

/* -------- TB1 · CLASSIC INLINE CAPTURE (forest) -------- */
.pz-tb1 {
  background: var(--pz-tb-forest-deep);
  color: var(--pz-tb-cream);
  padding: 14px 56px 14px 24px;
  border-bottom: 1px solid rgba(212, 167, 60, 0.2);
}
.pz-tb1__inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.pz-tb1__pitch {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 260px;
}
.pz-tb1__icon {
  width: 38px; height: 38px;
  background: var(--pz-tb-honey);
  color: var(--pz-tb-forest-deep);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--pz-tb-serif);
  font-style: italic;
  font-weight: 700;
  font-size: 20px;
  flex-shrink: 0;
}
.pz-tb1__title {
  font-family: var(--pz-tb-serif);
  font-size: 17px;
  color: var(--pz-tb-honey);
  line-height: 1.15;
  font-weight: 500;
}
.pz-tb1__title em { font-style: italic; color: var(--pz-tb-cream); font-weight: 400; }
.pz-tb1__sub { font-size: 12.5px; color: rgba(250, 245, 234, 0.65); margin-top: 2px; }

.pz-tb1__form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0; }
.pz-tb1__input {
  font-family: var(--pz-tb-sans);
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid rgba(250, 245, 234, 0.18);
  background: rgba(250, 245, 234, 0.08);
  color: var(--pz-tb-cream);
  font-size: 13.5px;
  transition: border-color 0.15s ease;
}
.pz-tb1__input::placeholder { color: rgba(250, 245, 234, 0.45); }
.pz-tb1__input:focus { outline: none; border-color: var(--pz-tb-honey); background: rgba(250, 245, 234, 0.12); }
.pz-tb1__input--name  { width: 120px; }
.pz-tb1__input--email { width: 200px; }
.pz-tb1__input--zip   { width: 80px; }
.pz-tb1__submit {
  background: var(--pz-tb-terracotta);
  color: var(--pz-tb-cream);
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-family: var(--pz-tb-sans);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.pz-tb1__submit:hover { background: var(--pz-tb-terracotta-bright); }

/* -------- TB2 · BIG BENEFIT + CTA (terracotta gradient) -------- */
.pz-tb2 {
  background: linear-gradient(90deg, var(--pz-tb-terracotta) 0%, var(--pz-tb-terracotta-bright) 50%, var(--pz-tb-terracotta) 100%);
  color: var(--pz-tb-cream);
  padding: 16px 56px 16px 24px;
  position: relative;
  overflow: hidden;
}
.pz-tb2::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 50%, rgba(255,255,255,0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 50%, rgba(0,0,0,0.12) 0%, transparent 40%);
  pointer-events: none;
}
.pz-tb2__inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.pz-tb2__bolt {
  font-family: var(--pz-tb-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--pz-tb-honey);
  margin-right: -8px;
}
.pz-tb2__pitch {
  font-family: var(--pz-tb-serif);
  font-size: 18px;
  color: var(--pz-tb-cream);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.pz-tb2__pitch strong { color: var(--pz-tb-honey); font-weight: 600; font-style: italic; }
.pz-tb2__arrow { color: rgba(250, 245, 234, 0.7); font-size: 20px; margin: 0 4px; }
.pz-tb2__cta {
  background: var(--pz-tb-honey);
  color: var(--pz-tb-forest-deep);
  border: none;
  padding: 11px 24px;
  border-radius: 6px;
  font-family: var(--pz-tb-sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--pz-tb-honey-deep);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  text-transform: uppercase;
}
.pz-tb2__cta:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--pz-tb-honey-deep); }
.pz-tb2__cta:active { transform: translateY(4px); box-shadow: 0 0 0 var(--pz-tb-honey-deep); }
.pz-tb2 .pz-tb__close { background: rgba(0, 0, 0, 0.2); }

/* -------- TB3 · COUNTDOWN URGENCY (dark + honey timer) -------- */
.pz-tb3 {
  background: var(--pz-tb-forest-darker);
  color: var(--pz-tb-cream);
  padding: 14px 56px 14px 24px;
  border-bottom: 1px solid rgba(212, 167, 60, 0.25);
}
.pz-tb3__inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.pz-tb3__left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 280px;
}
.pz-tb3__timer {
  font-family: var(--pz-tb-serif);
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  font-weight: 600;
  color: var(--pz-tb-honey);
  letter-spacing: 0.02em;
  padding: 6px 14px;
  background: rgba(212, 167, 60, 0.08);
  border: 1px solid rgba(212, 167, 60, 0.3);
  border-radius: 8px;
  line-height: 1;
}
.pz-tb3__pitch { line-height: 1.2; }
.pz-tb3__pitch-top {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pz-tb-terracotta-bright);
  font-weight: 700;
  margin-bottom: 2px;
}
.pz-tb3__pitch-bot {
  font-family: var(--pz-tb-serif);
  font-size: 16px;
  color: var(--pz-tb-cream);
  font-weight: 500;
}
.pz-tb3__pitch-bot em { font-style: italic; color: var(--pz-tb-honey); font-weight: 400; }
.pz-tb3__form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0; }
.pz-tb3__input {
  font-family: var(--pz-tb-sans);
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid rgba(250, 245, 234, 0.15);
  background: rgba(250, 245, 234, 0.06);
  color: var(--pz-tb-cream);
  font-size: 13.5px;
}
.pz-tb3__input::placeholder { color: rgba(250, 245, 234, 0.4); }
.pz-tb3__input:focus { outline: none; border-color: var(--pz-tb-honey); }
.pz-tb3__input--email { width: 220px; }
.pz-tb3__input--zip   { width: 80px; }
.pz-tb3__submit {
  background: var(--pz-tb-terracotta);
  color: var(--pz-tb-cream);
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-family: var(--pz-tb-sans);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.pz-tb3__submit:hover { background: var(--pz-tb-terracotta-bright); }

/* -------- TB4 · HONEY MINIMAL (honey bg, forest text) -------- */
.pz-tb4 {
  background: var(--pz-tb-honey);
  color: var(--pz-tb-forest-deep);
  padding: 12px 56px 12px 24px;
  border-bottom: 1px solid var(--pz-tb-honey-deep);
}
.pz-tb4__inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.pz-tb4__icon { font-size: 20px; }
.pz-tb4__pitch {
  font-family: var(--pz-tb-serif);
  font-size: 16.5px;
  color: var(--pz-tb-forest-deep);
  line-height: 1.2;
  font-weight: 500;
}
.pz-tb4__pitch strong { font-weight: 700; }
.pz-tb4__pitch em { font-style: italic; color: var(--pz-tb-terracotta-deep); }
.pz-tb4__form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0; }
.pz-tb4__input {
  font-family: var(--pz-tb-sans);
  padding: 9px 14px;
  border-radius: 6px;
  border: 1px solid rgba(30, 44, 31, 0.25);
  background: var(--pz-tb-cream);
  color: var(--pz-tb-ink);
  font-size: 13.5px;
}
.pz-tb4__input::placeholder { color: rgba(30, 44, 31, 0.45); }
.pz-tb4__input:focus { outline: none; border-color: var(--pz-tb-forest-deep); background: white; }
.pz-tb4__input--email { width: 210px; }
.pz-tb4__input--zip   { width: 80px; }
.pz-tb4__submit {
  background: var(--pz-tb-forest-deep);
  color: var(--pz-tb-honey);
  border: none;
  padding: 9px 18px;
  border-radius: 6px;
  font-family: var(--pz-tb-sans);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.15s ease;
}
.pz-tb4__submit:hover { background: var(--pz-tb-ink); }
.pz-tb4 .pz-tb__close { background: rgba(30, 44, 31, 0.15); color: var(--pz-tb-forest-deep); }

/* Hide error region by default; only shows on validation fail */
.pz-tb .pz-inline-optin-error {
  flex-basis: 100%;
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--pz-tb-honey);
}

/* -------- Mobile -------- */
@media (max-width: 700px) {
  .pz-tb1, .pz-tb2, .pz-tb3, .pz-tb4 { padding: 12px 48px 12px 18px; }
  .pz-tb1__inner, .pz-tb3__inner, .pz-tb4__inner { gap: 12px; }
  .pz-tb1__form, .pz-tb3__form, .pz-tb4__form {
    width: 100%; flex-direction: column; align-items: stretch;
  }
  .pz-tb1__input, .pz-tb3__input, .pz-tb4__input { width: 100% !important; }
  .pz-tb1__submit, .pz-tb3__submit, .pz-tb4__submit { width: 100%; padding: 12px; }
  .pz-tb1__title, .pz-tb3__pitch-bot, .pz-tb4__pitch { font-size: 15px; }
  .pz-tb2__pitch { font-size: 15px; text-align: center; }
  .pz-tb2__inner { gap: 10px; }
  .pz-tb2__cta { width: 100%; padding: 13px; }
  .pz-tb3__timer { font-size: 22px; padding: 5px 10px; }
}
