:root {
  --fdmx-blue-dark: #061b3d;
  --fdmx-blue: #0077ff;
  --fdmx-blue-soft: #eaf4ff;
  --fdmx-orange: #ff8a00;
  --fdmx-white: #ffffff;
  --fdmx-text: #13213a;
  --fdmx-muted: #6b7280;
  --fdmx-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.fdmx-chatbot * { box-sizing: border-box; }

.fdmx-chatbot {
  position: fixed !important;
  right: 22px !important;
  bottom: 22px !important;
  z-index: 9999999 !important;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.fdmx-chatbot-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--fdmx-blue), var(--fdmx-blue-dark));
  color: var(--fdmx-white);
  padding: 13px 18px;
  box-shadow: var(--fdmx-shadow);
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.01em;
  animation: fdmxPulse 2.8s infinite;
}

@keyframes fdmxPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.fdmx-chatbot-bubble-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--fdmx-orange);
  border-radius: 50%;
}

.fdmx-chatbot-panel {
  position: absolute;
  right: 0;
  bottom: 66px;
  width: 385px;
  max-width: calc(100vw - 28px);
  height: 590px;
  max-height: calc(100vh - 115px);
  background: var(--fdmx-white);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--fdmx-shadow);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: none !important;
}

.fdmx-chatbot-panel.is-open { display: flex !important; flex-direction: column; }

.fdmx-chatbot-header {
  background: linear-gradient(135deg, var(--fdmx-blue-dark), #082a64);
  color: var(--fdmx-white);
  padding: 17px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fdmx-chatbot-header strong { display: block; font-size: 17px; line-height: 1.2; }
.fdmx-chatbot-header small { display: block; color: rgba(255,255,255,.76); font-size: 12px; margin-top: 3px; }

.fdmx-chatbot-close {
  border: 0;
  background: rgba(255,255,255,.12);
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fdmx-chatbot-messages { flex: 1; padding: 16px; overflow-y: auto; background: linear-gradient(180deg, #f8fbff, #ffffff); }
.fdmx-message { width: fit-content; max-width: 88%; padding: 11px 13px; margin-bottom: 10px; border-radius: 15px; font-size: 14px; line-height: 1.45; white-space: pre-line; }
.fdmx-bot { background: var(--fdmx-blue-soft); color: var(--fdmx-text); border-bottom-left-radius: 4px; }
.fdmx-user { margin-left: auto; background: var(--fdmx-blue-dark); color: var(--fdmx-white); border-bottom-right-radius: 4px; }

.fdmx-chatbot-quick { display: flex; gap: 7px; overflow-x: auto; padding: 10px 12px; border-top: 1px solid #edf1f7; background: #ffffff; }
.fdmx-chatbot-quick button { flex: 0 0 auto; border: 1px solid #dbe6f7; background: #ffffff; color: var(--fdmx-blue-dark); border-radius: 999px; padding: 8px 10px; font-size: 12px; font-weight: 800; cursor: pointer; }
.fdmx-chatbot-quick button:hover { border-color: var(--fdmx-blue); color: var(--fdmx-blue); }

.fdmx-chatbot-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #edf1f7; background: #ffffff; }
.fdmx-chatbot-form input { flex: 1; border: 1px solid #dbe6f7; border-radius: 12px; padding: 11px 12px; font-size: 14px; outline: none; }
.fdmx-chatbot-form input:focus { border-color: var(--fdmx-blue); box-shadow: 0 0 0 3px rgba(0,119,255,.12); }
.fdmx-chatbot-form button { border: 0; background: var(--fdmx-orange); color: white; border-radius: 12px; padding: 0 14px; font-weight: 900; cursor: pointer; }

.fdmx-chatbot-footer { display: grid; grid-template-columns: 1fr; gap: 3px; padding: 10px 14px 13px; background: #f7faff; border-top: 1px solid #edf1f7; font-size: 12px; }
.fdmx-chatbot-footer a { color: var(--fdmx-blue-dark); text-decoration: none; font-weight: 800; }

@media (max-width: 480px) {
  .fdmx-chatbot { right: 14px !important; bottom: 14px !important; }
  .fdmx-chatbot-panel { right: -6px; bottom: 62px; width: calc(100vw - 28px); height: 560px; }
  .fdmx-chatbot-bubble-text { display: inline; }
  .fdmx-chatbot-toggle { padding: 12px 14px; font-size: 13px; }
}
