/* Preiva AI assistant */
.gfp-preiva {
  position: fixed;
  right: clamp(14px, 3vw, 24px);
  bottom: clamp(14px, 3vw, 24px);
  z-index: 99990;
  font-family: var(--gfp-font, 'Plus Jakarta Sans', system-ui, sans-serif);
}
.gfp-preiva__launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  padding: 14px 20px 14px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 45%, #6366f1 100%);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  box-shadow: 0 14px 36px -10px rgba(124, 58, 237, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gfp-preiva__launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px -10px rgba(124, 58, 237, 0.75);
}
.gfp-preiva.is-open .gfp-preiva__launcher {
  transform: scale(0.94);
  opacity: 0.92;
}
.gfp-preiva__launcherIco svg {
  width: 22px;
  height: 22px;
}
.gfp-preiva__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(380px, calc(100vw - 28px));
  max-height: min(560px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: var(--gfp-surface, #fff);
  color: var(--gfp-text, #0f172a);
  border: 1px solid var(--gfp-border, rgba(15, 23, 42, 0.1));
  box-shadow: 0 28px 60px -24px rgba(15, 23, 42, 0.35);
}
.gfp-preiva__panel[hidden] {
  display: none !important;
}
.gfp-preiva__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #fff;
}
.gfp-preiva__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gfp-preiva__avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.gfp-preiva__name {
  display: block;
  font-size: 16px;
  line-height: 1.1;
}
.gfp-preiva__tag {
  display: block;
  font-size: 11px;
  opacity: 0.85;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gfp-preiva__close {
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.gfp-preiva__close svg {
  width: 18px;
  height: 18px;
}
.gfp-preiva__messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--gfp-bg, #f8fafc);
}
.gfp-preiva__msg {
  display: flex;
}
.gfp-preiva__msg--user {
  justify-content: flex-end;
}
.gfp-preiva__bubble {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}
.gfp-preiva__msg--user .gfp-preiva__bubble {
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.gfp-preiva__msg--assistant .gfp-preiva__bubble {
  background: var(--gfp-surface, #fff);
  border: 1px solid var(--gfp-border, rgba(15, 23, 42, 0.08));
  border-bottom-left-radius: 4px;
}
.gfp-preiva__msg--assistant .gfp-preiva__bubble p {
  margin: 0 0 0.55em;
}
.gfp-preiva__msg--assistant .gfp-preiva__bubble p:last-child {
  margin-bottom: 0;
}
.gfp-preiva__msg.is-typing .gfp-preiva__bubble {
  display: inline-flex;
  gap: 5px;
  padding: 12px 14px;
}
.gfp-preiva__msg.is-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  animation: gfp-preiva-dot 1.1s infinite ease-in-out;
}
.gfp-preiva__msg.is-typing span:nth-child(2) { animation-delay: 0.15s; }
.gfp-preiva__msg.is-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes gfp-preiva-dot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-4px); opacity: 1; }
}
.gfp-preiva__form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px 8px;
  border-top: 1px solid var(--gfp-border, rgba(15, 23, 42, 0.08));
  background: var(--gfp-surface, #fff);
}
.gfp-preiva__input {
  flex: 1;
  resize: none;
  border: 1.5px solid var(--gfp-border, rgba(15, 23, 42, 0.12));
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  min-height: 42px;
  max-height: 120px;
  background: var(--gfp-bg, #f8fafc);
  color: inherit;
}
.gfp-preiva__input:focus {
  outline: none;
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.18);
}
.gfp-preiva__send {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #fff;
}
.gfp-preiva__send svg {
  width: 18px;
  height: 18px;
}
.gfp-preiva__fine {
  margin: 0;
  padding: 0 14px 10px;
  font-size: 10.5px;
  color: var(--gfp-muted, #64748b);
  background: var(--gfp-surface, #fff);
}
.gfp-preiva__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
html[data-gfp-theme="dark"] .gfp-preiva__panel,
html[data-gfp-theme="dark"] .gfp-preiva__messages,
html[data-gfp-theme="dark"] .gfp-preiva__form,
html[data-gfp-theme="dark"] .gfp-preiva__fine {
  --gfp-surface: #1e293b;
  --gfp-bg: #0f172a;
  --gfp-text: #f1f5f9;
  --gfp-border: rgba(148, 163, 184, 0.2);
  --gfp-muted: #94a3b8;
}
@media (max-width: 480px) {
  .gfp-preiva__panel {
    width: calc(100vw - 20px);
    right: -4px;
    max-height: calc(100vh - 100px);
  }
  .gfp-preiva__launcherTxt {
    display: none;
  }
  .gfp-preiva__launcher {
    width: 54px;
    height: 54px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
}