/* Rayan AI Connector 0.20.18 — CONNECTOR-UX contractuel. */
#rayan-ai-root .rai-history-limit-notice {
  display: grid;
  gap: 5px;
  margin: 0 0 12px;
  padding: 11px 12px;
  border: 1px solid rgba(31, 255, 111, .42);
  border-radius: 10px;
  background: rgba(3, 34, 17, .76);
  color: #caffd8;
  font-family: inherit;
  line-height: 1.45;
}

/* RAG-Q0.6 — séparation visuelle entre corpus RAG et modèle seul. */
.rai-knowledge-mode-notice {
  display: grid;
  gap: 0.3rem;
  width: min(100%, 760px);
  margin: 0 0 0.55rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(250, 204, 21, 0.72);
  border-radius: 12px;
  background: rgba(69, 50, 4, 0.34);
  color: #fef3c7;
  box-shadow: inset 0 0 18px rgba(250, 204, 21, 0.05);
}

.rai-knowledge-mode-notice strong {
  color: #fde047;
  font-size: 0.78rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.rai-knowledge-mode-notice span {
  color: #fef9c3;
  font-size: 0.78rem;
  line-height: 1.45;
}

.rayan-ai-message-row.is-model-only .rayan-ai-bubble {
  border-color: rgba(250, 204, 21, 0.62);
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.06);
}

.rai-model-fallback-offer {
  display: grid;
  gap: 0.65rem;
  width: min(100%, 760px);
  margin-top: 0.65rem;
  padding: 0.75rem;
  border: 1px solid rgba(40, 255, 107, 0.42);
  border-radius: 12px;
  background: rgba(0, 36, 17, 0.76);
}

.rai-model-fallback-offer > span {
  color: rgba(218, 255, 229, 0.8);
  font-size: 0.78rem;
  line-height: 1.45;
}

.rai-model-fallback-button {
  justify-self: start;
  min-height: 38px;
  padding: 0.55rem 0.8rem;
  border: 1px solid #35ff75;
  border-radius: 8px;
  background: rgba(0, 92, 38, 0.5);
  color: #effff4;
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}

.rai-model-fallback-button:hover,
.rai-model-fallback-button:focus-visible {
  background: #16a34a;
  color: #fff;
  outline: none;
  box-shadow: 0 0 16px rgba(53, 255, 117, 0.25);
}

.rai-model-fallback-button:disabled {
  cursor: default;
  opacity: 0.72;
}

@media (max-width: 680px) {
  .rai-model-fallback-button {
    width: 100%;
  }
}

#rayan-ai-root .rai-history-limit-notice strong {
  color: #55ff8d;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

#rayan-ai-root .rai-history-limit-notice span {
  font-size: 11px;
}

/* Sans contrat Core actif pour Persona/Périmètre, la barre ne conserve que
   les outils réellement utilisables et reste centrée sur toutes les tailles. */
#rayan-ai-root #rayan-ai-modal .rai-composer-dock.rai-basic-tools .rai-chat-tools {
  grid-template-columns: 1fr !important;
}

#rayan-ai-root #rayan-ai-modal .rai-composer-dock.rai-basic-tools .rai-chat-tools-left {
  width: 100% !important;
  justify-content: center !important;
}
