/* Custom site overrides and accessibility/compatibility helpers */

/* Accessibility utility: brand accent color for headings/labels */
.text-primary-alt { color: #5FB2E3; }

/* Simple margin-top utilities (Bootstrap 3 lacks spacing utilities) */
.mt-2 { margin-top: 2px !important; }
.mt-4 { margin-top: 4px !important; }
.mt-10 { margin-top: 10px !important; }

/* Moved from inline <style> (was in myheader.php) */
.bg-img1 { background-position: center; background-repeat: no-repeat; background-size: cover; }
.overlay1 { position: relative; z-index: 1; }
.overlay1::before {
  content: ""; display: block; position: absolute; z-index: -1; width: 100%; height: 100%; top: 0; left: 0;
  background: -webkit-linear-gradient(top, #009efd, #2af598);
  background: linear-gradient(to bottom, #009efd, #2af598);
  opacity: 0.8;
}
.btn-grp { display: inline-flex; }

/* Cross-browser compatibility fallbacks */
/* Order vendor-prefixed properties before unprefixed per compatibility scanners */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, [role="button"], input, select { touch-action: manipulation; }
/* Provide non-prefixed properties with vendor-prefixed first */
.gpu-hint { -webkit-backface-visibility: hidden; backface-visibility: hidden; }

/* Transition helper with proper ordering */
.transition-all { -webkit-transition: all .2s ease-in-out; transition: all .2s ease-in-out; }

/* Prefer using classes over inline colors like style="color:green/blue"; use Bootstrap text-* utilities instead */

/* Footer overrides: ensure footer sits flush and does not overlap content */
.footer { margin-left: 0 !important; clear: both; position: relative; z-index: 1; }

/* Books fly interaction (touch/click confetti) */
.rb-book-spark { position: fixed; left: 0; top: 0; z-index: 12000; pointer-events: none; opacity: 1;
  transform: translate3d(0,0,0) scale(0.9); will-change: transform, opacity; filter: drop-shadow(0 1px 1px rgba(0,0,0,.15));
}
.rb-book-spark.go { animation: rbBookPop var(--rb-dur, 900ms) cubic-bezier(.22,.61,.36,1) forwards; }
@keyframes rbBookPop {
  0%   { transform: translate3d(0,0,0) scale(0.9) rotate(0deg); opacity: 1; }
  70%  { transform: translate3d(var(--rb-tx, 0px), var(--rb-ty, 0px), 0) scale(1.05) rotate(var(--rb-rot, 0deg)); opacity: .95; }
  100% { transform: translate3d(calc(var(--rb-tx, 0px)*1.1), calc(var(--rb-ty, 0px)*1.1), 0) scale(0.9) rotate(var(--rb-rot, 0deg)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .rb-book-spark, .rb-book-spark.go { animation: none !important; display: none !important; }
}

/* Brief over-limit cue for delivery summary */
#delivery-summary.blink {
  animation: rbBlink 700ms ease-in-out 1;
}
@keyframes rbBlink {
  0% { box-shadow: 0 4px 15px rgba(0,0,0,.2); }
  50% { box-shadow: 0 0 0 3px rgba(195, 0, 0, 0.35), 0 6px 20px rgba(0,0,0,.25); }
  100% { box-shadow: 0 4px 15px rgba(0,0,0,.2); }
}
