/* ─── Chat Widget Enhancements ─── */

/* Draggable cursor */
.chat-fab {
  cursor: grab;
  touch-action: none; /* prevent scroll interference while dragging */
}
.chat-fab:active {
  cursor: grabbing;
}

/* ─── Persona Toggle ─── */
.chat-persona-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(0, 0, 0, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.78rem;
}

.chat-persona-label {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-persona-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.chat-persona-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.chat-persona-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  cursor: pointer;
  transition: background 200ms ease;
}

.chat-persona-slider::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 200ms ease;
}

.chat-persona-switch input:checked + .chat-persona-slider {
  background: rgba(255, 255, 255, 0.6);
}

.chat-persona-switch input:checked + .chat-persona-slider::before {
  transform: translateX(16px);
}

.chat-persona-switch input:focus-visible + .chat-persona-slider {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.chat-persona-status {
  color: #fff;
  font-weight: 700;
  font-size: 0.76rem;
  white-space: nowrap;
}

/* ─── EU AI Act Disclaimer ─── */
.chat-ai-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 14px;
  margin: 4px 12px;
  background: #fffbe6;
  border: 1px solid #f0d78c;
  border-radius: 8px;
  font-size: 0.7rem;
  line-height: 1.35;
  color: #5a4a1a;
  animation: chat-disclaimer-fadein 0.3s ease;
}

.chat-ai-disclaimer-icon {
  flex-shrink: 0;
  font-size: 0.85rem;
  margin-top: 1px;
}

.chat-ai-disclaimer-text {
  flex: 1;
}

.chat-ai-disclaimer-text a {
  color: #2b6cb0;
  text-decoration: underline;
  font-weight: 600;
  white-space: nowrap;
}

.chat-ai-disclaimer-text a:hover {
  color: #1a365d;
}

@keyframes chat-disclaimer-fadein {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .chat-ai-disclaimer {
    font-size: 0.65rem;
    padding: 6px 10px;
    margin: 2px 8px;
  }
}

/* ─── Responsive persona toggle ─── */
@media (max-width: 480px) {
  .chat-persona-toggle {
    padding: 6px 14px;
    gap: 6px;
  }
  .chat-persona-label {
    display: none; /* save space on small screens */
  }
}
