/* La Gaceta Chatbot — dark brand */
#lg-chatbot-root {
  --lg-bg: #0a0b0d;
  --lg-panel: #14161a;
  --lg-text: #f8f8f2;
  --lg-muted: #888a8c;
  --lg-signal: #f2e94e;
  --lg-blue: #39bdf8;
  --lg-border: rgba(248, 248, 242, 0.12);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.lg-chat-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99990;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--lg-signal), #e0c84a);
  color: #0a0b0d;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.lg-chat-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,.55); }
.lg-chat-fab[aria-expanded="true"] { background: #2a2d33; color: var(--lg-text); }

.lg-chat-panel {
  position: fixed;
  right: 18px;
  bottom: 84px;
  z-index: 99991;
  width: min(380px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 120px));
  display: none;
  flex-direction: column;
  background: var(--lg-panel);
  color: var(--lg-text);
  border: 1px solid var(--lg-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
.lg-chat-panel.is-open { display: flex; }

.lg-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  background: var(--lg-bg);
  border-bottom: 1px solid var(--lg-border);
}
.lg-chat-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.lg-chat-head .lg-chat-sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--lg-muted);
  font-weight: 500;
}
.lg-chat-close {
  border: 0;
  background: transparent;
  color: var(--lg-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.lg-chat-close:hover { color: var(--lg-text); }

.lg-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(57, 189, 248, 0.04), transparent 40%),
    var(--lg-panel);
}

.lg-chat-bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.lg-chat-bubble.user {
  align-self: flex-end;
  background: rgba(57, 189, 248, 0.16);
  border: 1px solid rgba(57, 189, 248, 0.25);
}
.lg-chat-bubble.bot {
  align-self: flex-start;
  background: rgba(248, 248, 242, 0.06);
  border: 1px solid var(--lg-border);
}
.lg-chat-bubble.system {
  align-self: center;
  max-width: 95%;
  background: transparent;
  border: 0;
  color: var(--lg-muted);
  font-size: 12px;
  text-align: center;
}
.lg-chat-bubble.typing { color: var(--lg-muted); font-style: italic; }

.lg-chat-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--lg-border);
  background: var(--lg-bg);
}
.lg-chat-form input[type="text"] {
  flex: 1;
  border-radius: 10px;
  border: 1px solid var(--lg-border);
  background: #0f1115;
  color: var(--lg-text);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.lg-chat-form input[type="text"]:focus {
  border-color: rgba(57, 189, 248, 0.55);
  box-shadow: 0 0 0 2px rgba(57, 189, 248, 0.15);
}
.lg-chat-form button {
  border: 0;
  border-radius: 10px;
  background: var(--lg-signal);
  color: #0a0b0d;
  font-weight: 700;
  padding: 0 14px;
  cursor: pointer;
}
.lg-chat-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .lg-chat-panel {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 78px;
    height: min(60vh, 480px);
  }
  .lg-chat-fab { right: 12px; bottom: 12px; }
}
