/* Marketing Cube — Public-Pages Assistant */

#mcube-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 8500;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Würfel-FAB (Mobile-Defaults — Desktop überschreibt unten) */
#mcube-fab {
  width: 40px;
  height: 40px;
  background: #D4AF37;
  border-radius: 10px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 6px 18px rgba(212,175,55,0.32);
  transition: transform .15s, box-shadow .15s;
  margin-left: auto;
}
#mcube-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(212,175,55,0.45);
}
#mcube-fab::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 12px;
  border: 2px solid rgba(212,175,55,0.32);
  animation: mcube-pulse 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes mcube-pulse {
  0%, 100% { transform: scale(1); opacity: .6; }
  50%      { transform: scale(1.08); opacity: .25; }
}

/* Augen + Mund (vereinfachte Variante des App-Würfels) */
.mcube-face { width: 70%; height: 70%; position: relative; }
.mcube-eye {
  position: absolute;
  width: 18%; height: 30%;
  background: #1a1a2e;
  border-radius: 50%;
  top: 30%;
}
.mcube-eye.left  { left: 22%; }
.mcube-eye.right { right: 22%; }
.mcube-mouth {
  position: absolute;
  bottom: 22%;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 6%;
  border-radius: 0 0 8px 8px;
  background: #1a1a2e;
}

/* Sprechblase */
#mcube-bubble {
  pointer-events: all;
  background: #ffffff;
  color: #1a1a2e;
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  max-width: 280px;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 10px;
  animation: mcube-fade-in .25s ease-out;
  position: relative;
}
#mcube-bubble .mcube-close {
  position: absolute;
  top: 4px; right: 6px;
  width: 20px; height: 20px;
  border: none; background: transparent;
  cursor: pointer; color: #888;
  font-size: 16px; line-height: 1;
}
#mcube-bubble .mcube-close:hover { color: #1a1a2e; }
#mcube-bubble .mcube-cta {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  background: #1a1a2e;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}
#mcube-bubble .mcube-cta:hover { background: #2d2d4a; }
@keyframes mcube-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Panel (Desktop) */
#mcube-panel {
  pointer-events: all;
  width: 320px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.18);
  margin-bottom: 10px;
  overflow: hidden;
  animation: mcube-fade-in .2s ease-out;
}
#mcube-panel header {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 14px;
}
#mcube-panel .mcube-section { padding: 12px 16px; }
#mcube-panel .mcube-section h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #888;
  margin: 0 0 8px;
  font-weight: 600;
}
#mcube-panel .mcube-faq-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 8px 0;
  font-size: 14px;
  color: #1a1a2e;
  cursor: pointer;
}
#mcube-panel .mcube-faq-item:hover { color: #D4AF37; }
#mcube-panel .mcube-cta-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
}
#mcube-panel .mcube-cta-row a {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}
#mcube-panel .mcube-cta-row a.primary {
  background: #1a1a2e; color: #fff;
}
#mcube-panel .mcube-cta-row a.secondary {
  background: #f0f0f0; color: #1a1a2e;
}
#mcube-panel .mcube-mute {
  display: block;
  text-align: center;
  padding: 10px;
  font-size: 12px;
  color: #888;
  cursor: pointer;
  border-top: 1px solid #f0f0f0;
  background: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  width: 100%;
}
#mcube-panel .mcube-mute:hover { color: #1a1a2e; }

/* Desktop overrides */
@media (min-width: 768px) {
  #mcube-root {
    right: 20px;
    bottom: 20px;
  }
  #mcube-fab {
    width: 56px;
    height: 56px;
    border-radius: 12px;
  }
}

/* Mobile Vollbild-Sheet für Panel */
@media (max-width: 767px) {
  #mcube-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
  }
  #mcube-bubble {
    max-width: calc(100vw - 32px);
  }
}

/* Würfel-Zustände (CSS-Klassen am #mcube-fab) */
#mcube-fab.state-sarkastisch    { transform: rotate(-4deg); }
#mcube-fab.state-aufmerksam::before { animation-duration: 1.5s; }
#mcube-fab.state-nachdenklich .mcube-eye.left  { height: 12%; top: 38%; }
#mcube-fab.state-erfreut .mcube-eye  { height: 12%; top: 36%; border-radius: 0 0 50% 50%; }
#mcube-fab.state-ernst { background: #2d2d4a; box-shadow: 0 6px 18px rgba(45,45,74,0.4); }
#mcube-fab.state-ernst::before { border-color: rgba(212,68,68,0.45); animation-duration: 1.2s; }
#mcube-fab.state-überrascht { transform: scale(1.08); }
#mcube-fab.state-überrascht .mcube-eye { height: 50%; top: 22%; }
#mcube-fab.state-überrascht .mcube-mouth { width: 16%; height: 14%; border-radius: 50%; }

/* Versteckt-Klasse */
.mcube-hidden { display: none !important; }
