﻿/* Evergreen Movement Assistant Bot - Accessible & Senior-Friendly Styling */
#evergreen-bot-widget {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  z-index: 999999;
}

/* Floating Trigger Button */
.eg-bot-trigger {
  position: fixed;
  bottom: 20px;
  right: 20px;
  height: 54px;
  padding: 0 20px;
  background-color: #0A8772;
  color: #ffffff;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(10, 135, 114, 0.35), 0 2px 6px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999999;
  outline-offset: 3px;
}

.eg-bot-trigger:hover {
  background-color: #087A68;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(10, 135, 114, 0.45);
}

.eg-bot-trigger:focus-visible {
  outline: 3px solid #0A8772;
}

.eg-bot-trigger-text {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.eg-bot-badge-dot {
  width: 9px;
  height: 9px;
  background-color: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #0A8772;
}

/* Chat Drawer / Modal */
.eg-bot-window {
  position: fixed;
  bottom: 84px;
  right: 20px;
  width: 410px;
  max-width: calc(100vw - 32px);
  height: 600px;
  max-height: calc(100vh - 120px);
  background-color: #fdfcf9;
  border: 1px solid #e7e5e0;
  border-radius: 20px;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 999999;
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.eg-bot-window.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.97);
}

/* Header */
.eg-bot-header {
  background-color: #0A8772;
  color: #ffffff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.eg-bot-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eg-bot-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background-color: #ffffff;
}

.eg-bot-title-area {
  display: flex;
  flex-direction: column;
}

.eg-bot-title {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.eg-bot-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 5px;
}

.eg-bot-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Language Switcher */
.eg-bot-lang-switch {
  display: inline-flex;
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 9999px;
  padding: 2px;
}

.eg-bot-lang-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.eg-bot-lang-btn.active {
  background-color: #ffffff;
  color: #0A8772;
}

.eg-bot-close-btn {
  background: none;
  border: none;
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.eg-bot-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Messages Body */
.eg-bot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background-color: #fdfcf9;
}

.eg-msg {
  max-width: 88%;
  padding: 12px 15px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.5;
}

.eg-msg-bot {
  align-self: flex-start;
  background-color: #ffffff;
  color: #1e293b;
  border: 1px solid #e7e5e0;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.eg-msg-user {
  align-self: flex-end;
  background-color: #0A8772;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

/* Quick Chips */
.eg-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.eg-chip {
  background-color: #f3f0e8;
  border: 1px solid #e2ddd2;
  color: #2c3a2f;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  line-height: 1.3;
}

.eg-chip:hover {
  background-color: #0A8772;
  color: #ffffff;
  border-color: #0A8772;
}

/* Action CTA inside message */
.eg-bot-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.eg-bot-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background-color: #0A8772;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  box-shadow: 0 2px 4px rgba(10, 135, 114, 0.2);
}

.eg-bot-action-btn:hover {
  background-color: #087A68;
}

.eg-bot-action-secondary {
  background-color: #f1efe9;
  color: #1e293b !important;
  box-shadow: none;
  border: 1px solid #ddd7cc;
}

.eg-bot-action-secondary:hover {
  background-color: #e5e2d8;
}

/* Input Area */
.eg-bot-input-area {
  padding: 10px 12px;
  background-color: #ffffff;
  border-top: 1px solid #e7e5e0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.eg-bot-input {
  flex: 1;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #dcd7cc;
  border-radius: 9999px;
  font-size: 13.5px;
  color: #1e293b;
  background-color: #fdfcf9;
  outline: none;
}

.eg-bot-input:focus {
  border-color: #0A8772;
  box-shadow: 0 0 0 2px rgba(10, 135, 114, 0.15);
}

.eg-bot-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #0A8772;
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.eg-bot-send-btn:hover {
  background-color: #087A68;
}

@media (max-width: 480px) {
  .eg-bot-window {
    right: 12px;
    bottom: 76px;
    width: calc(100vw - 24px);
    height: calc(100vh - 96px);
  }
  .eg-bot-trigger {
    right: 14px;
    bottom: 14px;
    height: 48px;
    padding: 0 16px;
  }
}
