/* CBT Cookie Popup */
#cbtCookieBar {
  display: none;
  position: fixed;
  left: 16px;
  right: 16px;

  /* Safe area support (iPhone notch etc) */
  bottom: calc(16px + env(safe-area-inset-bottom));

  z-index: 2147483647; /* super high to stay on top */
  background: #111827;
  color: #fff;

  padding: 14px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));

  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* animation when it appears */
  animation: cbtIn 420ms ease-out both, cbtFloat 3.5s ease-in-out 420ms infinite;
  will-change: transform, opacity;
}

@keyframes cbtIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* gentle floating up-down */
@keyframes cbtFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

#cbtCookieBar .cbtRow {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

#cbtCookieBar a {
  color: #7dd3fc;
  text-decoration: underline;
}

#cbtCookieBar .cbtBtns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#cbtCookieBar button {
  border: 0;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  transition: transform 120ms ease, filter 120ms ease;
}

#cbtCookieBar button:active {
  transform: scale(0.98);
}

/* Blue buttons */
#cbtAccept {
  background: #0077ffe6;
  color: #ffff;
}
#cbtAccept:hover { filter: brightness(1.05); }

#cbtReject {
  background: rgba(37, 99, 235, 0.15); /* light blue */
  color: #bfdbfe;
  border: 1px solid rgba(37, 99, 235, 0.45);
}
#cbtReject:hover { filter: brightness(1.08); }

/* ✅ Mobile layout fix */
@media (max-width: 576px) {
  #cbtCookieBar {
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    border-radius: 12px;
  }

  #cbtCookieBar .cbtRow {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  #cbtCookieBar .cbtBtns {
    width: 100%;
  }

  #cbtCookieBar button {
    width: 100%;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  #cbtCookieBar { animation: none; }
}
