/* PaintCalc Launcher (floating trigger button)
 * Goal: functional defaults, cross-browser (incl. iOS Safari).
 */

.paintcalc-launcher{
  position: fixed !important;
  /* Prevent browser scroll/gestures from stealing pointer events during drag. */
  touch-action: none;
  /* Reset potentially hostile theme transforms/inset rules. */
  transform: none !important;
  inset: auto !important;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Hardening against theme/builder CSS (Avada, etc.) */
  font: 600 13px/1.1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  box-sizing: border-box;
  border-radius: var(--pc-radius, 999px) !important;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  outline: none !important;
  padding: var(--pc-pad, 0px) !important;
  border: var(--pc-border, none) !important;
  box-shadow: var(--pc-shadow, none) !important;
  background: var(--pc-bg, #111) !important;
  color: var(--pc-fg, #fff) !important;
  line-height: 1 !important;
  transition: transform var(--pc-anim-ms, 160ms) ease, opacity 140ms ease;
}

/* Hover/focus animation (desktop)
   IMPORTANT: scale the inner box, not the root. The root is used for dragging/positioning.
*/
.paintcalc-launcher__inner{
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--pc-anim-ms, 160ms) ease;
}
.paintcalc-launcher--has-label .paintcalc-launcher__inner{ gap: 8px; }

.paintcalc-launcher[data-anim="1"]:hover .paintcalc-launcher__inner,
.paintcalc-launcher[data-anim="1"]:focus-visible .paintcalc-launcher__inner{
  transform: scale(var(--pc-hover-scale, 1.08));
}

/* Disable hover/focus scaling while dragging */
.paintcalc-launcher.paintcalc-launcher--dragging .paintcalc-launcher__inner{
  transform: none !important;
}

.paintcalc-launcher[aria-disabled="true"]{
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.paintcalc-launcher__img{
  width: 70%;
  height: 70%;
  object-fit: contain;
  display: block;
  max-width: 100% !important;
  max-height: 100% !important;
  border: 0 !important;
}

.paintcalc-launcher__label{
  padding: 0 12px;
  white-space: nowrap;
}

.paintcalc-launcher__tooltip{
  position: absolute;
  z-index: 1;
  max-width: 240px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(17,17,17,0.95);
  color: #fff;
  font: 500 12px/1.25 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity 140ms ease, transform 140ms ease;
}

/* Global tooltip: fixed-position and strongly isolated from theme builders (Avada, etc.). */
.paintcalc-launcher__tooltip-global{
  position: fixed !important;
  z-index: 2147483000 !important;
  max-width: min(320px, calc(100vw - 16px)) !important;
  pointer-events: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  border: 0 !important;
  white-space: normal !important;
  opacity: 1 !important;
  transform: none !important;
  display: none;
}

.paintcalc-launcher__tooltip.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* Modal open behavior hooks */
body.calc-open .paintcalc-launcher[data-modal-behavior="hide"]{ display: none; }
body.calc-open .paintcalc-launcher[data-modal-behavior="disable"]{ opacity: 0.35; pointer-events: none; }
body.calc-open .paintcalc-launcher[data-modal-behavior="under"]{ z-index: 1 !important; }
