/* Asistente Realeza · botón flotante y ventana de chat */
.rbot-fab {
  position: fixed; right: 18px; bottom: 162px; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold, #d5b26f), var(--primary-2, #7a5230));
  box-shadow: 0 14px 34px rgba(60, 38, 16, 0.38);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.rbot-fab svg { width: 32px; height: 32px; }
.rbot-fab::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(213, 178, 111, 0.65);
  animation: rbot-pulse 2.6s ease-out infinite; pointer-events: none;
}
@keyframes rbot-pulse { 0% { transform: scale(0.9); opacity: 0.9; } 80%, 100% { transform: scale(1.4); opacity: 0; } }
.rbot-fab:hover, .rbot-fab:focus-visible { transform: scale(1.08); box-shadow: 0 18px 40px rgba(60, 38, 16, 0.46); }
.rbot-fab.is-open::after, .rbot-fab.is-open .rbot-fab__dot { display: none; }
.rbot-fab__dot {
  position: absolute; top: -3px; right: -3px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center;
  background: #e0443a; color: #fff; font: 800 0.7rem/1 "Montserrat", sans-serif;
  border: 2px solid #fff;
}
.rbot-fab__dot[hidden] { display: none; }

.rbot-teaser {
  position: fixed; right: 90px; bottom: 170px; z-index: 90; max-width: 230px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 34px 12px 14px; border-radius: 16px 16px 4px 16px;
  background: #fff; border: 1px solid rgba(213, 178, 111, 0.55);
  box-shadow: 0 14px 34px rgba(60, 38, 16, 0.22);
  cursor: pointer; animation: rbot-pop 0.45s cubic-bezier(.2, 1.2, .4, 1) both;
}
.rbot-teaser[hidden] { display: none; }
.rbot-teaser strong { font-size: 0.7rem; letter-spacing: 0.14em; color: var(--gold, #d5b26f); }
.rbot-teaser span { font-size: 0.86rem; line-height: 1.35; color: var(--text, #2a1d10); }
.rbot-teaser__x { position: absolute; top: 4px; right: 6px; border: none; background: none; cursor: pointer; font-size: 1.2rem; line-height: 1; color: #9a8a78; }
@keyframes rbot-pop { from { opacity: 0; transform: translateY(10px) scale(0.9); } to { opacity: 1; transform: none; } }

/* ---------- Ventana ---------- */
.rbot {
  position: fixed; right: 90px; bottom: 22px; z-index: 120;
  width: min(390px, calc(100vw - 110px)); height: min(620px, calc(100vh - 44px)); height: min(620px, calc(100dvh - 44px));
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 24px; background: var(--bg-soft, #fcf8f4);
  border: 1px solid rgba(213, 178, 111, 0.5);
  box-shadow: 0 30px 80px rgba(30, 16, 4, 0.38);
  opacity: 0; transform: translateY(16px) scale(0.97); transform-origin: 100% 100%;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.rbot[hidden] { display: none; }
.rbot.is-open { opacity: 1; transform: none; }
.rbot:focus { outline: none; }

.rbot__head {
  display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; color: #fff;
  background: linear-gradient(120deg, var(--primary-2, #7a5230), var(--primary, #5c3c1c));
}
.rbot__avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #f1d99c, var(--gold, #d5b26f)); color: var(--primary, #5c3c1c); font-size: 1.1rem;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}
.rbot__title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rbot__title strong { font-family: "Playfair Display", serif; font-size: 1.1rem; letter-spacing: 0.04em; }
.rbot__title span { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; opacity: 0.88; }
.rbot__on { width: 8px; height: 8px; border-radius: 50%; background: #3fdc7a; box-shadow: 0 0 0 3px rgba(63, 220, 122, 0.25); }
.rbot__icon {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 0.95rem;
  transition: background 0.2s ease;
}
.rbot__icon:hover, .rbot__icon:focus-visible { background: rgba(255, 255, 255, 0.3); }

.rbot__log {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 14px 8px;
  display: flex; flex-direction: column; gap: 10px;
  background:
    radial-gradient(120% 40% at 50% 0%, rgba(213, 178, 111, 0.12), transparent 70%),
    var(--bg-soft, #fcf8f4);
}
.rbot__msg {
  max-width: 88%; padding: 10px 14px; border-radius: 18px;
  font-size: 0.9rem; line-height: 1.5; animation: rbot-in 0.3s ease both;
}
.rbot__msg--bot { align-self: flex-start; background: #fff; color: var(--text, #2a1d10); border: 1px solid rgba(213, 178, 111, 0.35); border-bottom-left-radius: 5px; box-shadow: 0 4px 14px rgba(60, 38, 16, 0.06); }
.rbot__msg--bot ol { margin: 8px 0; padding-left: 20px; display: grid; gap: 4px; }
.rbot__msg--bot a { color: var(--primary-2, #7a5230); font-weight: 700; text-decoration: underline; text-decoration-color: var(--gold, #d5b26f); }
.rbot__msg--user { align-self: flex-end; background: linear-gradient(120deg, var(--primary-2, #7a5230), var(--primary, #5c3c1c)); color: #fff; border-bottom-right-radius: 5px; font-weight: 600; }
@keyframes rbot-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rbot__typing { display: flex; gap: 5px; padding: 14px 16px; }
.rbot__typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold, #d5b26f); animation: rbot-dot 1s ease-in-out infinite; }
.rbot__typing i:nth-child(2) { animation-delay: 0.15s; }
.rbot__typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes rbot-dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-5px); opacity: 1; } }

.rbot__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 6px; animation: rbot-in 0.3s ease both; }
.rbot__chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; cursor: pointer;
  background: #fff; color: var(--primary, #5c3c1c); border: 1.5px solid var(--gold, #d5b26f);
  font: 700 0.82rem/1.2 "Montserrat", sans-serif; text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.rbot__chip i { color: var(--primary-2, #7a5230); font-size: 0.8rem; }
.rbot__chip em { font-style: normal; font-size: 0.68rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--accent, #f4ebe0); color: var(--text-soft, #6b5a48); }
.rbot__chip:hover, .rbot__chip:focus-visible { background: var(--gold-soft, #ecd9ad); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(213, 178, 111, 0.3); }

.rbot-dogs { display: grid; gap: 10px; margin-top: 10px; }
.rbot-dog { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 14px; background: var(--bg-soft, #fcf8f4); border: 1px solid rgba(213, 178, 111, 0.4); }
.rbot-dog img { flex: none; width: 64px; height: 80px; object-fit: cover; border-radius: 10px; }
.rbot-dog__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rbot-dog__body strong { font-family: "Playfair Display", serif; font-size: 1.05rem; color: var(--primary, #5c3c1c); }
.rbot-dog__body span { font-size: 0.76rem; line-height: 1.3; color: var(--text-soft, #6b5a48); }
.rbot-dog__acts { display: flex; align-items: center; gap: 10px; margin-top: 5px; flex-wrap: wrap; }
.rbot-dog__ver { font-size: 0.76rem; font-weight: 700; color: var(--primary-2, #7a5230) !important; text-decoration: none !important; border-bottom: 1px solid var(--gold, #d5b26f); }
.rbot-dog__wa { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #25d366; color: #fff !important; font-size: 0.74rem; font-weight: 800; text-decoration: none !important; }

.rbot__foot { padding: 9px 14px; text-align: center; font-size: 0.72rem; color: var(--text-soft, #6b5a48); border-top: 1px solid rgba(213, 178, 111, 0.35); background: #fff; }
.rbot__foot i { color: var(--gold, #d5b26f); margin-right: 4px; }

@media (max-width: 768px) {
  .rbot-fab { bottom: 144px; right: 14px; width: 56px; height: 56px; }
  .rbot-teaser { right: 82px; bottom: 150px; }
}
@media (max-width: 560px) {
  .rbot-fab { bottom: 80px; right: 12px; }
  .rbot-teaser { right: 76px; bottom: 86px; max-width: 200px; }
  .rbot { right: 8px; left: 8px; bottom: 8px; width: auto; height: min(640px, calc(100vh - 16px)); height: min(640px, calc(100dvh - 16px)); border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .rbot-fab::after, .rbot-teaser, .rbot__msg, .rbot__chips, .rbot__typing i { animation: none; }
  .rbot { transition: none; }
}

.rbot__msg--bot ul { margin: 8px 0; padding-left: 18px; display: grid; gap: 5px; }
.rbot-strip { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.rbot-strip__item { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; text-decoration: none !important; }
.rbot-strip__item img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold, #d5b26f); box-shadow: 0 6px 14px rgba(60, 38, 16, 0.18); }
.rbot-strip__item span { font-size: 0.72rem; font-weight: 700; color: var(--primary, #5c3c1c) !important; text-decoration: none !important; }
.rbot-dog__price { font-style: normal; font-family: "Playfair Display", serif; font-weight: 700; font-size: .95rem; color: var(--primary-2, #7a5230); }
.rbot__msg--bot ul.rbot-prices { list-style: none; padding-left: 0; gap: 10px; margin: 10px 0; }
.rbot-prices li { padding: 8px 10px; border-radius: 12px; background: var(--bg-soft, #fcf8f4); border: 1px solid rgba(213, 178, 111, 0.4); }
.rbot-prices li strong { color: var(--primary, #5c3c1c); }
.rbot-prices li span { font-size: 0.82rem; font-style: italic; color: var(--text-soft, #6b5a48); }
