/* === Fix: prevent page overflow and ensure overlays sit above laser-grid === */
html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  font-family: system-ui, Arial, sans-serif;
}

/* Laser grid behind everything */
.laser-grid {
  position: fixed;
  z-index: 0 !important;
}

/* Backdrop */
.mycc-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.95) !important; /* Slight transparency */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 20000 !important;
  display: none;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.mycc-backdrop.active {
  display: block;
  pointer-events: auto;
  opacity: 1;
}

/* Banner */
.mycc-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 720px;
  width: calc(100% - 48px);
  z-index: 30000 !important;
  background: #fff !important;
  border: 1px solid #ddd !important;
  border-radius: 12px !important;
  padding: 20px;
  color: #111 !important;
  box-shadow: none !important;
  animation: mycc-slideUp 0.4s ease-out;
  transition: opacity 0.25s ease;
}

/* Banner text */
.mycc-title {
  font-size: clamp(16px, 1.2vw, 19px);
  margin: 0 0 10px;
  font-weight: 600;
  color: #111 !important;
}
.mycc-desc {
  font-size: clamp(13px, 1vw, 14px);
  margin: 0 0 14px;
  line-height: 1.6;
  color: #111 !important;
}
.mycc-links a {
  font-size: 13px;
  text-decoration: underline;
  color: #bfa15c;
}

/* Buttons */
.mycc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.mycc-btn {
  flex: 1 1 auto;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid #ccc;
  background: #fdfdfd;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.25s ease;
  color: #111 !important;
  outline: none;
}
.mycc-btn:hover,
.mycc-btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.mycc-btn.primary {
  background: #bfa15c;
  color: #fff;
  border-color: #bfa15c;
}
.mycc-btn.reject {
  background: #fff;
  border-color: #222;
  color: #222;
}
.mycc-btn.prefs {
  background: #fff;
  border-color: #ccc;
  color: #111;
}

/* Modal */
.mycc-modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 12px;
  z-index: 30000 !important;
  background: transparent !important;
}
.mycc-modal.active {
  display: flex;
}
.mycc-modal-box {
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 780px;
  width: 100%;
  padding: 24px;
  border-radius: 14px !important;
  border: 1px solid #ddd !important;
  background: #fff !important;
  box-shadow: none !important;
  color: #111 !important;
  box-sizing: border-box;
}
.mycc-modal-box h4, .mycc-modal-box label, .mycc-modal-box p, .mycc-modal-box span {
  color: #111 !important;
  font-size: clamp(13px, 1vw, 16px);
}

/* Groups & Switch */
.mycc-group {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}
.mycc-group h4 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #111 !important;
}
.mycc-switch {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mycc-switch input {
  transform: scale(1.3);
}

/* Notes */
.mycc-note {
  font-size: 13px;
  color: #111 !important;
  margin-top: 6px;
}

/* Mobile adjustments */
@media(max-width:600px) {
  .mycc-banner {
    bottom: 12px;
    padding: 16px;
    border-radius: 10px !important;
  }
  .mycc-actions {
    flex-direction: column;
  }
  .mycc-btn {
    width: 100%;
    text-align: center;
    padding: 14px 0;
  }
  .mycc-modal-box {
    width: 90%;
    padding: 20px;
  }
}

/* Animation */
@keyframes mycc-slideUp {
  0% {
    transform: translate(-50%, 50px);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* Hide banner when modal opens */
.mycc-modal.active ~ .mycc-banner {
  display: none;
}

/* Activate backdrop when modal opens */
.mycc-modal.active ~ .mycc-backdrop {
  display: block;
  pointer-events: auto;
  opacity: 1;
}
