/* =====================================================
   Quick CTA Buttons — Frontend Styles
   ===================================================== */

*, *::before, *::after { box-sizing: border-box; }

#qcb-wrap {
  position: fixed;
  z-index: 999999;
  display: flex;
  align-items: center;
  pointer-events: none;
}

/* ── Button base ──────────────────────────────────────── */

.qcb-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-decoration: none !important;
  color: #fff !important;
  background: var(--btn-color, #333);
  border-radius: 100px;
  cursor: pointer;
  pointer-events: auto;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease;
  overflow: visible;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

.qcb-btn:hover { text-decoration: none !important; }
.qcb-btn:focus-visible { outline: 3px solid rgba(255,255,255,.6); outline-offset: 3px; }

/* ── Icon wrapper ─────────────────────────────────────── */

.qcb-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qcb-icon svg { display: block; }

/* ── Label ────────────────────────────────────────────── */

.qcb-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .25px;
  line-height: 1;
}

/* ── Pulse ring ───────────────────────────────────────── */

.qcb-ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--btn-color, #333);
  opacity: .5;
  pointer-events: none;
  z-index: -1;
  animation: qcb-pulse 2.6s ease-out infinite;
}

@keyframes qcb-pulse {
  0%   { transform: scale(1);    opacity: .50; }
  65%  { transform: scale(1.60); opacity: 0;   }
  100% { transform: scale(1.60); opacity: 0;   }
}

/* ── Reduce-motion ────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .qcb-ring { animation: none; opacity: 0; }
  .qcb-btn  { transition: none; }
}

/* ══════════════════════════════════════════════════════
   DESKTOP  (≥ 769 px)
   ══════════════════════════════════════════════════════ */

@media (min-width: 769px) {

  #qcb-wrap {
    flex-direction: column;
    gap: 14px;
  }

  .qcb-btn {
    height: 54px;
    padding: 0 22px 0 18px;
    box-shadow: 0 6px 22px rgba(0,0,0,.22), 0 2px 8px rgba(0,0,0,.12);
  }

  .qcb-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 32px rgba(0,0,0,.28), 0 3px 10px rgba(0,0,0,.14);
  }

  .qcb-btn:active { transform: translateY(-1px) scale(1.01); }

  .qcb-icon svg { width: 22px; height: 22px; }

  /* hide labels when admin opted out */
  #qcb-wrap:not(.qcb-labels-on) .qcb-label { display: none; }
  #qcb-wrap:not(.qcb-labels-on) .qcb-btn   { padding: 0; width: 54px; }

  /* ── Desktop positions ── */

  #qcb-wrap[data-desk="bottom-right"] {
    bottom: 30px;
    right: 24px;
    align-items: flex-end;
  }

  #qcb-wrap[data-desk="bottom-left"] {
    bottom: 30px;
    left: 24px;
    align-items: flex-start;
  }

  #qcb-wrap[data-desk="right-side"] {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }

  #qcb-wrap[data-desk="right-side"] .qcb-btn {
    border-radius: 12px 0 0 12px;
    padding-right: 14px;
    box-shadow: -4px 4px 20px rgba(0,0,0,.20);
  }

  #qcb-wrap[data-desk="right-side"] .qcb-btn:hover {
    transform: translateX(-4px);
  }

  #qcb-wrap[data-desk="left-side"] {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  #qcb-wrap[data-desk="left-side"] .qcb-btn {
    border-radius: 0 12px 12px 0;
    padding-left: 14px;
    flex-direction: row-reverse;
    box-shadow: 4px 4px 20px rgba(0,0,0,.20);
  }

  #qcb-wrap[data-desk="left-side"] .qcb-btn:hover {
    transform: translateX(4px);
  }
}

/* ══════════════════════════════════════════════════════
   MOBILE  (≤ 768 px) — default: bottom bar
   ══════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* Default mobile = full-width bottom sticky bar */
  #qcb-wrap {
    flex-direction: row;
    bottom: 0;
    left: 0;
    right: 0;
    gap: 0;
    background: #fff;
    box-shadow: 0 -3px 20px rgba(0,0,0,.13);
  }

  .qcb-btn {
    flex: 1;
    height: 58px;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 10px;
    gap: 8px;
    font-size: 13px;
    transition: filter .15s ease;
  }

  .qcb-btn:hover,
  .qcb-btn:active { transform: none; filter: brightness(1.10); }

  /* Subtle divider between buttons */
  .qcb-btn + .qcb-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255,255,255,.30);
  }

  .qcb-icon svg { width: 20px; height: 20px; }

  /* No pulse on mobile bar — keeps it clean */
  .qcb-ring { display: none; }

  /* ── Mobile: floating bottom-right override ── */
  #qcb-wrap[data-mob="bottom-right"] {
    left: auto;
    right: 16px;
    bottom: 20px;
    width: auto;
    background: transparent;
    box-shadow: none;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
  }

  #qcb-wrap[data-mob="bottom-right"] .qcb-btn {
    flex: none;
    width: auto;
    border-radius: 100px !important;
    height: 52px;
    padding: 0 18px 0 14px;
    box-shadow: 0 4px 18px rgba(0,0,0,.25) !important;
  }

  #qcb-wrap[data-mob="bottom-right"] .qcb-btn + .qcb-btn::before { display: none; }

  /* ── Mobile: floating bottom-left override ── */
  #qcb-wrap[data-mob="bottom-left"] {
    left: 16px;
    right: auto;
    bottom: 20px;
    width: auto;
    background: transparent;
    box-shadow: none;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  #qcb-wrap[data-mob="bottom-left"] .qcb-btn {
    flex: none;
    width: auto;
    border-radius: 100px !important;
    height: 52px;
    padding: 0 18px 0 14px;
    box-shadow: 0 4px 18px rgba(0,0,0,.25) !important;
  }

  #qcb-wrap[data-mob="bottom-left"] .qcb-btn + .qcb-btn::before { display: none; }

  /* Labels always visible on mobile */
  .qcb-label { display: block !important; }
}
