/* Collective Mind Foundry — Manifest Bubbles Overlay
   Drop-in module: this file does not change your existing page background.
*/

.cmf-bubble-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow: hidden;
  pointer-events: none;
  contain: layout style;
}

.cmf-bubble {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--bubble-size, 220px);
  min-height: var(--bubble-size, 220px);
  display: grid;
  place-items: center;
  padding: 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  font: 600 15px/1.34 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  letter-spacing: -0.01em;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.88), transparent 0.55rem),
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.28), transparent 4.4rem),
    radial-gradient(circle at 72% 70%, rgba(120, 215, 255, 0.20), transparent 4.6rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045));
  box-shadow:
    inset 0 0 24px rgba(255, 255, 255, 0.13),
    inset 14px 18px 34px rgba(255, 255, 255, 0.08),
    0 22px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  pointer-events: auto;
  user-select: none;
  cursor: pointer;
  will-change: transform, opacity;
  transform: translate3d(-999px, -999px, 0);
  opacity: 0;
  transition: opacity 360ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.cmf-bubble::before,
.cmf-bubble::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.cmf-bubble::before {
  inset: 10%;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.cmf-bubble::after {
  width: 22%;
  height: 22%;
  left: 22%;
  top: 18%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.34), transparent 68%);
  filter: blur(1px);
}

.cmf-bubble.is-visible {
  opacity: 1;
}

.cmf-bubble.is-paused {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 0 28px rgba(255, 255, 255, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.20),
    0 28px 90px rgba(0, 0, 0, 0.34);
}

.cmf-bubble.is-accepted {
  box-shadow:
    inset 0 0 32px rgba(255, 255, 255, 0.22),
    0 0 34px rgba(138, 255, 223, 0.18),
    0 28px 90px rgba(0, 0, 0, 0.34);
}

.cmf-bubble.is-rejected {
  opacity: 0;
  transform: translate3d(var(--x, 0), var(--y, 0), 0) scale(1.18) !important;
  filter: blur(7px);
}

.cmf-bubble-text {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.44);
}

.cmf-bubble-actions {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.cmf-bubble.is-paused .cmf-bubble-actions {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.cmf-bubble-button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  min-width: 54px;
  min-height: 32px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(0, 0, 0, 0.28);
  font: 700 13px/1 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.cmf-bubble-button:hover,
.cmf-bubble-button:focus-visible {
  background: rgba(255, 255, 255, 0.20);
  outline: none;
}

@media (max-width: 760px) {
  .cmf-bubble {
    width: var(--bubble-size, 176px);
    min-height: var(--bubble-size, 176px);
    padding: 22px;
    font-size: 13px;
  }

  .cmf-bubble-actions {
    bottom: 14px;
  }

  .cmf-bubble-button {
    min-width: 48px;
    min-height: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cmf-bubble-layer {
    display: none;
  }
}
