/* concierge.css — Canaries.guide Concierge Chat Widget
   On-brand: Canary blue (#003DA5) / yellow (#FFD100) / clean white */

/* ── Floating Button ─────────────────────────────────────────── */
.cg-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: #003DA5;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 61, 165, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.cg-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(0, 61, 165, 0.45);
}
.cg-fab:active { transform: scale(0.96); }
.cg-fab svg { width: 28px; height: 28px; }
.cg-fab--open .cg-fab__chat { display: none; }
.cg-fab--open .cg-fab__close { display: block; }
.cg-fab__close { display: none; }

/* Notification dot */
.cg-fab__dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FFD100;
  border: 2px solid #fff;
  animation: cg-pulse 2s ease-in-out infinite;
}
.cg-fab--open .cg-fab__dot { display: none; }

@keyframes cg-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

/* ── Chat Panel ──────────────────────────────────────────────── */
.cg-chat {
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 9999;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 130px);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
}
.cg-chat--open { display: flex; }

/* Header */
.cg-chat__header {
  background: #003DA5;
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.cg-chat__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.cg-chat__title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
}
.cg-chat__subtitle {
  font-size: 12px;
  opacity: 0.75;
  font-weight: 400;
}
.cg-chat__close-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  font-size: 20px;
  transition: color 0.15s;
}
.cg-chat__close-btn:hover { color: #fff; }

/* Location banner */
.cg-chat__location {
  background: #EEF4FF;
  padding: 8px 20px;
  font-size: 12px;
  color: #003DA5;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  border-bottom: 1px solid #D6E4F5;
}
.cg-chat__location:empty { display: none; }

/* Messages area */
.cg-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

/* Message bubbles */
.cg-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  animation: cg-fadeUp 0.25s ease;
}
@keyframes cg-fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.cg-msg--bot {
  align-self: flex-start;
  background: #F3F4F6;
  color: #1F2937;
  border-bottom-left-radius: 4px;
}
.cg-msg--user {
  align-self: flex-end;
  background: #003DA5;
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Typing indicator */
.cg-msg--typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  align-self: flex-start;
  background: #F3F4F6;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
}
.cg-msg--typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9CA3AF;
  animation: cg-typing 1.2s ease-in-out infinite;
}
.cg-msg--typing span:nth-child(2) { animation-delay: 0.15s; }
.cg-msg--typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes cg-typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* Quick action chips */
.cg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0 8px;
  align-self: flex-start;
  max-width: 90%;
}
.cg-chip {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #D1D5DB;
  background: #fff;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: inherit;
}
.cg-chip:hover {
  background: #003DA5;
  color: #fff;
  border-color: #003DA5;
}

/* Input area */
.cg-chat__input-area {
  padding: 12px 16px;
  border-top: 1px solid #E5E7EB;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  background: #fff;
}
.cg-chat__input {
  flex: 1;
  border: 1px solid #D1D5DB;
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  background: #F9FAFB;
}
.cg-chat__input:focus {
  border-color: #003DA5;
  background: #fff;
}
.cg-chat__input::placeholder {
  color: #9CA3AF;
}
.cg-chat__send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #003DA5;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}
.cg-chat__send:hover { background: #002D7A; }
.cg-chat__send:active { transform: scale(0.92); }
.cg-chat__send:disabled {
  background: #D1D5DB;
  cursor: not-allowed;
}
.cg-chat__send svg { width: 18px; height: 18px; }

/* ── Dark mode ───────────────────────────────────────────────── */
[data-theme="dark"] .cg-chat {
  background: #1a1a2e;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .cg-chat__location {
  background: #1e2a4a;
  color: #8BB4F0;
  border-color: #2a3a5a;
}
[data-theme="dark"] .cg-chat__messages { background: #1a1a2e; }
[data-theme="dark"] .cg-msg--bot {
  background: #252540;
  color: #E5E7EB;
}
[data-theme="dark"] .cg-chat__input-area {
  background: #1a1a2e;
  border-color: #333;
}
[data-theme="dark"] .cg-chat__input {
  background: #252540;
  border-color: #444;
  color: #E5E7EB;
}
[data-theme="dark"] .cg-chat__input:focus {
  border-color: #5B8DEF;
  background: #2a2a4a;
}
[data-theme="dark"] .cg-chip {
  background: #252540;
  border-color: #444;
  color: #D1D5DB;
}
[data-theme="dark"] .cg-chip:hover {
  background: #003DA5;
  color: #fff;
  border-color: #003DA5;
}
[data-theme="dark"] .cg-fab {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .cg-chat {
    bottom: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .cg-fab {
    bottom: 16px;
    right: 16px;
    width: 56px;
    height: 56px;
  }
}
