/* Dance Whispers — floating chat bubbles anchored to the side of the page.
   No panel/drawer: bubbles + the input just float over the page content.
   Uses the site's custom properties (--bg-raised, --bg-card, --border,
   --text, --accent, etc). */

.whisper-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(210px, 66vw);
  max-height: min(72vh, 580px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  pointer-events: none; /* the container is a hitbox-free wrapper */
}
.whisper-float > * { pointer-events: auto; }

.whisper-float-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px 6px 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 8px;
  align-self: flex-end;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.whisper-float-title {
  color: var(--text);
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
}
.whisper-minimize {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 4px 6px;
}
.whisper-minimize:hover { color: var(--text); }

.whisper-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.whisper-float.collapsed .whisper-body { display: none; }
.whisper-float.collapsed .whisper-minimize { transform: rotate(180deg); }

.whisper-sub {
  color: var(--text-dim);
  font-size: .76rem;
  line-height: 1.4;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  align-self: flex-end;
}

.whisper-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px;
  max-height: min(42vh, 340px);
}
.whisper-empty {
  color: var(--text-dim);
  font-size: .8rem;
  text-align: center;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
}

.whisper-bubble {
  background: #ffd6e8;
  border: 1px solid #f5aecb;
  border-radius: var(--radius);
  border-top-right-radius: 4px;
  padding: 8px 12px;
  max-width: 100%;
  align-self: flex-end;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  animation: whisper-in .2s ease;
}
.whisper-bubble p {
  color: #4a1830;
  font-size: .88rem;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.whisper-time {
  display: block;
  color: #8a4a68;
  font-size: .7rem;
  margin-top: 4px;
  text-align: right;
}
@keyframes whisper-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.whisper-form {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  padding: 10px;
  display: grid;
  gap: 6px;
}
.whisper-form textarea {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-family: inherit;
  font-size: .86rem;
  resize: none;
}
.whisper-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.whisper-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.whisper-count {
  color: var(--text-dim);
  font-size: .73rem;
}
.whisper-count.low { color: var(--danger); }
.whisper-form button[type="submit"] {
  background: var(--accent);
  color: #0e1420;
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
}
.whisper-form button[type="submit"]:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.whisper-msg {
  color: var(--text-dim);
  font-size: .75rem;
  min-height: 1em;
}
.whisper-msg.error { color: var(--danger); }

@media (max-width: 640px) {
  .whisper-float { width: min(180px, 65vw); right: 10px; bottom: 10px; }
  .whisper-sub { display: none; } /* save vertical space on small screens */
}
