/* Solar Smart Haven (太陽能智安居) - custom bits on top of Tailwind CDN */

* { -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior-y: contain; }

/* ----------------------------- toast ------------------------------- */
.toast {
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.toast.toast-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ----------------------- toggle switches --------------------------- */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex: 0 0 auto;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #d1d5db;
  transition: .3s;
  border-radius: 999px;
}
.slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .slider { background-color: #16a34a; }
.switch input:checked + .slider::before { transform: translateX(22px); }

/* --------------------------- animations ---------------------------- */
@keyframes bounce-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.animate-bounce-slow { animation: bounce-slow 3s ease-in-out infinite; }
