/* PraxisAssistent — FAB Chat Widget */

.praxis-ai-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0A9396, #005F73);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(10, 147, 150, 0.35), 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #fff;
  font-size: 1.4rem;
}
.praxis-ai-fab:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 40px rgba(10, 147, 150, 0.45), 0 4px 12px rgba(0,0,0,0.12);
  border-radius: 22px;
}
.praxis-ai-fab:active {
  transform: translateY(-1px) scale(0.98);
}

/* Ping animation */
.praxis-ai-fab-ping {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 18px;
  background: rgba(10, 147, 150, 0.4);
  animation: fabPing 2.5s infinite;
}
@keyframes fabPing {
  0% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* Chat Panel */
.praxis-ai-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 400px;
  height: 600px;
  max-height: calc(100vh - 48px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.12),
    0 8px 32px rgba(10, 147, 150, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.praxis-ai-panel.open {
  display: flex;
  animation: slideUpWidget 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUpWidget {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.praxis-ai-header {
  background: linear-gradient(135deg, #0A9396, #005F73);
  padding: 18px 20px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 24px 24px 0 0;
}
.praxis-ai-header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  flex-shrink: 0;
}
.praxis-ai-header-info { flex: 1; }
.praxis-ai-header-title {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.praxis-ai-header-status {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  margin: 3px 0 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.praxis-ai-header-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  display: inline-block;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.6);
}

/* Messages area */
.praxis-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
  background: rgba(248, 250, 252, 0.5);
}

/* Message row */
.praxis-ai-msg-row {
  display: flex;
  gap: 10px;
  margin-bottom: 2px;
  align-items: flex-end;
  animation: messageSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes messageSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.praxis-ai-msg-row.bot { flex-direction: row; }
.praxis-ai-msg-row.user { flex-direction: row-reverse; }

/* Avatar */
.praxis-ai-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0A9396, #005F73);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(10, 147, 150, 0.25);
}
.praxis-ai-msg-row.user .praxis-ai-avatar {
  background: linear-gradient(135deg, #374151, #1f2937);
  box-shadow: 0 2px 8px rgba(55, 65, 81, 0.25);
}

/* Bubbles */
.praxis-ai-msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.84rem;
  line-height: 1.55;
}
.praxis-ai-msg.bot {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  color: #1a2332;
  border-bottom-left-radius: 6px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.praxis-ai-msg.user {
  background: linear-gradient(135deg, #0A9396, #005F73);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 2px 10px rgba(10, 147, 150, 0.25);
}

/* Close button */
.praxis-ai-close {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.2s;
  flex-shrink: 0;
}
.praxis-ai-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Typing indicator */
.praxis-ai-typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  border-bottom-left-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.praxis-ai-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0A9396;
  opacity: 0.4;
  animation: typingDot 1.4s infinite;
}
.praxis-ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.praxis-ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.4; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* Slot cards */
.praxis-ai-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.praxis-ai-slot {
  padding: 5px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border: 1.5px solid #0A9396;
  color: #005F73;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.praxis-ai-slot:hover {
  background: #0A9396;
  color: #fff;
}

/* Quick action chips */
.praxis-ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.praxis-ai-chip {
  padding: 7px 13px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(10, 147, 150, 0.2);
  color: #374151;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.praxis-ai-chip:hover {
  border-color: #0A9396;
  color: #0A9396;
  background: rgba(10, 147, 150, 0.06);
}

/* Booking success */
.praxis-ai-success {
  background: rgba(240, 253, 244, 0.9) !important;
  backdrop-filter: blur(8px);
  border: 1px solid #bbf7d0;
  border-radius: 14px !important;
  padding: 16px !important;
}
.praxis-ai-success-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

/* Input area */
.praxis-ai-input-area {
  padding: 12px 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
}
.praxis-ai-input {
  flex: 1;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 0.84rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  resize: none;
  max-height: 80px;
  line-height: 1.4;
  background: rgba(255, 255, 255, 0.9);
}
.praxis-ai-input:focus {
  border-color: #0A9396;
  box-shadow: 0 0 0 3px rgba(10, 147, 150, 0.1);
}
.praxis-ai-input::placeholder {
  color: #9ca3af;
}
.praxis-ai-send {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0A9396, #005F73);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  transition: all 0.2s;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(10, 147, 150, 0.3);
}
.praxis-ai-send:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(10, 147, 150, 0.4);
}
.praxis-ai-send:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

/* GDPR consent */
.praxis-ai-consent {
  padding: 24px 20px;
  text-align: center;
}
.praxis-ai-consent p {
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 0 0 16px;
}
.praxis-ai-consent a {
  color: #0A9396;
}
.praxis-ai-consent-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #0A9396, #005F73);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(10, 147, 150, 0.3);
}
.praxis-ai-consent-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(10, 147, 150, 0.4);
}

/* Powered by CODLAB — glass effect, always visible */
.praxis-ai-powered {
  text-align: center;
  padding: 10px 14px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: rgba(26, 35, 50, 0.45);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 0 0 24px 24px;
}
.praxis-ai-powered a {
  color: rgba(26, 35, 50, 0.45);
  text-decoration: none;
  transition: color 0.2s;
}
.praxis-ai-powered a:hover {
  color: #0A9396;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .praxis-ai-panel {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  .praxis-ai-header {
    border-radius: 0;
  }
  .praxis-ai-powered {
    border-radius: 0;
  }
  .praxis-ai-fab {
    bottom: 16px;
    right: 16px;
  }
}

@media (min-width: 481px) and (max-width: 440px) {
  .praxis-ai-panel {
    width: calc(100vw - 32px);
  }
}
