/* ═══════════════════════════════════════════════════════════════════════════
   DragonBox Chat Widget  –  dragonboxchat.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Variables & reset ───────────────────────────────────────────────────── */
#dbc-widget *,
#dbc-widget *::before,
#dbc-widget *::after {
  box-sizing: border-box;
  margin: 0;
}

/* ── Widget wrapper ──────────────────────────────────────────────────────── */
#dbc-widget {
  position: fixed;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none; /* container selbst blockiert nie Klicks */
}

/* Desktop positions */
#dbc-widget.dbc-pos-desktop-bottom-right {
  bottom: 24px;
  right:  24px;
  align-items: flex-end;
}
#dbc-widget.dbc-pos-desktop-bottom-left {
  bottom: 24px;
  left:   24px;
  align-items: flex-start;
}

/* Mobile overrides */
@media (max-width: 767px) {
  #dbc-widget.dbc-pos-mobile-bottom-right {
    bottom: 80px;
    right:  10px;
    left: auto;
    align-items: flex-end;
  }
  #dbc-widget.dbc-pos-mobile-bottom-left {
    bottom: 16px;
    left:   16px;
    right: auto;
    align-items: flex-start;
  }
}

/* ── Main toggle button ──────────────────────────────────────────────────── */
.dbc-toggle {
  width:  58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dbc-main, #2ecc71);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  transition: transform .2s ease, box-shadow .2s ease;
  outline: none;
  flex-shrink: 0;
  pointer-events: auto; /* Button muss klickbar bleiben */
}

.dbc-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}

.dbc-toggle svg {
  width:  26px;
  height: 26px;
  transition: transform .3s ease, opacity .3s ease;
}

/* Icon swap open/close */
.dbc-icon-close { display: none; }
.dbc-toggle.dbc-active .dbc-icon-open  { display: none; }
.dbc-toggle.dbc-active .dbc-icon-close { display: flex; }

/* ── Icon carousel ───────────────────────────────────────────────────────── */
.dbc-icon-open {
  position: relative;
  width:  26px;
  height: 26px;
}

/* Each slot fills the button icon area and cross-fades */
.dbc-carousel-slot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.7) rotate(-15deg);
  transition: opacity .4s ease, transform .4s ease;
  color: #fff;
}

.dbc-carousel-slot.dbc-cs-active {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.dbc-carousel-slot svg {
  width:  26px;
  height: 26px;
}

/* ── Wobble animation ────────────────────────────────────────────────────── */
@keyframes dbc-wobble {
  0%  { transform: rotate(0deg)   scale(1); }
  15% { transform: rotate(-12deg) scale(1.1); }
  30% { transform: rotate(10deg)  scale(1.1); }
  45% { transform: rotate(-8deg)  scale(1.05); }
  60% { transform: rotate(6deg)   scale(1.05); }
  75% { transform: rotate(-4deg)  scale(1); }
  90% { transform: rotate(2deg)   scale(1); }
  100%{ transform: rotate(0deg)   scale(1); }
}

.dbc-toggle.dbc-wobble {
  animation: dbc-wobble .7s ease;
}

/* ── Speech bubble ───────────────────────────────────────────────────────── */
.dbc-bubble {
  position: absolute;
  bottom: 70px;
  right: 0;
  background: #fff;
  color: #000;
  border-radius: 12px 12px 0 12px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 4px 18px rgba(0,0,0,.15);
  white-space: nowrap;
  max-width: 220px;
  pointer-events: none; /* unsichtbar = kein Blocking */
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px) scale(.95);
  transition: opacity .3s ease, transform .3s ease;
}

/* left-side adjustment */
.dbc-pos-desktop-bottom-left .dbc-bubble,
.dbc-pos-mobile-bottom-left  .dbc-bubble {
  border-radius: 12px 12px 12px 0;
  right: auto;
  left: 0;
}

.dbc-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 14px;
  border: 8px solid transparent;
  border-top-color: #fff;
  border-bottom: 0;
}

.dbc-pos-desktop-bottom-left .dbc-bubble::after,
.dbc-pos-mobile-bottom-left  .dbc-bubble::after {
  right: auto;
  left: 14px;
}

.dbc-bubble.dbc-bubble-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto; /* nur wenn sichtbar klickbar */
}

/* ── Channel menu ────────────────────────────────────────────────────────── */
.dbc-menu {
  list-style: none;
  background-color: rgba(20, 20, 20, 0.7);
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 15px;
  border-radius: 40px;
  backdrop-filter: blur(1px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px) scale(.96);
  transition: opacity .25s ease, transform .25s ease;
}

.dbc-menu.dbc-open {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.dbc-channel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  background: rgba(80,80,80,0.6);
  border-radius: 28px;
  text-decoration: none;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(0,0,0,.14);
  transition: transform .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}

.dbc-channel:hover {
  transform: translateX(-3px);
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  color: #ee5c04;
  text-decoration: none;
}

.dbc-ch-icon {
  width:  34px;
  height: 34px;
  border-radius: 50%;
  background: var(--dbc-ch-color, #333);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.dbc-ch-icon svg {
  width:  18px;
  height: 18px;
}

/* left-side: items slide in from left */
.dbc-pos-desktop-desktop-bottom-left .dbc-channel:hover,
.dbc-pos-mobile-bottom-left  .dbc-channel:hover {
  transform: translateX(3px);
}

/* ── Product page button ─────────────────────────────────────────────────── */
.dbc-product-section {
  margin: 16px 0;
  position: relative;
  display: inline-block;
}

.dbc-product-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--dbc-main, #2ecc71);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .2s ease;
}

.dbc-product-btn:hover {
  filter: brightness(1.1);
}

.dbc-product-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.15);
  list-style: none;
  min-width: 240px;
  overflow: hidden;
  z-index: 100;
}

.dbc-product-menu.dbc-hidden {
  display: none;
}

.dbc-product-channel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  color: #333;
  font-size: 13px;
  transition: background .15s ease;
}

.dbc-product-channel:hover {
  background: #f5f5f5;
  text-decoration: none;
  color: #111;
}

.dbc-ch-dot {
  width:  10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
