/* Ibéricos Benito — Asistente IA (widget) */
.ibc-launcher {
  position: fixed;
  left: 22px;
  bottom: 52px;
  z-index: 4;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffca67 0%, #ff9d00 100%);
  color: #1f1406;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.ibc-launcher:hover { transform: translateY(-2px); }
.ibc-launcher svg { width: 28px; height: 28px; fill: currentColor; }

.ibc-panel {
  position: fixed;
  left: 22px;
  bottom: 122px;
  z-index: 5;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 150px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.45;
  color: #20160f;
}
.ibc-panel.ibc-open { display: flex; }

.ibc-header {
  background: linear-gradient(135deg, #ffca67 0%, #ff9d00 100%);
  color: #1f1406;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ibc-header h3 { margin: 0; font-size: 16px; font-weight: 600; }
.ibc-header small { display: block; font-weight: 400; opacity: 0.8; font-size: 12px; margin-top: 2px; }
.ibc-close { background: none; border: none; color: #1f1406; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }

.ibc-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #faf7f2;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ibc-msg { max-width: 85%; padding: 9px 12px; border-radius: 12px; white-space: pre-wrap; word-wrap: break-word; }
.ibc-msg a { color: inherit; text-decoration: underline; }
.ibc-bot { align-self: flex-start; background: #fff; border: 1px solid #ece5db; border-bottom-left-radius: 4px; }
.ibc-user { align-self: flex-end; background: linear-gradient(135deg, #ffca67 0%, #ff9d00 100%); color: #1f1406; border-bottom-right-radius: 4px; }

.ibc-choice {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 22px;
  font-weight: 600;
  font-size: 14px;
}
.ibc-choice svg { width: 18px; height: 18px; fill: currentColor; }

.ibc-typing { align-self: flex-start; color: #8a7f74; font-style: italic; font-size: 14px; }

.ibc-footer { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #ece5db; background: #fff; }
.ibc-footer textarea {
  flex: 1; resize: none; border: 1px solid #d8cfc3; border-radius: 10px;
  padding: 9px 11px; font-size: 15px; font-family: inherit; max-height: 90px; outline: none;
}
.ibc-footer textarea:focus { border-color: #ff9d00; }
.ibc-send {
  border: none; background: linear-gradient(135deg, #ffca67 0%, #ff9d00 100%); color: #1f1406; border-radius: 10px;
  width: 44px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.ibc-send:disabled { opacity: 0.5; cursor: default; }
.ibc-send svg { width: 20px; height: 20px; fill: currentColor; }

.ibc-disclaimer { font-size: 11px; color: #9a8e80; text-align: center; padding: 0 10px 8px; background: #fff; }

@media (max-width: 480px) {
  .ibc-panel {
    left: 0;
    right: 0;
    top: 0;
    bottom: auto;
    width: 100%;
    max-width: 100%;
    height: 100dvh;       /* altura "dinámica": tiene en cuenta barras del navegador */
    max-height: none;
    border-radius: 0;
  }
}
