.chat-widget-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #0097A7;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,151,167,0.4);
  z-index: 9998;
  transition: transform 0.2s, box-shadow 0.2s;
  color: white;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: widgetBounce 2.6s ease-in-out infinite;
}

.chat-widget-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(0,151,167,0.5);
}

@keyframes widgetBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.chat-notification-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 14px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

.chat-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  height: 520px;
  background: white;
  border-radius: 20px 20px 20px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.chat-window.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.chat-header {
  background: linear-gradient(135deg, #0097A7, #0A1628);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.coral-avatar {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.coral-name {
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
}

.coral-status {
  color: rgba(255,255,255,0.8);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
}

.chat-header-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.chat-head-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.12);
  color: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
}

.message-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.message-row.user {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0097A7;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.message-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.875rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.message-bubble.coral {
  background: white;
  color: #1f2937;
  border-radius: 4px 18px 18px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.message-bubble.user {
  background: #0097A7;
  color: white;
  border-radius: 18px 18px 4px 18px;
}

.message-time {
  font-size: 0.65rem;
  color: #9ca3af;
  margin-top: 2px;
  text-align: center;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: white;
  border-radius: 4px 18px 18px 18px;
  width: fit-content;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: #9ca3af;
  border-radius: 50%;
  animation: typing 1.2s infinite;
}

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

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

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
}

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px;
  background: #f8fafc;
  border-top: 1px solid #eef2f7;
}

.quick-reply-btn {
  background: white;
  border: 1px solid #e5e7eb;
  color: #0097A7;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.quick-reply-btn:hover {
  background: #0097A7;
  color: white;
  border-color: #0097A7;
}

.chat-input-area {
  padding: 12px 16px;
  background: white;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 0.875rem;
  resize: none;
  outline: none;
  max-height: 100px;
  min-height: 40px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.chat-input:focus {
  border-color: #0097A7;
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  background: #0097A7;
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.2s;
}

.chat-send-btn:hover {
  background: #007a87;
  transform: scale(1.05);
}

.chat-send-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

.chat-feedback-host {
  background: #f8fafc;
  border-top: 1px solid #eef2f7;
  padding: 8px 16px 10px;
}

.chat-feedback-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
}

.chat-feedback-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #0f172a;
}

.chat-feedback-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.chat-feedback-btn {
  width: 36px;
  height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
}

.chat-feedback-btn:hover {
  border-color: #0097A7;
  background: #e6fbfd;
}

.chat-feedback-reasons {
  margin-top: 8px;
}

.chat-feedback-sub {
  font-size: 0.75rem;
  color: #475569;
  margin-bottom: 6px;
}

.chat-feedback-reason-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chat-feedback-reason {
  border: 1px solid #d1d5db;
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  cursor: pointer;
}

.chat-feedback-reason:hover {
  border-color: #0097A7;
  color: #0f172a;
}

@media (max-width: 480px) {
  .chat-window {
    width: 100vw;
    height: 100vh;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }
  .chat-widget-btn {
    bottom: 16px;
    right: 16px;
  }
}
