/* ═══ Mira sitewide support chat ═══ */
.mira-chat-root {
  position: fixed;
  z-index: 9800;
  right: 18px;
  bottom: 18px;
  font-family: inherit;
  color: var(--text, #e8e8ee);
}
.mira-chat-fab {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(201,168,76,0.35);
  background: linear-gradient(145deg, rgba(22,22,31,0.96), rgba(14,14,20,0.98));
  color: var(--text, #e8e8ee);
  border-radius: 999px;
  padding: 8px 14px 8px 8px;
  cursor: pointer;
  box-shadow: 0 10px 32px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.04);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.mira-chat-fab:hover {
  transform: translateY(-1px);
  border-color: rgba(201,168,76,0.55);
  box-shadow: 0 14px 36px rgba(0,0,0,0.5), 0 0 24px rgba(179,136,255,0.12);
}
.mira-chat-fab img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(201,168,76,0.35);
}
.mira-chat-fab-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  text-align: left;
}
.mira-chat-fab-label strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent, #c9a84c);
}
.mira-chat-fab-label span {
  font-size: 0.68rem;
  color: var(--text2, #9393a5);
}
.mira-chat-panel {
  display: none;
  width: min(380px, calc(100vw - 28px));
  height: min(520px, calc(100vh - 100px));
  flex-direction: column;
  background: var(--surface, #16161f);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(179,136,255,0.08);
  margin-bottom: 10px;
}
.mira-chat-root.is-open .mira-chat-panel { display: flex; }
.mira-chat-root.is-open .mira-chat-fab { display: none; }
.mira-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  background: linear-gradient(135deg, rgba(201,168,76,0.12), rgba(179,136,255,0.1));
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mira-chat-header img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.mira-chat-header .meta { flex: 1; min-width: 0; }
.mira-chat-header .meta strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
}
.mira-chat-header .meta span {
  font-size: 0.7rem;
  color: var(--text2, #9393a5);
}
.mira-chat-close,
.mira-chat-clear {
  border: 0;
  background: rgba(255,255,255,0.06);
  color: var(--text2, #9393a5);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}
.mira-chat-clear { font-size: 0.95rem; }
.mira-chat-close:hover,
.mira-chat-clear:hover { color: var(--text); background: rgba(255,255,255,0.1); }
.mira-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg, #0b0b0f);
}
.mira-chat-bubble {
  max-width: 92%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 0.84rem;
  line-height: 1.5;
  word-wrap: break-word;
}
.mira-chat-bubble.bot {
  align-self: flex-start;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-bottom-left-radius: 4px;
}
.mira-chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(201,168,76,0.22), rgba(179,136,255,0.18));
  border: 1px solid rgba(201,168,76,0.25);
  border-bottom-right-radius: 4px;
}
.mira-chat-bubble a { color: var(--accent, #c9a84c); }
.mira-chat-bubble.typing { opacity: 0.75; font-style: italic; }
.mira-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 10px;
  background: var(--bg, #0b0b0f);
}
.mira-chat-chip {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text2, #9393a5);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s;
}
.mira-chat-chip:hover {
  border-color: rgba(201,168,76,0.35);
  color: var(--accent, #c9a84c);
}
.mira-chat-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: var(--surface, #16161f);
}
.mira-chat-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.25);
  color: var(--text, #e8e8ee);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
}
.mira-chat-form input:focus { border-color: rgba(201,168,76,0.4); }
.mira-chat-form button {
  border: 0;
  border-radius: 10px;
  padding: 0 14px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent, #c9a84c), #b89430);
  color: #0b0b0f;
}
.mira-chat-form button:disabled { opacity: 0.5; cursor: not-allowed; }
.mira-chat-foot {
  font-size: 0.62rem;
  color: var(--text3, #666);
  padding: 0 12px 10px;
  background: var(--surface, #16161f);
  line-height: 1.4;
}
.mira-chat-foot a { color: var(--accent, #c9a84c); }
@media (max-width: 520px) {
  .mira-chat-root { right: 12px; bottom: 12px; }
  .mira-chat-fab-label span { display: none; }
  .mira-chat-panel { height: min(70vh, 520px); }
}
