/* PascalBot: chat de información en la esquina de la página. */
.pb {
  --pb-yellow: #FFC107;
  --pb-dark: #1F1F1F;
  --pb-gray: #E9E8E9;
  --pb-cream: #FFF8E1;
  --pb-gold: #8A6100;
  font-family: Montserrat, "Plus Jakarta Sans", system-ui, sans-serif;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  color: var(--pb-dark);
}
.pb *, .pb *::before, .pb *::after { box-sizing: border-box; }

.pb-bubble {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--pb-yellow);
  padding: 0;
  background: var(--pb-cream);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
  cursor: pointer;
  overflow: hidden;
  display: block;
  transition: transform .15s ease;
}
.pb-bubble:hover { transform: scale(1.06); }
.pb-bubble:focus-visible { outline: 3px solid var(--pb-dark); outline-offset: 3px; }
.pb-bubble img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.pb-tag {
  position: absolute;
  right: 74px;
  bottom: 18px;
  background: var(--pb-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
}
.pb-tag::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  margin-top: -5px;
  border: 5px solid transparent;
  border-right: 0;
  border-left-color: var(--pb-dark);
}
.pb.pb-open .pb-tag, .pb.pb-open .pb-bubble { display: none; }

.pb-panel {
  display: none;
  flex-direction: column;
  width: 370px;
  height: min(560px, calc(100vh - 40px));
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  overflow: hidden;
}
.pb.pb-open .pb-panel { display: flex; }

.pb-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--pb-dark);
  color: #fff;
}
.pb-head img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--pb-yellow); background: var(--pb-cream); object-fit: cover; object-position: center; }
.pb-head b { display: block; font-size: 15px; }
.pb-head small { display: block; font-size: 12px; color: var(--pb-gray); }
.pb-close {
  margin-left: auto;
  background: none;
  border: 0;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.pb-log {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: var(--pb-cream);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pb-msg {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.pb-msg a { color: var(--pb-gold); font-weight: 600; }
.pb-bot { background: #fff; align-self: flex-start; border-bottom-left-radius: 4px; }
.pb-user { background: var(--pb-yellow); align-self: flex-end; border-bottom-right-radius: 4px; }
.pb-typing { color: #666; font-style: italic; }

.pb-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; background: var(--pb-cream); }
.pb-chips button {
  font: inherit;
  font-size: 13px;
  border: 1px solid var(--pb-yellow);
  background: #fff;
  color: var(--pb-dark);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
}
.pb-chips button:hover { background: var(--pb-yellow); }

.pb-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--pb-gray); }
.pb-form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 15px;
  border: 1px solid var(--pb-gray);
  border-radius: 999px;
  padding: 9px 14px;
}
.pb-form input:focus { outline: 2px solid var(--pb-yellow); border-color: transparent; }
.pb-form button {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--pb-dark);
  color: #fff;
  cursor: pointer;
}
.pb-form button:disabled { opacity: .5; cursor: default; }
.pb-foot { font-size: 11px; color: #666; padding: 0 14px 10px; }
.pb-foot a { color: var(--pb-gold); font-weight: 600; }

@media (max-width: 480px) {
  .pb { right: 16px; bottom: 16px; }
  .pb.pb-open { right: 0; bottom: 0; left: 0; top: 0; }
  .pb-panel { width: 100%; height: 100%; border-radius: 0; }
  .pb-tag { display: none; }
}
