/* Citas de procedencia: botoncito en la esquina superior izquierda de cada
   componente + barra inferior con la referencia.

   Para anadir una cita a otro componente hacen falta dos cosas y nada mas:
   una entrada en citas.json y un <button class="cite-btn"> dentro de un
   contenedor posicionado (position: relative/fixed/absolute). */

.cite-btn {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #7a8b98;
  border-radius: 50%;
  background-color: #ffffff;
  color: #41525f;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
}

.cite-btn:hover {
  opacity: 1;
  border-color: #0056b3;
  color: #0056b3;
}

/* Las tarjetas de escenario no estaban posicionadas: sin esto el boton se
   colocaria respecto al viewport. */
.scenario-card {
  position: relative;
}

/* El header del chat deja hueco para no solaparse con el boton. */
.chat-header {
  padding-left: 34px;
}

.citation-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2050;
  background-color: #f7fbfa;
  border-top: 2px solid #38a3a5;
  box-shadow: 0 -3px 14px rgba(0, 0, 0, 0.16);
}

.citation-bar[hidden] {
  display: none;
}

.citation-bar-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px;
}

.citation-tag {
  flex: 0 0 auto;
  padding: 2px 9px;
  border-radius: 10px;
  background-color: #ddfff3;
  color: #14746f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.citation-body {
  flex: 1;
  min-width: 0;
}

.citation-title {
  margin: 0 0 2px 0;
  font-size: 12px;
  font-weight: 700;
  color: #41525f;
}

.citation-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #222;
  overflow-wrap: anywhere;
}

.citation-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.citation-link,
.citation-copy {
  padding: 4px 10px;
  border: 1px solid #38a3a5;
  border-radius: 12px;
  background-color: #ffffff;
  color: #14746f;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.citation-link[hidden] {
  display: none;
}

.citation-copy:hover,
.citation-link:hover {
  background-color: #ddfff3;
}

.citation-close {
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: #41525f;
  cursor: pointer;
}

@media (max-width: 640px) {
  .citation-bar-inner {
    flex-wrap: wrap;
    padding: 10px 12px;
  }

  .citation-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
