/* MBMusic PRO.App — Stile des Support-Chat-Widgets (assets/chat.js). */
/* ===== Chat-Assistent ===== */
#chat-fab {
  position: fixed;
  right: 1.25rem; bottom: 1.25rem;
  z-index: 60;
  width: 3.5rem; height: 3.5rem;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #22d3ee, #0e7490);
  color: #06202a;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.3), 0 4px 12px rgba(2, 8, 23, 0.5);
  transition: transform 0.2s ease, opacity 0.25s ease, visibility 0.25s ease;
  opacity: 0; visibility: hidden;
}
#chat-fab.is-visible { opacity: 1; visibility: visible; }
#chat-fab:hover { transform: scale(1.06); }
#chat-fab svg { width: 1.6rem; height: 1.6rem; }
#chat-panel {
  position: fixed;
  right: 1.25rem; bottom: 1.25rem;
  z-index: 70;
  width: min(23rem, calc(100vw - 2.5rem));
  height: min(34rem, calc(100vh - 2.5rem));
  display: flex; flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 1.1rem;
  background: rgba(12, 12, 18, 0.97);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(2, 8, 23, 0.7);
  overflow: hidden;
  opacity: 0; visibility: hidden;
  transform: translateY(0.75rem);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
#chat-panel.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.chat-head {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(18, 18, 26, 0.8);
  flex-shrink: 0;
}
.chat-head img { width: 1.9rem; height: 1.9rem; border-radius: 26%; }
.chat-head .chat-title { color: #fff; font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.chat-head .chat-sub { color: #64748b; font-size: 0.72rem; line-height: 1.3; }
#chat-close {
  margin-left: auto;
  color: #94a3b8;
  width: 1.9rem; height: 1.9rem;
  border-radius: 0.5rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; line-height: 1;
  transition: color 0.15s ease, background 0.15s ease;
}
#chat-close:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
#chat-log {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem;
  display: flex; flex-direction: column; gap: 0.7rem;
}
.chat-msg {
  max-width: 85%;
  padding: 0.65rem 0.85rem;
  border-radius: 0.85rem;
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-msg.bot {
  align-self: flex-start;
  background: rgba(30, 41, 59, 0.75);
  color: #e2e8f0;
  border-bottom-left-radius: 0.25rem;
}
.chat-msg.user {
  align-self: flex-end;
  background: rgba(34, 211, 238, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.28);
  color: #e6fbff;
  border-bottom-right-radius: 0.25rem;
}
.chat-msg.error {
  align-self: flex-start;
  background: rgba(127, 29, 29, 0.35);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fecaca;
}
.chat-msg a { color: #22d3ee; text-decoration: underline; }
.chat-typing { display: flex; gap: 0.28rem; align-items: center; }
.chat-typing span {
  width: 0.4rem; height: 0.4rem;
  border-radius: 999px;
  background: #64748b;
  animation: chatBlink 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.18s; }
.chat-typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes chatBlink {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-0.15rem); }
}
.chat-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0.7rem 0.8rem 0.8rem;
  background: rgba(18, 18, 26, 0.8);
  flex-shrink: 0;
}
.chat-row { display: flex; gap: 0.5rem; align-items: flex-end; }
#chat-input {
  flex: 1;
  resize: none;
  max-height: 6rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 10, 15, 0.85);
  color: #e2e8f0;
  font-size: 0.9rem;
  line-height: 1.45;
  font-family: inherit;
}
#chat-input::placeholder { color: #64748b; }
#chat-input:focus { outline: none; border-color: #22d3ee; }
#chat-send {
  flex-shrink: 0;
  width: 2.3rem; height: 2.3rem;
  border-radius: 0.65rem;
  display: flex; align-items: center; justify-content: center;
  background: #22d3ee;
  color: #06202a;
  transition: opacity 0.15s ease;
}
#chat-send svg { width: 1.05rem; height: 1.05rem; }
#chat-send:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-note {
  margin-top: 0.5rem;
  font-size: 0.68rem;
  line-height: 1.4;
  color: #64748b;
  text-align: center;
}
.chat-note a { color: #94a3b8; text-decoration: underline; }
@media (max-width: 480px) {
  #chat-panel {
    right: 0; bottom: 0;
    width: 100vw; height: 100dvh;
    border-radius: 0;
    border: none;
  }
}
