/* Niwa AI — Attention Capture Bubbles */

/* ======================= Attention Capture Bubbles ======================= */

.za-attention-bubble {
  position: fixed;
  z-index: 99998;
  /* Below flyout but above everything else */
  max-width: 300px;
  width: 300px;
  padding: 12px 16px;
  padding-right: 36px;
  /* Space for close button */

  /* Glassmorphism style */
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);

  cursor: pointer;

  /* Animation prep */
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;

  /* Prevent text selection on bubble */
  user-select: none;
  -webkit-user-select: none;
}

/* Bubble Header */
.za-attention-bubble .za-bubble-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.za-attention-bubble .za-bubble-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.za-attention-bubble .za-bubble-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.za-attention-bubble .za-bubble-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 0.2px;
}

.za-attention-bubble.za-bubble-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.za-attention-bubble .za-bubble-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  font-weight: 400;
}

.za-attention-bubble .za-bubble-close {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  width: 20px !important;
  height: 20px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 4px !important;
  color: #666 !important;
  font-size: 18px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.2s ease, color 0.2s ease !important;
  padding: 0 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.za-attention-bubble .za-bubble-close:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #333 !important;
}

.za-attention-bubble:hover {
  background: rgba(236, 233, 230, 0.95);
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.4),
    0 12px 40px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transform: translateY(-2px) scale(1.01);
}

/* Mobile responsive */
@media (max-width: 480px) {
  .za-attention-bubble {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    left: 16px !important;
    right: 16px !important;
    transform: translateX(0) !important;
  }

  .za-attention-bubble.za-bubble-visible {
    transform: translateY(0) translateX(0) !important;
  }
}

/* Fade-in animation */
@keyframes za-bubble-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade-out animation */
@keyframes za-bubble-fade-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(10px);
  }
}