.ifsr-assistente {
  --ifsr-navy: #102b46;
  --ifsr-navy-light: #1b4568;
  --ifsr-accent: #c6a15b;
  --ifsr-bg: #f5f7fa;
  --ifsr-border: #dce3ea;
  color: #172536;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  text-align: left;
}

.ifsr-assistente *, .ifsr-assistente *::before, .ifsr-assistente *::after { box-sizing: border-box; }
.ifsr-assistente button, .ifsr-assistente textarea { font: inherit; }
.ifsr-assistente button { cursor: pointer; }
.ifsr-assistente .screen-reader-text { clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }

.ifsr-assistente--floating {
  bottom: 24px;
  position: fixed;
  z-index: 999999;
}
.ifsr-assistente--right { right: 24px; }
.ifsr-assistente--left { left: 24px; }

.ifsr-assistente__toggle {
  align-items: center;
  background: var(--ifsr-navy);
  border: 3px solid #fff;
  border-radius: 50%;
  bottom: 0;
  box-shadow: 0 8px 30px rgba(16, 43, 70, .28);
  color: #fff;
  display: flex;
  height: 66px;
  justify-content: center;
  position: absolute;
  transition: transform .2s ease, box-shadow .2s ease;
  width: 66px;
}
.ifsr-assistente--right .ifsr-assistente__toggle { right: 0; }
.ifsr-assistente--left .ifsr-assistente__toggle { left: 0; }
.ifsr-assistente__toggle:hover { box-shadow: 0 10px 34px rgba(16, 43, 70, .38); transform: translateY(-2px); }
.ifsr-assistente__toggle:focus-visible, .ifsr-assistente button:focus-visible, .ifsr-assistente textarea:focus-visible { outline: 3px solid var(--ifsr-accent); outline-offset: 2px; }
.ifsr-assistente__toggle-icon { align-items: center; border: 2px solid var(--ifsr-accent); border-radius: 50%; color: var(--ifsr-accent); display: flex; font-size: 28px; font-weight: 800; height: 40px; justify-content: center; width: 40px; }

.ifsr-assistente__panel {
  background: #fff;
  border: 1px solid rgba(16, 43, 70, .12);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(16, 43, 70, .22);
  display: flex;
  flex-direction: column;
  height: min(650px, calc(100vh - 120px));
  overflow: hidden;
  width: min(400px, calc(100vw - 32px));
}
.ifsr-assistente--floating .ifsr-assistente__panel { bottom: 80px; opacity: 0; position: absolute; transform: translateY(12px) scale(.98); transition: opacity .2s ease, transform .2s ease; visibility: hidden; }
.ifsr-assistente--right .ifsr-assistente__panel { right: 0; }
.ifsr-assistente--left .ifsr-assistente__panel { left: 0; }
.ifsr-assistente--floating.is-open .ifsr-assistente__panel { opacity: 1; transform: none; visibility: visible; }
.ifsr-assistente--embedded .ifsr-assistente__panel { height: min(680px, 80vh); max-width: 100%; width: 100%; }

.ifsr-assistente__header {
  align-items: center;
  background: linear-gradient(135deg, var(--ifsr-navy), var(--ifsr-navy-light));
  color: #fff;
  display: flex;
  gap: 12px;
  min-height: 78px;
  padding: 14px 16px;
}
.ifsr-assistente__header strong { display: block; font-size: 17px; line-height: 1.2; }
.ifsr-assistente__header span { color: #dbe7f0; display: block; font-size: 12px; margin-top: 3px; }
.ifsr-assistente__mark { align-items: center; border: 2px solid var(--ifsr-accent); border-radius: 50%; color: var(--ifsr-accent); display: flex; flex: 0 0 48px; font-size: 12px; font-weight: 800; height: 48px; justify-content: center; letter-spacing: .4px; }
.ifsr-assistente__close { background: transparent; border: 0; color: #fff; font-size: 28px; line-height: 1; margin-left: auto; padding: 6px; }

.ifsr-assistente__messages { background: var(--ifsr-bg); display: flex; flex: 1; flex-direction: column; gap: 12px; overflow-y: auto; padding: 18px 15px; scroll-behavior: smooth; }
.ifsr-assistente__message { border-radius: 15px; box-shadow: 0 2px 8px rgba(16, 43, 70, .06); max-width: 88%; padding: 11px 13px; white-space: pre-wrap; word-break: break-word; }
.ifsr-assistente__message--bot, .ifsr-assistente__message--loading { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.ifsr-assistente__message--list { max-width: 94%; width: 94%; }
.ifsr-assistente__message--list ol { margin: 0; padding-left: 25px; }
.ifsr-assistente__message--list li { padding: 2px 0 4px 3px; }
.ifsr-assistente__message--user { align-self: flex-end; background: var(--ifsr-navy); border-bottom-right-radius: 4px; color: #fff; }
.ifsr-assistente__message--loading { color: #607080; font-style: italic; }
.ifsr-assistente__message--loading::after { animation: ifsr-dots 1.2s steps(4, end) infinite; content: "…"; display: inline-block; overflow: hidden; vertical-align: bottom; width: 0; }

.ifsr-assistente__sources { align-self: flex-start; background: #fffaf0; border-left: 3px solid var(--ifsr-accent); border-radius: 4px 12px 12px 4px; color: #4b5360; font-size: 12px; max-width: 94%; padding: 9px 12px; }
.ifsr-assistente__sources strong { color: var(--ifsr-navy); }
.ifsr-assistente__sources ul { margin: 5px 0 0; padding-left: 17px; }
.ifsr-assistente__sources li + li { margin-top: 3px; }
.ifsr-assistente__sources a { color: var(--ifsr-navy-light); text-decoration: underline; }

.ifsr-assistente__suggestions { background: #fff; border-top: 1px solid var(--ifsr-border); display: flex; gap: 7px; overflow-x: auto; padding: 9px 12px; scrollbar-width: thin; }
.ifsr-assistente__suggestions button { background: #fffaf0; border: 1px solid var(--ifsr-accent); border-radius: 999px; color: var(--ifsr-navy); flex: 0 0 auto; font-size: 12px; max-width: 220px; padding: 7px 10px; }
.ifsr-assistente__suggestions button:hover { background: var(--ifsr-accent); color: #172536; }

.ifsr-assistente__form { align-items: flex-end; background: #fff; border-top: 1px solid var(--ifsr-border); display: flex; gap: 8px; padding: 11px 12px; }
.ifsr-assistente__form textarea { background: #fff; border: 1px solid #cbd5df; border-radius: 13px; color: #172536; flex: 1; line-height: 1.4; max-height: 110px; min-height: 44px; padding: 11px 12px; resize: none; }
.ifsr-assistente__form textarea::placeholder { color: #718096; }
.ifsr-assistente__form button { align-items: center; background: var(--ifsr-accent); border: 0; border-radius: 50%; color: var(--ifsr-navy); display: flex; flex: 0 0 44px; font-size: 20px; height: 44px; justify-content: center; padding: 0 0 2px 2px; }
.ifsr-assistente__form button:hover { filter: brightness(.94); }
.ifsr-assistente__form button:disabled { cursor: wait; opacity: .55; }
.ifsr-assistente__disclaimer { background: #fff; color: #6d7782; font-size: 10px; padding: 0 12px 10px; text-align: center; }

@keyframes ifsr-dots { to { width: 1.2em; } }

@media (max-width: 600px) {
  .ifsr-assistente--floating { bottom: 14px; }
  .ifsr-assistente--right { right: 14px; }
  .ifsr-assistente--left { left: 14px; }
  .ifsr-assistente--floating .ifsr-assistente__panel { bottom: 76px; height: calc(100vh - 110px); width: calc(100vw - 28px); }
  .ifsr-assistente__toggle { height: 60px; width: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .ifsr-assistente *, .ifsr-assistente *::before, .ifsr-assistente *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
