/* chat-widget.css — AllWhite Clinic virtual assistant */

.awc-chat-root {
  /* Design tokens — ajustá acá para adaptar al branding de la clínica */
  --awc-primary: #0ea5a4;
  --awc-primary-dark: #0b8988;
  --awc-bg: #ffffff;
  --awc-bg-soft: #f4faf9;
  --awc-text: #12262b;
  --awc-text-muted: #6b7c80;
  --awc-user-bubble: #0ea5a4;
  --awc-bot-bubble: #eef5f4;
  --awc-radius: 16px;
  --awc-shadow: 0 12px 32px rgba(15, 40, 45, 0.16);
  --awc-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 9999;
  font-family: var(--awc-font);
}

.awc-chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--awc-primary);
  color: #fff;
  box-shadow: var(--awc-shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.awc-chat-toggle:hover {
  background: var(--awc-primary-dark);
  transform: scale(1.05);
}

.awc-chat-toggle svg {
  width: 26px;
  height: 26px;
}

.awc-icon-close { display: none; }
.awc-open .awc-icon-chat { display: none; }
.awc-open .awc-icon-close { display: block; }

.awc-chat-window {
  position: absolute;
  left: 0;
  bottom: 76px;
  width: 340px;
  max-width: calc(100vw - 40px);
  height: 460px;
  max-height: calc(100vh - 140px);
  background: var(--awc-bg);
  border-radius: var(--awc-radius);
  box-shadow: var(--awc-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.awc-open .awc-chat-window {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.awc-chat-header {
  background: var(--awc-primary);
  color: #fff;
  padding: 16px 18px;
}

.awc-chat-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
}

.awc-chat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6df0c2;
  display: inline-block;
}

.awc-chat-header-sub {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 2px;
}

.awc-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--awc-bg-soft);
}

.awc-msg {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.awc-msg-bot {
  align-self: flex-start;
  background: var(--awc-bot-bubble);
  color: var(--awc-text);
  border-bottom-left-radius: 4px;
}

.awc-msg-user {
  align-self: flex-end;
  background: var(--awc-user-bubble);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.awc-msg-typing {
  color: var(--awc-text-muted);
  font-style: italic;
}

.awc-msg-bot a {
  color: var(--awc-primary-dark);
  font-weight: 600;
  word-break: break-all;
}

.awc-chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e6efee;
  background: var(--awc-bg);
}

.awc-chat-input {
  flex: 1;
  border: 1px solid #dbe8e6;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13.5px;
  outline: none;
  font-family: var(--awc-font);
}

.awc-chat-input:focus {
  border-color: var(--awc-primary);
}

.awc-chat-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--awc-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.awc-chat-send:hover {
  background: var(--awc-primary-dark);
}

.awc-chat-send svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 420px) {
  .awc-chat-window {
    width: calc(100vw - 24px);
    left: -8px;
  }
}
