/* ============================================================
   ROO REPORTER — CSS
   Drop-in styles for the Report-to-Roo mascot button.
   Requires: roo-btn.png served at the path set in roo.js
   ============================================================ */

/* Roo sits in the corner, out of the way. 52px = standard helper-button footprint. */
.roo-btn {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 40;                    /* below modals (999), above content */
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1f5 0%, #fbcfe8 45%, #ec4899 100%);
  box-shadow:
    0 2px 8px rgba(236, 72, 153, 0.28),
    0 4px 16px rgba(236, 72, 153, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding: 0;
  opacity: 0.88;
  animation: roo-breathe 4s ease-in-out infinite;
  transition: opacity 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.roo-btn:hover {
  opacity: 1;
  animation: roo-hop 0.6s ease-in-out infinite;
  box-shadow:
    0 4px 14px rgba(236, 72, 153, 0.45),
    0 6px 24px rgba(236, 72, 153, 0.25);
}

.roo-btn:active { transform: scale(0.93); }

.roo-img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  transition: transform 0.25s ease;
  pointer-events: none;
}

.roo-btn:hover .roo-img {
  transform: rotate(-5deg) scale(1.04);
}

.roo-speech {
  position: absolute;
  bottom: 100%;
  right: 50%;
  transform: translate(50%, -6px);
  background: #fff;
  color: #be185d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.roo-speech::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-top-color: #fff;
}

.roo-btn:hover .roo-speech {
  opacity: 1;
  transform: translate(50%, -10px);
}

/* Quiet breathing animation (no big movement) */
@keyframes roo-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}

/* Small hop only on hover */
@keyframes roo-hop {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-4px) rotate(1deg); }
}

@media (prefers-reduced-motion: reduce) {
  .roo-btn, .roo-btn:hover { animation: none; transform: none; }
  .roo-btn:hover .roo-img  { transform: none; }
}

/* Hide Roo when a modal is open (she should never overlap other UI) */
body.roo-hidden .roo-btn { display: none; }

/* Modal */
.roo-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.55);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.roo-modal-backdrop.roo-open { display: flex; }

.roo-modal {
  background: rgba(20, 20, 30, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 24px;
  width: 100%;
  max-width: 440px;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.roo-modal-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.roo-modal-header img { width: 64px; height: 64px; filter: drop-shadow(0 2px 8px rgba(236, 72, 153, 0.35)); flex-shrink: 0; }
.roo-modal-title { flex: 1; }
.roo-modal-title h3 { font-size: 18px; font-weight: 700; margin: 0; line-height: 1.2; }
.roo-modal-title p { font-size: 12px; opacity: 0.6; margin: 2px 0 0; }
.roo-modal-close { background: transparent; border: none; color: rgba(255,255,255,0.6); font-size: 22px; cursor: pointer; padding: 0; line-height: 1; }

.roo-type-row { display: flex; gap: 8px; margin-bottom: 16px; }
.roo-type-btn {
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
}
.roo-type-btn.roo-active { background: #ec4899; color: #111; border-color: transparent; }

.roo-message {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 16px;
  font-size: 14px;
  color: #fff;
  resize: none;
  min-height: 100px;
  font-family: inherit;
  box-sizing: border-box;
}
.roo-message::placeholder { color: rgba(255,255,255,0.3); }
.roo-message:focus { outline: none; background: rgba(255,255,255,0.12); }

.roo-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 16px; }
.roo-btn-cancel, .roo-btn-send {
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}
.roo-btn-cancel { background: rgba(255,255,255,0.08); color: #fff; }
.roo-btn-cancel:hover { background: rgba(255,255,255,0.14); }
.roo-btn-send { background: #ec4899; color: #111; padding: 8px 20px; }
.roo-btn-send:hover { filter: brightness(1.1); }
.roo-btn-send:active { transform: scale(0.97); }

.roo-toast {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 1000;
  background: #fff;
  color: #be185d;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.roo-toast.roo-toast-show { opacity: 1; transform: translateY(0); }
