/* ===========================
   Celebration of Lights — Full CSS
   =========================== */

/* Vars */
:root {
  --nhf-blue: #14345a;
  --text-dark: #222;
  --text-mid: #444;
}

/* Page title (Avada override) */
.fusion-page-title-bar.fusion-tb-page-title-bar {
  background-color: #14345a;
}
.fusion-page-title-bar.fusion-tb-page-title-bar h2.fusion-title-heading.title-heading-left {
  color: #fff !important;
  font-weight: bold;
  text-align: center;
}

/* Background + tree container */
#tree-background-wrapper {
  background-image: url('https://niagarahealthfoundation.com/wp-content/uploads/2025/05/col_tree_background-01.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 2rem 0;
}
#tree-container {
  width: 100%;
  max-width: 600px;
  aspect-ratio: 600 / 757;
  height: auto;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
#tree-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
#lights-layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  transition: opacity 0.4s ease-in-out;
}
#lights-layer.page-transition {
  opacity: 0;
}

/* Bulb placement */
.light-bulb-wrapper {
  position: absolute;
  transform-origin: center center;
  transform: rotate(var(--rotation));
}
.light-bulb-wrapper img.svg-bulb {
  width: 16.5px; height: 32px;
  display: block; z-index: 2;
  cursor: default;
  transition: filter 0.3s ease, opacity 0.3s ease;
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.6));
}

/* Hover & pulse glow */
.light-bulb-wrapper:hover img.svg-bulb,
.light-bulb-wrapper.pulse img.svg-bulb {
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.6))
          drop-shadow(0 0 12px var(--glow-color));
}
.light-bulb-wrapper.pulse {
  animation: pulseGlow 1s ease-in-out infinite alternate;
}
@keyframes pulseGlow {
  0% {
    transform: scale(1) rotate(var(--rotation));
    filter: drop-shadow(0 0 4px rgba(0,0,0,0.6))
            drop-shadow(0 0 6px var(--glow-color));
  }
  100% {
    transform: scale(1.2) rotate(var(--rotation));
    filter: drop-shadow(0 0 4px rgba(0,0,0,0.6))
            drop-shadow(0 0 16px var(--glow-color));
  }
}

/* Dim other bulbs */
.bulb-dim .light-bulb-wrapper:not(:hover):not(.pulse) img.svg-bulb {
  opacity: 0.6;
}

/* Tooltip */
.live-tooltip {
  position: absolute;
  background: #fff;
  color: #333;
  padding: 10px 14px;
  border-radius: 6px;
  font-family: "Myriad Pro","Segoe UI","Helvetica Neue",Helvetica,Arial,sans-serif;
  font-size: 14px;
  line-height: 1.4;
  font-weight: normal;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  white-space: normal;
  max-width: 240px;
  width: max-content;
  z-index: 99999;
  pointer-events: none;
  overflow: visible;
  transform: translateX(-50%);
}
.live-tooltip.locked {
  pointer-events: auto;
}

/* Close “X” button */
.live-tooltip .close-tooltip {
  position: absolute;
  top: -12px; right: -12px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-weight: 800;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.06),
              0 0 10px rgba(0,0,0,0.30);
  cursor: pointer;
  user-select: none;
}
.live-tooltip .close-tooltip:hover {
  transform: translateY(-1px);
}
.live-tooltip .close-tooltip:active {
  transform: translateY(0);
}

/* Search bar */
#tree-search {
  text-align: center;
  margin-bottom: 0rem;
  padding: 1rem 0 1.5rem 0;
  background-color: #14345a;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
#tree-search input {
  padding: 12px;
  font-size: 15.4px;
  width: 60%;
  max-width: 300px;
  border: 1px solid #ccc;
  border-radius: 6px;
  height: 46px;
  box-sizing: border-box;
}
#tree-search button {
  padding: 0 20px;
  font-size: 15.4px;
  background: #fff;
  color: #14345a;
  font-weight: bold;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  height: 46px;
  line-height: 1;
  box-sizing: border-box;
}

/* Autocomplete dropdown */
.ui-autocomplete {
  z-index: 10000 !important;
  background: #fff;
  border: 1px solid #ccc;
  max-height: 200px;
  overflow-y: auto;
  position: absolute;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: 8px;
}
.ui-menu, .ui-menu li, .ui-menu .ui-menu-item {
  list-style: none !important;
  background-image: none !important;
}
.ui-menu .ui-menu-item-wrapper {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 15.4px;
  color: var(--text-dark);
}
.ui-menu .ui-menu-item-wrapper.alt-row {
  background: #f7f7f7;
}
.ui-menu .ui-state-active {
  margin: 0 !important;
  background: var(--nhf-blue) !important;
  color: #fff !important;
  border: none !important;
}

/* Pagination Chevrons ❮ ❯ */
#prev-page, #next-page {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  opacity: 0.85;
  text-shadow: 0 0 6px rgba(0,0,0,0.65),
               0 0 18px rgba(0,0,0,0.85);
  font-weight: 800;
  font-size: clamp(28px, 5vw, 64px);
  line-height: 1;
  padding: 8px 10px;
  cursor: pointer;
  user-select: none;
  z-index: 3;
}
#prev-page { left: 6px; }
#next-page { right: 6px; }
#prev-page:hover, #next-page:hover {
  opacity: 1;
  text-shadow: 0 0 8px rgba(0,0,0,0.7),
               0 0 24px rgba(0,0,0,0.95);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #tree-search input {
    width: 85%;
    max-width: 85vw;
  }
  .ui-autocomplete {
    max-width: 90vw;
  }
  #prev-page, #next-page {
    font-size: clamp(24px, 7vw, 52px);
    padding: 6px 8px;
  }
  .live-tooltip {
    max-width: 90vw;
    left: 50% !important;
    transform: translateX(-50%);
  }
}