/* ===========================
   Floating Electric Pro Tips (UI)
   =========================== */

/* Container */
.floating-tip {
  position: fixed;
  right: 30px;
  bottom: 100px;                 /* sits above back-to-top */
  z-index: 5000;                 /* stay above carousels/navs */
  display: grid;
  gap: 12px;

  /* interaction gating: off until revealed */
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}
.floating-tip.is-visible {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

/* Lightbulb button */
.floating-tip__btn {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 10px 24px rgba(2,6,23,.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  /* mobile tap reliability */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;

  /* be clickable above the popup */
  position: relative;
  z-index: 2;

  transition: background .2s, box-shadow .2s;
}
.floating-tip__btn i {
  font-size: 1.5rem;
  color: #c28100; /* amber bulb */
  transition: color .2s, text-shadow .3s;
}
.floating-tip__btn:hover i,
.floating-tip.is-open .floating-tip__btn i {
  color: #ffbf00;
  text-shadow: 0 0 8px rgba(255,191,0,.7);
}
.floating-tip__btn * {
  pointer-events: none; /* icon won’t swallow taps */
}

/* Popup */
.floating-tip__pop {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);     /* above the button, not covering it */
  width: min(320px, calc(100vw - 48px));
  background: #fffef9;
  border: 1px solid #fcd34d;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(2,6,23,.22);
  padding: 14px 16px;
  display: none;
  z-index: 1;                     /* below the button */
  pointer-events: auto;           /* allow clicking inside */
}
.floating-tip.is-open .floating-tip__pop {
  display: block;
  animation: fadeInUp .25s ease;
}

/* Header inside popup */
.floating-tip__pop h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.floating-tip__close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  color: #666;
}
.floating-tip__close:hover { color: #cc0000; }

/* Simple keyframe */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Desktop hover: show on hover, too */
@media (hover: hover) and (pointer: fine) {
  .floating-tip:hover .floating-tip__pop {
    display: block;
  }
}

/* Small screens: nudge position */
@media (max-width: 576px) {
  .floating-tip {
    right: 16px;
    bottom: 106px;
  }
}
