/* ── Floating Gold Button ── */
#ldm-chat-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F5C518, #E6A800);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(245,197,24,0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}
#ldm-chat-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(245,197,24,0.6);
}
#ldm-chat-btn svg {
  width: 24px;
  height: 24px;
  stroke: #0d0d0c;
}

/* Widget standardmäßig versteckt, nur per Button sichtbar */
.zammad-chat:not(.ldm-visible) { display: none !important; }
.zammad-chat.ldm-visible { display: flex !important; }

/* ── Chat-Fenster ── */
.zammad-chat {
  position: fixed !important;
  bottom: 5.5rem !important;
  right: 2rem !important;
  width: 340px !important;
  max-width: calc(100vw - 2rem) !important;
  z-index: 9998 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6) !important;
  font-family: 'Space Grotesk', sans-serif !important;
  background: #0d0d0c !important;
  color: rgba(255,255,255,0.85) !important;
}

/* ── Dark Theme ── */
.zammad-chat-header { background: #111110 !important; cursor: pointer !important; }
.zammad-chat-agent  { color: #fff !important; font-weight: 700 !important; }
.zammad-chat-welcome, .zammad-chat-body { background: #0d0d0c !important; color: rgba(255,255,255,0.75) !important; }
.zammad-chat-controls { background: #111110 !important; border-top: 1px solid rgba(255,255,255,0.07) !important; }
.zammad-chat-input { background: rgba(255,255,255,0.05) !important; border: 1px solid rgba(255,255,255,0.1) !important; border-radius: 10px !important; color: #fff !important; }
.zammad-chat-input:focus { border-color: rgba(245,197,24,0.4) !important; outline: none !important; }
.zammad-chat-message--agent .zammad-chat-message-body { background: rgba(255,255,255,0.07) !important; color: rgba(255,255,255,0.85) !important; border-radius: 12px 12px 12px 4px !important; }
.zammad-chat-message--customer .zammad-chat-message-body { background: linear-gradient(135deg,#F5C518,#E6A800) !important; color: #0d0d0c !important; font-weight: 600 !important; border-radius: 12px 12px 4px 12px !important; }
.zammad-chat-button.zammad-chat-send { background: linear-gradient(135deg,#F5C518,#E6A800) !important; color: #0d0d0c !important; border: none !important; border-radius: 10px !important; font-weight: 700 !important; }

/* ── Mobile nav open: chat button wegblenden ── */
body:has(.ldm-mobile-nav.open) #ldm-chat-btn { display: none !important; }
body:has(.ldm-mobile-nav.open) .zammad-chat { display: none !important; }

/* ── Mobile ── */
@media (max-width: 640px) {
  #ldm-chat-btn { bottom: 1.25rem; right: 1.25rem; width: 48px; height: 48px; }
  .zammad-chat {
    right: 0.5rem !important;
    left: 0.5rem !important;
    width: auto !important;
    bottom: 4.5rem !important;
    max-height: calc(100svh - 5.5rem) !important;
    border-radius: 12px !important;
  }
  .zammad-chat-body,
  .zammad-chat-welcome {
    max-height: 45vh !important;
    overflow-y: auto !important;
  }
}
