.ai-assistant-widget {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 9999;
  font-family: 'Montserrat', sans-serif;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.assistant-visible { opacity: 1; transform: translateY(0) scale(1); }

.ai-assistant-bubble {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(26,92,58,0.15), rgba(26,92,58,0.05));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 0 0 1px rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(26, 92, 58, 0.4), 0 0 40px rgba(26, 92, 58, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}
.ai-assistant-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 30px rgba(26, 92, 58, 0.5), 0 0 60px rgba(26, 92, 58, 0.2);
}
.ai-assistant-bubble.open { display: none; }

.ai-avatar-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(201, 162, 39, 0.5);
  animation: ringPulse 2s ease-in-out infinite;
}
@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
}

.ai-avatar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}
.crane-avatar {
  display: block;
  animation: avatarFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 2px 8px rgba(26,92,58,0.3));
}
@keyframes avatarFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-5px) rotate(-2deg); }
  50% { transform: translateY(-2px) rotate(0deg); }
  75% { transform: translateY(-5px) rotate(2deg); }
}
.crane-char {
  animation: charFloat 3s ease-in-out infinite;
  transform-origin: 60px 60px;
}
@keyframes charFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-4px) rotate(-1.5deg); }
  50% { transform: translateY(-1px) rotate(0.5deg); }
  75% { transform: translateY(-3px) rotate(-0.5deg); }
}
.crane-char circle[r="3"], .crane-char ellipse[fill="#ff9999"] {
  animation: blushPulse 2.5s ease-in-out infinite;
}
@keyframes blushPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.5; }
}
.crane-char ellipse[ry="3.5"] {
  animation: feetTap 2.2s ease-in-out infinite;
  transform-origin: 60px 100px;
}
@keyframes feetTap {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(2px); }
}
.crane-char .crane-char ellipse[fill="white"] {
  animation: eyeBlink 4s ease-in-out infinite;
}
@keyframes eyeBlink {
  0%, 95%, 100% { transform: scaleY(1); }
  97% { transform: scaleY(0.1); }
}
.crane-avatar circle[stroke="#c9a227"] {
  animation: ringPulse 3s ease-in-out infinite;
}

.ai-status-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  background: #27ae60;
  border: 2px solid #1a5c3a;
  border-radius: 50%;
  animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(39, 174, 96, 0); }
}

.ai-assistant-label {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.ai-assistant-bubble:hover .ai-assistant-label { opacity: 1; }

.ai-assistant-panel {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 400px;
  height: 560px;
  max-height: calc(100vh - 160px);
  background: linear-gradient(170deg, #0e1a12 0%, #0a0a0f 100%);
  border: 1px solid rgba(26, 92, 58, 0.2);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 60px rgba(26,92,58,0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.ai-assistant-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.ai-panel-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  background: rgba(26, 92, 58, 0.06);
}
.ai-panel-avatar svg { display: block; }
.ai-panel-info {
  flex: 1;
  margin-left: 12px;
}
.ai-panel-name {
  font-size: 15px;
  font-weight: 600;
  color: #f0f0f5;
  letter-spacing: 0.02em;
}
.ai-panel-status {
  font-size: 11px;
  color: #27ae60;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}
.ai-panel-status::before {
  content: '';
  width: 5px;
  height: 5px;
  background: #27ae60;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px rgba(39,174,96,0.4);
}
.ai-panel-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}
.ai-panel-close:hover { color: #fff; }

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ai-messages::-webkit-scrollbar { width: 4px; }
.ai-messages::-webkit-scrollbar-thumb { background: rgba(26,92,58,0.3); border-radius: 2px; }

.ai-message {
  max-width: 82%;
  padding: 10px 16px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.55;
  animation: msgIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.ai-message-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #1a5c3a, #2d7a52);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(26,92,58,0.2);
}
.ai-message-assistant {
  align-self: flex-start;
  background: rgba(255,255,255,0.04);
  color: #d8d8e0;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.ai-link {
  color: #c9a227;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ai-msg-speaker {
  display: inline-block;
  margin-left: 6px;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s;
  vertical-align: middle;
  width: 14px;
  height: 14px;
}
.ai-msg-speaker:hover { opacity: 1; }

.ai-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 16px;
}
.typing-dot {
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  animation: typingBounce 1.4s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.ai-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 18px;
  border-top: 1px solid rgba(255,255,255,0.03);
}
.ai-qr-btn {
  background: rgba(26, 92, 58, 0.15);
  border: 1px solid rgba(26, 92, 58, 0.2);
  color: rgba(180, 210, 190, 0.8);
  font-size: 12px;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  font-weight: 500;
}
.ai-qr-btn:hover {
  background: rgba(26, 92, 58, 0.35);
  border-color: rgba(201, 162, 39, 0.35);
  color: #fff;
  transform: translateY(-1px);
}

.ai-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px 14px;
  border-top: 1px solid rgba(255,255,255,0.03);
  background: rgba(0,0,0,0.15);
}
.ai-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px 14px;
  color: #e8e8f0;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.ai-input:focus { border-color: rgba(26, 92, 58, 0.4); background: rgba(255,255,255,0.06); }
.ai-input::placeholder { color: rgba(255,255,255,0.2); }

.ai-send-btn {
  background: linear-gradient(135deg, #1a5c3a, #2d7a52);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(26,92,58,0.2);
}
.ai-send-btn:hover { background: linear-gradient(135deg, #2d7a52, #3a9a62); transform: scale(1.06); box-shadow: 0 4px 16px rgba(26,92,58,0.3); }
.ai-send-btn:active { transform: scale(0.95); }

.ai-mic-btn {
  position: relative;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.4);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.ai-mic-btn:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
}
.ai-mic-btn:active { background: rgba(255,255,255,0.12); }
.ai-mic-btn.listening {
  background: rgba(231,76,60,0.15);
  color: #ff6b6b;
}
.ai-mic-btn .mic-icon {
  transition: transform 0.2s;
}
.ai-mic-btn:hover .mic-icon { transform: scale(1.05); }
.ai-mic-btn .mic-ripple { display: none; }

.ai-hint, .ai-hint-arrow {
  position: absolute;
  bottom: 82px;
  right: 8px;
  background: linear-gradient(135deg, #1a5c3a, #2d7a52);
  color: #fff;
  padding: 10px 20px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  white-space: nowrap;
  z-index: 10000;
  animation: hintBounce 2.5s ease-in-out 3;
  pointer-events: none;
  letter-spacing: 0.01em;
}
.ai-hint-arrow {
  bottom: 70px;
  right: 30px;
  width: 12px;
  height: 12px;
  background: #1a5c3a;
  transform: rotate(45deg);
  padding: 0;
  border-radius: 2px;
  box-shadow: none;
  z-index: 9999;
}
@keyframes hintBounce {
  0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
  50% { transform: translateY(-6px) scale(1.02); opacity: 0.95; }
}

.ai-booking-form .ai-booking-input:focus { border-color: rgba(26,92,58,0.4) !important; }
.ai-cat-card:hover { border-color: rgba(26,92,58,0.5) !important; background: rgba(26,92,58,0.12) !important; }
#aiCategoryPicker::-webkit-scrollbar { display: none; }
.flatpickr-calendar { background: #0e1a12 !important; border: 1px solid rgba(26,92,58,0.3) !important; border-radius: 16px !important; overflow: hidden; }
.flatpickr-calendar .flatpickr-day { color: #d0d8d0 !important; border-radius: 8px !important; }
.flatpickr-calendar .flatpickr-day.flatpickr-disabled { color: #777 !important; background: rgba(255,255,255,0.03) !important; }
.flatpickr-calendar .flatpickr-day.flatpickr-disabled.booked-date { color: #999 !important; text-decoration: line-through; background: rgba(200,50,50,0.08) !important; }
.flatpickr-calendar .flatpickr-day.today { border-color: #1a5c3a !important; }
.flatpickr-calendar .flatpickr-day.selected, .flatpickr-calendar .flatpickr-day.startRange, .flatpickr-calendar .flatpickr-day.endRange { background: #1a5c3a !important; border-color: #1a5c3a !important; color: #fff !important; }
.flatpickr-calendar .flatpickr-day.inRange { background: rgba(26,92,58,0.25) !important; border-color: transparent !important; }
.flatpickr-calendar .flatpickr-day:hover { background: rgba(26,92,58,0.3) !important; }
.flatpickr-calendar .flatpickr-month, .flatpickr-calendar .flatpickr-weekday { color: #d0d8d0 !important; }
.flatpickr-calendar .flatpickr-weekday { font-weight: 500 !important; font-size: 11px !important; }
@media (max-width: 600px) {
  .ai-assistant-panel {
    right: 8px;
    bottom: 80px;
    width: calc(100vw - 16px);
    height: calc(100vh - 160px);
    border-radius: 20px;
  }
  .ai-assistant-bubble { width: 64px; height: 64px; }
  .ai-assistant-widget { right: 12px; bottom: 80px; }
  .ai-message { max-width: 88%; font-size: 14px; }
}
