#farmabot-root .fb {
  position: fixed;
  right: 24px;
  bottom: 110px;
  z-index: 2147483000;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #22302f;
}
#farmabot-root .fb * { box-sizing: border-box; }

#farmabot-root .fb-bubble {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--fb, #0A8C8C);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(0, 0, 0, .06));
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .8);
  border-radius: 999px;
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .2px;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22), 0 0 0 4px rgba(255, 255, 255, .16);
  transition: transform .15s ease, box-shadow .15s ease;
}
#farmabot-root .fb-bubble:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 18px 40px rgba(0, 0, 0, .26), 0 0 0 5px rgba(255, 255, 255, .2); }
#farmabot-root .fb-bubble::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 999px;
  border: 2px solid rgba(140, 74, 91, .38);
  animation: fb-pulse 3.2s ease-out infinite;
  pointer-events: none;
}
@keyframes fb-pulse {
  0% { transform: scale(.96); opacity: .75; }
  65% { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(1.18); opacity: 0; }
}
#farmabot-root .fb-bubble.fb-open { display: none; }

#farmabot-root .fb-teaser {
  position: fixed;
  right: 24px;
  bottom: 176px;
  max-width: 250px;
  background: #fff;
  border: 1px solid #e3e8e7;
  border-left: 4px solid var(--fb, #0A8C8C);
  border-radius: 12px;
  padding: 10px 26px 10px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
  font-size: 13.5px;
  line-height: 1.4;
  color: #22302f;
  z-index: 2147482999;
  animation: fb-fadein .45s ease both;
}
#farmabot-root .fb-teaser b { color: var(--fb, #0A8C8C); }
#farmabot-root .fb-teaser-close {
  position: absolute;
  top: 2px;
  right: 6px;
  border: 0;
  background: transparent;
  color: #8a9a98;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}
@keyframes fb-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  #farmabot-root .fb-bubble::after { animation: none; opacity: 0; }
  #farmabot-root .fb-teaser { animation: none; }
}

#farmabot-root .fb-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 420px;
  z-index: 2147483001;
  max-width: calc(100vw - 24px);
  height: min(820px, calc(100vh - 150px));
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e3e8e7;
}
#farmabot-root .fb-head {
  background: var(--fb, #0A8C8C);
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#farmabot-root .fb-head b { display: block; font-size: 16px; }
#farmabot-root .fb-head small { opacity: .85; font-size: 12px; }
#farmabot-root .fb-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
#farmabot-root .fb-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #F5F7F6;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
#farmabot-root .fb-msg {
  max-width: 90%;
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.6;
  color: #1f2d2c;
  word-wrap: break-word;
}
#farmabot-root .fb-text p { margin: 0 0 8px; }
#farmabot-root .fb-text p:last-child { margin-bottom: 0; }
#farmabot-root .fb-text strong,
#farmabot-root .fb-text b { font-weight: 700; color: #0b3b39; }
#farmabot-root .fb-text ul,
#farmabot-root .fb-text ol { margin: 6px 0 0 18px; padding: 0; }
#farmabot-root .fb-text li { margin: 4px 0; }
#farmabot-root .fb-text a { color: var(--fb, #0A8C8C); text-decoration: underline; }
#farmabot-root .fb-user {
  align-self: flex-end;
  background: var(--fb, #0A8C8C);
  color: #fff;
  border-bottom-right-radius: 4px;
}
#farmabot-root .fb-bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e3e8e7;
  border-bottom-left-radius: 4px;
}
#farmabot-root .fb-typing { letter-spacing: 2px; color: #7a8b89; }
#farmabot-root .fb-text.fb-typing-cursor::after {
  content: "▍";
  margin-left: 2px;
  opacity: .65;
  animation: fb-blink 1s steps(1) infinite;
}
@keyframes fb-blink {
  50% { opacity: 0; }
}
#farmabot-root .fb-products { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
#farmabot-root .fb-product {
  display: flex;
  gap: 10px;
  background: #fff;
  border: 1px solid #e3e8e7;
  border-radius: 12px;
  padding: 8px;
}
#farmabot-root .fb-pimg {
  width: 74px;
  min-width: 74px;
  height: 74px;
  background: #fafbfb;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#farmabot-root .fb-pimg img { max-width: 100%; max-height: 100%; object-fit: contain; }
#farmabot-root .fb-pinfo { flex: 1; min-width: 0; }
#farmabot-root .fb-pname {
  display: block;
  color: #22302f;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  line-height: 1.3;
}
#farmabot-root .fb-pname:hover { color: var(--fb, #0A8C8C); }
#farmabot-root .fb-pprice { font-size: 15px; font-weight: 800; color: var(--fb, #0A8C8C); margin: 5px 0; }
#farmabot-root .fb-ptype { font-size: 12px; color: #6a7a78; margin: 3px 0 4px; line-height: 1.35; }

#farmabot-root .fb-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 4px;
}
#farmabot-root .fb-action {
  flex: 1 1 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
#farmabot-root .fb-action:hover { transform: translateY(-1px); }
#farmabot-root .fb-action-wa {
  background: #25D366;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 211, 102, .35);
}
#farmabot-root .fb-action-call {
  background: var(--fb, #0A8C8C);
  color: #fff;
  border: 2px solid var(--fb, #0A8C8C);
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}
#farmabot-root .fb-old { color: #98a6a4; text-decoration: line-through; font-size: 11.5px; font-weight: 600; margin-left: 6px; }
#farmabot-root .fb-off {
  display: inline-block;
  background: #F9E536;
  color: #333;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 800;
  margin-left: 6px;
}
#farmabot-root .fb-add {
  width: 100%;
  border: 0;
  background: var(--fb, #0A8C8C);
  color: #fff;
  border-radius: 8px;
  padding: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
#farmabot-root .fb-add:disabled { background: #b9c7c5; cursor: default; }
#farmabot-root .fb-add.fb-added,
#farmabot-root .fb-add.fb-added:disabled {
  background: #2E7D32;
  color: #fff;
  border: 1px solid #2E7D32;
  opacity: 1;
  cursor: default;
}
#farmabot-root .fb-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--fb, #0A8C8C);
  color: #fff;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .16);
  transition: transform .12s ease, box-shadow .12s ease;
}
#farmabot-root .fb-checkout:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0, 0, 0, .2); }
#farmabot-root .fb-checkout::after { content: "→"; font-weight: 700; }
#farmabot-root .fb-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e3e8e7;
  background: #fff;
}
#farmabot-root .fb-input {
  flex: 1;
  border: 1px solid #cfd8d6;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
}
#farmabot-root .fb-input:focus { border-color: var(--fb, #0A8C8C); }
#farmabot-root .fb-send {
  border: 0;
  background: var(--fb, #0A8C8C);
  color: #fff;
  border-radius: 10px;
  padding: 0 16px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
#farmabot-root .fb-foot {
  font-size: 11px;
  color: #7a8b89;
  padding: 6px 12px 9px;
  background: #fff;
  text-align: center;
}
#farmabot-root .fb-foot a { color: var(--fb, #0A8C8C); text-decoration: underline; font-weight: 600; }

#farmabot-root .fb-toast {
  position: fixed;
  right: 18px;
  bottom: 96px;
  z-index: 2147483002;
  background: #22302f;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}

#farmabot-root .fb-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#farmabot-root .fb-suggest button {
  border: 1px solid var(--fb, #0A8C8C);
  background: #fff;
  color: var(--fb, #0A8C8C);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
#farmabot-root .fb-suggest button:hover {
  background: var(--fb, #0A8C8C);
  color: #fff;
}

@media (max-width: 480px) {
  #farmabot-root .fb-panel {
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    height: 82vh;
    max-height: calc(100vh - 12px);
    border-radius: 18px 18px 0 0;
  }
  #farmabot-root .fb { right: 12px; bottom: 104px; }
  #farmabot-root .fb-bubble { padding: 11px 16px; font-size: 14.5px; gap: 7px; }
  #farmabot-root .fb-bubble svg { width: 19px; height: 19px; }
  #farmabot-root .fb-teaser { right: 12px; bottom: 168px; max-width: 200px; font-size: 12.5px; }
}

@media (max-width: 380px) {
  #farmabot-root .fb { right: 10px; bottom: 100px; }
  #farmabot-root .fb-bubble { padding: 10px 14px; font-size: 13.5px; gap: 6px; }
  #farmabot-root .fb-teaser { right: 10px; bottom: 162px; max-width: 180px; font-size: 12px; }
}

/* Móviles en horizontal y pantallas bajas: panel casi a pantalla completa */
@media (max-height: 520px) {
  #farmabot-root .fb { right: 16px; bottom: 96px; }
  #farmabot-root .fb-bubble { padding: 11px 17px; font-size: 14.5px; }
  #farmabot-root .fb-teaser { right: 16px; bottom: 158px; max-width: 220px; }
  #farmabot-root .fb-panel {
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    height: 96vh;
    max-height: calc(100vh - 8px);
    border-radius: 18px 18px 0 0;
  }
}
