/* Ask Eskind — EBL Chat Widget styles */
:root {
  --ae-navy: #1A1A1A;
  --ae-navy-deep: #000000;
  --ae-gold: #C89B3C;
  --ae-gold-deep: #866D4B;
  --ae-teal-light: #F5EBD8;
  --ae-paper: #F7F5F0;
  --ae-ink: #1C1C1C;
  --ae-muted: #6B7280;
  --ae-border: #E2E0D9;
  --ae-error: #B3403A;
}

/* --- Launcher button --- */
.ae-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ae-gold);
  color: #1A1A1A;
  border: none;
  border-radius: 999px;
  padding: 11px 18px 11px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  z-index: 1000;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}
.ae-launcher:hover {
  background: var(--ae-gold-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}
.ae-launcher svg { flex-shrink: 0; }
.ae-launcher.ae-hidden { display: none; }

/* --- Chat panel --- */
.ae-chat-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 48px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(15, 27, 45, 0.28);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  border: 1px solid var(--ae-border);
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  box-sizing: border-box;
}
.ae-chat-panel * { box-sizing: border-box; }
.ae-chat-panel.ae-open { display: flex; }

.ae-chat-header {
  background: var(--ae-navy);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ae-chat-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ae-chat-header h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.ae-chat-header .ae-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 1px;
}
.ae-chat-header-actions {
  display: flex;
  gap: 4px;
}
.ae-icon-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.ae-icon-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.ae-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--ae-paper);
}

.ae-msg {
  max-width: 84%;
  font-size: 14px;
  line-height: 1.55;
  padding: 10px 13px;
  border-radius: 12px;
  white-space: pre-wrap;
}
.ae-msg.ae-bot {
  background: #fff;
  border: 1px solid var(--ae-border);
  color: var(--ae-ink);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.ae-msg.ae-user {
  background: var(--ae-gold);
  color: #1A1A1A;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}
.ae-msg.ae-error {
  background: #FBEAE9;
  border: 1px solid #E8C4C1;
  color: var(--ae-error);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}

.ae-welcome {
  align-self: flex-start;
  max-width: 92%;
}
.ae-welcome .ae-msg {
  background: var(--ae-teal-light);
  border: 1px solid #C3E6E1;
  color: #10413D;
}

.ae-typing {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--ae-border);
  border-radius: 12px;
  border-bottom-left-radius: 3px;
  padding: 12px 14px;
  display: flex;
  gap: 4px;
}
.ae-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ae-muted);
  animation: ae-bounce 1.2s infinite ease-in-out;
}
.ae-typing span:nth-child(2) { animation-delay: 0.15s; }
.ae-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ae-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.ae-chat-input-row {
  border-top: 1px solid var(--ae-border);
  padding: 12px;
  background: #fff;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.ae-chat-input-row textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--ae-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  max-height: 90px;
  outline: none;
  transition: border-color 0.15s ease;
}
.ae-chat-input-row textarea:focus {
  border-color: var(--ae-gold);
}
.ae-send-btn {
  background: var(--ae-navy);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.ae-send-btn:hover { background: var(--ae-gold-deep); }
.ae-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ae-disclaimer {
  font-size: 11px;
  color: var(--ae-muted);
  text-align: center;
  padding: 6px 12px 10px;
  background: #fff;
  line-height: 1.4;
}

@media (max-width: 480px) {
  .ae-chat-panel {
    right: 16px;
    left: 16px;
    width: auto;
    bottom: 16px;
  }
  .ae-launcher { right: 16px; bottom: 16px; }
}
