/* v1.5.3 – Tighter spacing to bottom nav + tunable gap var */
:root {
  --pbc-bg: rgba(255,255,255,0.96);
  --pbc-border: rgba(0, 0, 0, 0.06);
  --pbc-shadow: 0 10px 28px rgba(0,0,0,0.18);
  --pbc-radius: 20px;

  --pbc-green: #0a6f27;
  --pbc-green-hover: #095f22;
  --pbc-danger-bg: #ffe6e9;
  --pbc-danger-bg-hover: #ffd8de;
  --pbc-danger-fg: #e11d48;

  --pbc-extra-offset: 0px; /* height of your bottom nav */
  --pbc-gap: 4px;          /* small breathing room above the nav */
  --pbc-bar-height: 0px;
}

/* Closer by default on mobile */
@media (max-width: 768px){
  :root { --pbc-extra-offset: 56px; --pbc-gap: 4px; } /* previously 72px + 8px */
}

#wc-pbc-bar.wc-pbc {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--pbc-extra-offset) + var(--pbc-gap) + env(safe-area-inset-bottom));
  z-index: 2147483646;
  background: var(--pbc-bg);
  border: 1px solid var(--pbc-border);
  border-radius: var(--pbc-radius);
  box-shadow: var(--pbc-shadow);
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  backdrop-filter: saturate(180%) blur(12px);
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition: transform .28s ease, opacity .18s ease;
}

#wc-pbc-bar.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }

body.wc-pbc--visible {
  padding-bottom: calc(var(--pbc-bar-height) + var(--pbc-extra-offset) + var(--pbc-gap) + env(safe-area-inset-bottom));
  transition: padding-bottom .2s ease;
}

/* Checkout pill */
.wc-pbc__cta {
  height: 52px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  border: 0; border-radius: 16px;
  background: var(--pbc-green);
  color: #fff;
  box-shadow: 0 8px 18px rgba(10,111,39,0.28), inset 0 1px 0 rgba(255,255,255,0.10);
  cursor: pointer; text-align: center; font-family: inherit;
}
.wc-pbc__cta:hover { background: var(--pbc-green-hover); }

.wc-pbc__row { display:flex; align-items:center; gap:6px; font-weight:800; font-size:.94rem; line-height:1.05; }
.wc-pbc__sep { opacity:.8; }
.wc-pbc__total { font-size:.88rem; font-weight:900; line-height:1; }
.wc-pbc__total .woocommerce-Price-currencySymbol { font-size:.85em; margin-right:1px; }
#wc-pbc-bar .woocommerce-Price-amount { font-weight:900; }
.wc-pbc__cta-label { font-weight:900; font-size:1.02rem; line-height:1.1; margin-top:1px; }

/* Delete */
.wc-pbc__clear {
  width:52px; height:52px; border:0; border-radius:16px;
  background:var(--pbc-danger-bg);
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  box-shadow:0 8px 18px rgba(239,68,68,0.25);
}
.wc-pbc__clear:hover { background:var(--pbc-danger-bg-hover); }
.wc-pbc__clear.is-loading { opacity:.6; pointer-events:none; }
.wc-pbc__clear svg { width:24px; height:24px; fill:var(--pbc-danger-fg); }

@media (max-width:480px){
  #wc-pbc-bar.wc-pbc { left: 8px; right: 8px; padding: 8px; gap: 8px; }
  .wc-pbc__cta { height: 50px; border-radius: 14px; }
  .wc-pbc__clear { width:50px; height:50px; border-radius:14px; }
}
