/* =============================================================================
   Hotel An der Gruga Essen - Tulpen-KI ("Gruga-Tulpe") & Gäste-ABC Styles
   Botanisches, elegantes Design im Einklang mit dem Grugapark-Thema
   ============================================================================= */

/* Schwebender Tulpen-Button */
.tulip-widget-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 12px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #15803d 0%, #166534 50%, #991b1b 100%);
  color: #ffffff;
  border: 2px solid #fef08a;
  box-shadow: 0 12px 30px -4px rgba(22, 101, 52, 0.45), 0 6px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: inherit;
}

.tulip-widget-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 16px 36px -4px rgba(22, 101, 52, 0.55), 0 8px 16px rgba(0, 0, 0, 0.2);
}

.tulip-widget-btn:active {
  transform: scale(0.97);
}

/* Tulpen-Icon mit Blüh-Effekt */
.tulip-icon-wrapper {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle, #fef08a 20%, #fde047 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.tulip-svg {
  width: 24px;
  height: 24px;
  animation: tulip-sway 4s ease-in-out infinite;
  transform-origin: bottom center;
}

@keyframes tulip-sway {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

.tulip-pulse-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #ffffff;
  animation: dot-pulse 2s infinite;
}

@keyframes dot-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Chatbox Hauptfenster */
.tulip-chatbox {
  position: fixed;
  bottom: 86px;
  left: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 580px;
  max-height: calc(100vh - 110px);
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom left;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92) translateY(20px);
}

.tulip-chatbox.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}

/* Chatbox Header */
.tulip-chat-header {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 60%, #15803d 100%);
  color: #ffffff;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #fef08a;
  position: relative;
}

.tulip-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tulip-avatar-lg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, #fef08a 25%, #fde047 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.tulip-header-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.tulip-header-sub {
  font-size: 11px;
  color: #a7f3d0;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.tulip-status-light {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  display: inline-block;
}

.tulip-header-actions button {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
  margin-left: 4px;
}

.tulip-header-actions button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

/* Nachrichten-Bereich */
.tulip-messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

/* Nachrichten-Blasen */
.tulip-msg {
  display: flex;
  gap: 10px;
  max-width: 86%;
  animation: msg-appear 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes msg-appear {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.tulip-msg.tulip {
  align-self: flex-start;
}

.tulip-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.tulip-bubble {
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.tulip-msg.tulip .tulip-bubble {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
}

.tulip-msg.user .tulip-bubble {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.tulip-bubble p {
  margin-bottom: 6px;
}
.tulip-bubble p:last-child {
  margin-bottom: 0;
}

/* Kontakt-Aktionsbox in Tulpen-Antworten */
.tulip-contact-card {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  font-size: 11.5px;
  color: #991b1b;
}

.tulip-contact-card a {
  color: #b91c1c;
  font-weight: 700;
  text-decoration: underline;
}

.tulip-contact-links {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.tulip-btn-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  background: #ffffff;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #991b1b;
  text-decoration: none;
  transition: all 0.2s;
}

.tulip-btn-link:hover {
  background: #fee2e2;
  transform: translateY(-1px);
}

/* Schnellfragen-Leiste (Pills) */
.tulip-quick-chips {
  padding: 8px 14px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}

.tulip-chip {
  padding: 6px 11px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.tulip-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

/* Eingabebereich */
.tulip-input-area {
  padding: 12px 14px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.tulip-input-field {
  flex: 1;
  padding: 9px 14px;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

.tulip-input-field:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.tulip-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #15803d;
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.tulip-send-btn:hover {
  background: #166534;
  transform: scale(1.05);
}

.tulip-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Tipp-Animation */
.tulip-typing-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
}

.tulip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  animation: typing-jump 1.2s infinite ease-in-out;
}

.tulip-dot:nth-child(2) { animation-delay: 0.2s; }
.tulip-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-jump {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
}

/* =============================================================================
   Gäste-ABC Modal & Schnellverzeichnis
   ============================================================================= */
.gaeste-abc-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.gaeste-abc-modal.active {
  display: flex;
}

.gaeste-abc-dialog {
  background: #ffffff;
  width: 820px;
  max-width: 100%;
  max-height: 90vh;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  animation: modal-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.gaeste-abc-header {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  color: #ffffff;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gaeste-abc-alphabet {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 12px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.abc-filter-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-weight: 700;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.15s;
}

.abc-filter-btn:hover, .abc-filter-btn.active {
  background: #15803d;
  color: #ffffff;
  border-color: #15803d;
}

.gaeste-abc-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.abc-entry-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  margin-bottom: 10px;
  transition: all 0.2s;
}

.abc-entry-card:hover {
  border-color: #86efac;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.08);
}

.abc-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.abc-entry-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.abc-letter-badge {
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}

.abc-entry-content {
  font-size: 12.5px;
  color: #475569;
  line-height: 1.6;
}

/* Mobile-Anpassungen */
@media (max-width: 640px) {
  .tulip-widget-btn {
    bottom: 16px;
    left: 16px;
    padding: 8px 14px 8px 10px;
  }
  .tulip-widget-label {
    display: none;
  }
  .tulip-chatbox {
    left: 10px;
    right: 10px;
    bottom: 75px;
    width: auto;
    height: 75vh;
  }
}
