/* victoria-widget.css — floating AI receptionist widget.
   Scoped under .victoria-root to avoid clobbering host page styles. */

.victoria-root, .victoria-root *, .victoria-root *::before, .victoria-root *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.victoria-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  color: rgb(247, 247, 247);
}

/* Floating bubble */
.victoria-bubble {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgb(40, 175, 160);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  border: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}
.victoria-bubble:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
.victoria-bubble svg { width: 26px; height: 26px; }

/* Status dot */
.victoria-status-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgb(22, 22, 22);
  background: rgb(230, 175, 70); /* amber default (pre-trained / stub) */
}
.victoria-status-dot.ok    { background: rgb(80, 180, 120); }
.victoria-status-dot.stub  { background: rgb(230, 175, 70); }
.victoria-status-dot.error { background: rgb(220, 90, 90); }

/* Panel */
.victoria-panel {
  display: none;
  width: 320px;
  height: 460px;
  background: rgb(30, 30, 30);
  border: 1px solid rgb(60, 60, 60);
  border-radius: 10px;
  overflow: hidden;
  flex-direction: column;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  position: absolute;
  right: 0;
  bottom: 72px;
}
.victoria-root.open .victoria-panel { display: flex; }
.victoria-root.open .victoria-bubble { display: none; }

.victoria-header {
  background: rgb(38, 38, 38);
  border-bottom: 1px solid rgb(60, 60, 60);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.victoria-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}
.victoria-header-title .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(230, 175, 70);
}
.victoria-header-title .dot.ok    { background: rgb(80, 180, 120); }
.victoria-header-title .dot.error { background: rgb(220, 90, 90); }
.victoria-header-actions { display: flex; gap: 6px; }
.victoria-icon-btn {
  background: none;
  border: none;
  color: rgb(164, 164, 164);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 1.05rem;
  line-height: 1;
}
.victoria-icon-btn:hover { color: rgb(247, 247, 247); background: rgba(255, 255, 255, 0.06); }

.victoria-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgb(22, 22, 22);
}
.victoria-msg {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.45;
  word-wrap: break-word;
}
.victoria-msg.assistant {
  background: rgb(38, 38, 38);
  color: rgb(247, 247, 247);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}
.victoria-msg.user {
  background: rgb(40, 175, 160);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}
.victoria-msg.system {
  background: rgba(220, 90, 90, 0.15);
  border: 1px solid rgba(220, 90, 90, 0.4);
  color: rgb(255, 180, 180);
  align-self: stretch;
  text-align: center;
  font-size: 0.82rem;
}
.victoria-typing {
  align-self: flex-start;
  font-size: 0.8rem;
  color: rgb(127, 128, 128);
  padding: 4px 10px;
}

/* Per-message thumbs feedback bar (sits directly below an assistant message) */
.victoria-feedback {
  align-self: flex-start;
  display: flex;
  gap: 6px;
  margin-top: -4px;
  padding-left: 4px;
}
.victoria-fb-btn {
  background: transparent;
  border: 1px solid rgb(60, 60, 60);
  color: rgb(247, 247, 247);
  width: 26px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.victoria-fb-btn:hover {
  border-color: rgb(40, 175, 160);
  background: rgba(40, 175, 160, 0.1);
}
.victoria-feedback-thanks {
  align-self: flex-start;
  font-size: 0.75rem;
  color: rgb(127, 128, 128);
  padding: 2px 4px;
  margin-top: -4px;
}

.victoria-input-row {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid rgb(60, 60, 60);
  background: rgb(30, 30, 30);
}
.victoria-input {
  flex: 1;
  background: rgb(22, 22, 22);
  border: 1px solid rgb(60, 60, 60);
  color: rgb(247, 247, 247);
  padding: 9px 11px;
  border-radius: 6px;
  font-size: 0.9rem;
  outline: none;
}
.victoria-input:focus { border-color: rgb(40, 175, 160); }
.victoria-send {
  background: rgb(40, 175, 160);
  color: white;
  border: none;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.victoria-send:hover:not(:disabled) { opacity: 0.9; }
.victoria-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* Hidden bubble (user dismissed) */
.victoria-root.hidden { display: none; }

/* Mobile: full width panel */
@media (max-width: 480px) {
  .victoria-root { right: 12px; bottom: 12px; }
  .victoria-panel {
    width: calc(100vw - 24px);
    height: 70vh;
    right: 0;
    bottom: 72px;
  }
}
