/* chat-widget.css — styles for the LosDigital AI chatbot widget.
 * Pairs with chat-widget.js. Loaded on AI Bilingual tier sites only.
 *
 * Design rules per voice.md:
 * - Sharp 2px radius for primary CTAs (no pill buttons)
 * - Solid backgrounds, no glass-morphism / backdrop-blur
 * - No tailwind startup-green; warm amber + navy for trust
 * - No emoji icons in service grids (we use Lucide path SVG in the bubble)
 *
 * Apr 30 ship — rank 19 Option B.
 */

.losdig-chat-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #111;
}

/* Bubble button */
.losdig-chat-bubble {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1f2937; /* navy-slate */
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.losdig-chat-bubble:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}
.losdig-chat-bubble:focus-visible {
  outline: 2px solid #f59e0b; /* warm amber accent */
  outline-offset: 2px;
}

/* Panel */
.losdig-chat-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: 360px;
  max-width: calc(100vw - 40px);
  height: 480px;
  max-height: calc(100vh - 100px);
  background: #ffffff;
  border-radius: 2px; /* sharp per voice rules */
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Header */
.losdig-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #1f2937;
  color: #ffffff;
  flex-shrink: 0;
}
.losdig-chat-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
.losdig-chat-sub {
  font-size: 11px;
  opacity: 0.75;
  margin-top: 1px;
}
.losdig-chat-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 2px;
  transition: background 120ms ease;
}
.losdig-chat-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Messages area */
.losdig-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.losdig-chat-msg {
  max-width: 84%;
  padding: 8px 12px;
  border-radius: 2px;
  word-wrap: break-word;
  white-space: pre-wrap;
  font-size: 14px;
}
.losdig-chat-msg-user {
  align-self: flex-end;
  background: #1f2937;
  color: #ffffff;
}
.losdig-chat-msg-assistant {
  align-self: flex-start;
  background: #ffffff;
  color: #111111;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.losdig-chat-typing {
  opacity: 0.6;
  font-style: italic;
}

/* Form */
.losdig-chat-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}
.losdig-chat-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 2px;
  font: inherit;
  color: #111;
  background: #ffffff;
}
.losdig-chat-input:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.18);
}
.losdig-chat-send {
  padding: 10px 16px;
  background: #f59e0b; /* warm amber primary */
  color: #1f2937;
  border: none;
  border-radius: 2px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease;
}
.losdig-chat-send:hover {
  background: #d97706;
}
.losdig-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile tweaks */
@media (max-width: 480px) {
  .losdig-chat-root {
    right: 12px;
    bottom: 12px;
  }
  .losdig-chat-panel {
    width: calc(100vw - 24px);
    height: calc(100vh - 100px);
    bottom: 68px;
  }
}
