/* ------------------------------
   LAUNCHER ICON
------------------------------ */
.umpa-launcher {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #992017, #ea6212);
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 999999 !important; /* ⬅️ GANZ VORNE */
}
.umpa-launcher:hover {
  transform: scale(1.08);
  background: linear-gradient(135deg, #ea6212, #992017);
}

/* ------------------------------
   CHAT-FENSTER
------------------------------ */
.umpa-chat-box {
  position: fixed;
  bottom: 90px;
  right: 25px;
  width: 340px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.25);
  display: none;
  flex-direction: column;
  animation: fadeIn 0.25s ease;
  overflow: hidden;
  max-height: 75vh;
  z-index: 999998 !important; /* ⬅️ Direkt unter dem Icon */
}

.umpa-chat-box.open { display: flex; }

/* ------------------------------
   CHAT-WRAPPER FÜR SICHERHEIT
------------------------------ */
.umpa-chat-widget.umpa-chat-bubble {
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 999997 !important; /* ⬅️ sicherheitshalber nochmal global */
  pointer-events: none; /* ⬅️ verhindert Störung bei Klicks außerhalb */
}
.umpa-chat-widget.umpa-chat-bubble * {
  pointer-events: auto;
}

/* ------------------------------
   HEADER
------------------------------ */
.umpa-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #992017, #ea6212);
  color: #fff;
  padding: 14px 18px;
  font-weight: 700;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}
.umpa-chat-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.umpa-chat-close:hover { transform: scale(1.15); }

/* ------------------------------
   CHAT-INHALT
------------------------------ */
.umpa-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f9f9f9;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 55vh; /* 🔥 Chatbereich begrenzen */
}

.umpa-user-msg,
.umpa-bot-msg {
  display: flex;
  flex-direction: column;
  max-width: 80%;
  font-size: 14px;
  line-height: 1.45;
}
.msg-name {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #888;
}
.msg-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  display: inline-block;
}
.umpa-user-msg {
  align-items: flex-end;
  margin-left: auto;
}
.umpa-user-msg .msg-bubble {
  background: #992017;
  color: #fff;
  border-bottom-right-radius: 6px;
}
.umpa-bot-msg {
  align-items: flex-start;
  margin-right: auto;
}
.umpa-bot-msg .msg-bubble {
  background: #ea6212;
  color: #fff;
  border-bottom-left-radius: 6px;
}

/* ------------------------------
   LIVE SPRECHEN UI (modern)
------------------------------ */
.umpa-chat-voice {
  display: flex;
  justify-content: center;
  gap: 12px;
  background: #f5f5f5;
  padding: 10px;
  border-top: 1px solid #e2e2e2;
}
.umpa-voice-start,
.umpa-voice-stop {
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}
.umpa-voice-start {
  background: #22c55e;
  color: #fff;
  box-shadow: 0 2px 6px rgba(34,197,94,0.3);
}
.umpa-voice-start:hover { background: #16a34a; transform: scale(1.08); }
.umpa-voice-start.recording {
  animation: pulse 1.4s infinite;
}
.umpa-voice-stop {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 2px 6px rgba(239,68,68,0.3);
}
.umpa-voice-stop:hover { background: #dc2626; transform: scale(1.08); }

/* Pulsierende Animation beim Telefonieren */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* ------------------------------
   INPUT
------------------------------ */
.umpa-chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border-top: 1px solid #e5e5e5;
}
.umpa-chat-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 20px;
  outline: none;
}
.umpa-chat-send {
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background: #ea6212;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.umpa-chat-send:hover {
  background: #992017;
  transform: scale(1.05);
}

/* ------------------------------
   CREDITS
------------------------------ */
.umpa-credits {
  text-align: center;
  font-size: 11px;
  color: #888;
  padding: 6px 0 10px;
  background: #fafafa;
  border-top: 1px solid #eee;
}
.umpa-credits a {
  color: #992017;
  text-decoration: none;
  font-weight: 600;
}
.umpa-credits a:hover { text-decoration: underline; }

/* ------------------------------
   RESPONSIVE
------------------------------ */
@media (max-width: 480px) {
  .umpa-chat-box {
    width: 92vw;
    right: 4vw;
    bottom: 80px;
  }

  .umpa-launcher {
    width: 55px;
    height: 55px;
  }
  .umpa-voice-start,
  .umpa-voice-stop {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  .msg-bubble {
    font-size: 13px;
    padding: 8px 12px;
  }
}

.umpa-product-card {
  display: flex;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 10px;
  margin-top: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.umpa-product-img {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
  margin-right: 10px;
}

.umpa-product-info {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
}

.umpa-product-link {
  display: inline-block;
  background: #ea6212;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 6px;
  transition: all 0.2s ease;
}
.umpa-product-link:hover {
  background: #992017;
}

/* ------------------------------
   PRODUKT-KARTEN (aufgewertet)
------------------------------ */
.umpa-product-card {
  display: flex;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 10px;
  margin-top: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.25s ease;
}
.umpa-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.umpa-product-img-wrap {
  display: block;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  margin-right: 10px;
  transition: transform 0.25s ease;
}
.umpa-product-img-wrap:hover img {
  transform: scale(1.05);
}

.umpa-product-img {
  width: 75px;
  height: 75px;
  object-fit: cover;
  border-radius: 10px;
}

.umpa-product-info {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
}

.umpa-product-name {
  color: #111;
}

.umpa-product-price {
  display: inline-block;
  color: #444;
  font-weight: 600;
  margin: 4px 0;
}

.umpa-product-link {
  display: inline-block;
  color: #fff;
  background: #ea6212;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 6px;
  transition: all 0.25s ease;
}
.umpa-product-link:hover {
  background: #992017;
  transform: translateY(-1px);
}