/* Chat Widget - Clean Modern WhatsApp-like Style */

/* Floating Chat Button */
.enkay-chat-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  margin-bottom: env(safe-area-inset-bottom, 0);
  margin-right: env(safe-area-inset-right, 0);
  height: 54px;
  width: 54px;
  min-width: 54px;
  padding: 0;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}
.enkay-chat-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}
.enkay-chat-btn:active {
  transform: scale(0.95);
}
.enkay-chat-btn svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.enkay-chat-btn .enkay-chat-label {
  display: none;
}

/* Mobile */
@media (max-width: 600px) {
  .enkay-chat-btn {
    bottom: 18px;
    right: 16px;
    height: 48px;
    width: 48px;
    min-width: 48px;
  }
  .enkay-chat-btn svg {
    width: 24px;
    height: 24px;
  }
  .enkay-chat-panel {
    right: 10px;
    left: 10px;
    bottom: 76px;
    width: auto;
    max-width: none;
  }
}

/* Chat Panel */
.enkay-chat-panel {
  position: fixed;
  bottom: 90px;
  right: 24px;
  margin-right: env(safe-area-inset-right, 0);
  width: 370px;
  max-width: calc(100vw - 40px);
  height: 480px;
  max-height: calc(100vh - 130px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
  z-index: 2147483647;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.enkay-chat-panel.open {
  display: flex;
  animation: enkay-panel-in 0.3s ease-out;
}
@keyframes enkay-panel-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Chat Header */
.enkay-chat-header {
  background: #075E54;
  color: #fff;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.enkay-chat-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.enkay-chat-header h3::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #25D366;
  border-radius: 50%;
  flex-shrink: 0;
}
.enkay-chat-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.enkay-chat-close:hover {
  background: rgba(255,255,255,0.25);
}

/* Messages */
.enkay-chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #ECE5DD url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5 L35 15 L30 10 L25 15 Z' fill='%23d4cfc6' opacity='0.15'/%3E%3C/svg%3E");
}
.enkay-chat-messages::-webkit-scrollbar { width: 4px; }
.enkay-chat-messages::-webkit-scrollbar-thumb { background: #bbb; border-radius: 2px; }

.enkay-chat-msg {
  margin-bottom: 10px;
  display: flex;
}
.enkay-chat-msg.user {
  justify-content: flex-end;
}
.enkay-chat-msg.bot .enkay-chat-bubble {
  background: #fff;
  color: #303030;
}
.enkay-chat-msg.user .enkay-chat-bubble {
  background: #DCF8C6;
  color: #303030;
}
.enkay-chat-bubble {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
  max-width: 82%;
  word-break: break-word;
  box-shadow: 0 1px 1px rgba(0,0,0,0.06);
}
.enkay-chat-msg.user .enkay-chat-bubble {
  border-top-right-radius: 0;
}
.enkay-chat-msg.bot .enkay-chat-bubble {
  border-top-left-radius: 0;
}

/* Input */
.enkay-chat-input-wrap {
  padding: 10px 12px;
  border-top: 1px solid #e0e0e0;
  background: #f0f0f0;
  display: flex;
  gap: 8px;
  align-items: center;
}
.enkay-chat-input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  background: #fff;
  font-family: inherit;
}
.enkay-chat-input:focus {
  box-shadow: none;
}
.enkay-chat-send {
  padding: 10px 18px;
  background: #075E54;
  color: #fff;
  border: none;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
  font-family: inherit;
}
.enkay-chat-send:hover {
  background: #128C7E;
}

