/* AIvavo Stay chat - 1.1.4 */
.aivavo-stay-chat {
  --aivavo-accent: #6f927a;
  --aivavo-accent-soft: #b8cdbf;
  --aivavo-violet: #665f86;
  --aivavo-dark: #fcfaf6;
  --aivavo-dark-2: #f0ece5;
  --aivavo-muted: #454b48;
  --aivavo-white: #171c1a;
  --aivavo-border: #b8cdbf;
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 999999;
  font-family: "Geologica", sans-serif;
  color: var(--aivavo-white);
  -webkit-font-smoothing: antialiased;
}

.aivavo-stay-chat *, .aivavo-stay-chat *::before, .aivavo-stay-chat *::after { box-sizing: border-box; }
.aivavo-stay-chat.aivavo-stay-chat button, .aivavo-stay-chat.aivavo-stay-chat textarea, .aivavo-stay-chat.aivavo-stay-chat input { font: inherit; text-transform: none; letter-spacing: normal; }
.aivavo-stay-chat [hidden] { display: none !important; }

.aivavo-stay-chat.aivavo-stay-chat .aivavo-stay-chat__launcher,
.aivavo-stay-chat.aivavo-stay-chat .aivavo-stay-chat__launcher:visited,
.aivavo-stay-chat.aivavo-stay-chat .aivavo-stay-chat__launcher:focus,
.aivavo-stay-chat.aivavo-stay-chat .aivavo-stay-chat__launcher:active,
.aivavo-stay-chat.aivavo-stay-chat .aivavo-stay-chat__launcher[aria-expanded="false"] {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 14px;
  border: 1px solid #171c1a !important;
  border-radius: 12px;
  background: #171c1a !important;
  color: #ffffff !important;
  box-shadow: 0 18px 50px rgba(28, 38, 22, 0.2);
  cursor: pointer;
  font-weight: 650;
  transition: transform 160ms ease, border-color 160ms ease;
}

.aivavo-stay-chat.aivavo-stay-chat .aivavo-stay-chat__launcher:hover { border-color: var(--aivavo-accent) !important; background: var(--aivavo-accent) !important; color: #ffffff !important; transform: translateY(-2px); }
.aivavo-stay-chat .aivavo-stay-chat__launcher:hover .aivavo-stay-chat__launcher-icon { color: #ffffff; }
.aivavo-stay-chat .aivavo-stay-chat__launcher:active { transform: translateY(0); }
.aivavo-stay-chat__launcher-icon { color: var(--aivavo-accent-soft); display: grid; place-items: center; }

.aivavo-stay-chat__panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  width: min(420px, calc(100vw - 32px));
  height: min(690px, calc(100vh - 110px));
  min-height: 480px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto auto auto;
  overflow: hidden;
  border: 1px solid var(--aivavo-border);
  border-radius: 24px;
  background: var(--aivavo-dark);
  box-shadow: 0 26px 80px rgba(20, 26, 17, 0.28);
}

.aivavo-stay-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--aivavo-border);
}

.aivavo-stay-chat__brand { display: flex; align-items: center; min-width: 0; gap: 12px; }
.aivavo-stay-chat__header-actions { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.aivavo-stay-chat .aivavo-stay-chat__clear { min-height: 44px; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--aivavo-muted); cursor: pointer; font-size: 12px; font-weight: 600; }
.aivavo-stay-chat .aivavo-stay-chat__clear:hover { background: var(--aivavo-dark-2); color: var(--aivavo-white); }
.aivavo-stay-chat__avatar { width: 42px; height: 42px; border-radius: 0; object-fit: cover; }
.aivavo-stay-chat__avatar--mark { display: grid; place-items: center; background: var(--aivavo-accent); color: var(--aivavo-dark); font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; }
.aivavo-stay-chat .aivavo-stay-chat__brand h2 { margin: 0; color: var(--aivavo-white); font-family: "Plus Jakarta Sans", sans-serif; font-size: 17px; line-height: 1.15; font-weight: 700; }
.aivavo-stay-chat .aivavo-stay-chat__brand p { display: flex; align-items: center; gap: 7px; margin: 5px 0 0; color: var(--aivavo-muted); font-size: 12px; line-height: 1.3; }
.aivavo-stay-chat__brand p span { width: 7px; height: 7px; border-radius: 50%; background: var(--aivavo-accent); }
.aivavo-stay-chat .aivavo-stay-chat__close { width: 44px; height: 44px; flex: 0 0 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--aivavo-white); cursor: pointer; font-size: 30px; line-height: 1; }
.aivavo-stay-chat .aivavo-stay-chat__close:hover { background: var(--aivavo-dark-2); }

.aivavo-stay-chat__messages {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 18px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.aivavo-stay-chat__message { display: flex; gap: 9px; margin: 0 0 14px; }
.aivavo-stay-chat__message--user { justify-content: flex-end; }
.aivavo-stay-chat__bubble { max-width: 86%; padding: 12px 14px; border-radius: 14px; background: var(--aivavo-dark-2); color: var(--aivavo-white); font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.aivavo-stay-chat__message--assistant .aivavo-stay-chat__bubble { border: 1px solid var(--aivavo-border); border-bottom-left-radius: 5px; }
.aivavo-stay-chat__message--user .aivavo-stay-chat__bubble { background: var(--aivavo-accent); color: var(--aivavo-dark); border-bottom-right-radius: 5px; }

.aivavo-stay-chat__typing { display: inline-flex; gap: 4px; align-items: center; min-height: 12px; }
.aivavo-stay-chat__typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--aivavo-muted); animation: aivavo-pulse 1s infinite ease-in-out; }
.aivavo-stay-chat__typing i:nth-child(2) { animation-delay: 120ms; }
.aivavo-stay-chat__typing i:nth-child(3) { animation-delay: 240ms; }

.aivavo-stay-chat__suggestions, .aivavo-stay-chat__slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 18px 16px;
  max-height: 220px;
  overflow-y: auto;
  align-content: flex-start;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.aivavo-stay-chat .aivavo-stay-chat__chip, .aivavo-stay-chat .aivavo-stay-chat__slot {
  min-height: 44px;
  border: 1px solid var(--aivavo-accent);
  border-radius: 10px;
  background: transparent;
  color: var(--aivavo-white);
  padding: 9px 12px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.35;
}
.aivavo-stay-chat.aivavo-stay-chat .aivavo-stay-chat__chip:hover,
.aivavo-stay-chat.aivavo-stay-chat .aivavo-stay-chat__chip:focus-visible,
.aivavo-stay-chat.aivavo-stay-chat .aivavo-stay-chat__slot:hover,
.aivavo-stay-chat.aivavo-stay-chat .aivavo-stay-chat__slot:focus-visible {
  background: #f0ece5 !important;
  border-color: var(--aivavo-accent) !important;
  color: #527b68 !important;
}
.aivavo-stay-chat__slot { width: 100%; color: var(--aivavo-accent-soft); }

.aivavo-stay-chat__dynamic { padding: 0 18px 12px; max-height: 320px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.24) transparent; }
.aivavo-stay-chat__contact { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 0 14px; }
.aivavo-stay-chat__field { display: grid; gap: 5px; }
.aivavo-stay-chat__field--wide { grid-column: 1 / -1; }
.aivavo-stay-chat__field label { color: var(--aivavo-muted); font-size: 12px; }
.aivavo-stay-chat__field input, .aivavo-stay-chat__field textarea {
  width: 100%; min-height: 44px; padding: 10px 11px; border: 1px solid var(--aivavo-border); border-radius: 10px; background: #ffffff; color: var(--aivavo-white); outline: none;
}
.aivavo-stay-chat__field textarea { min-height: 70px; resize: vertical; }
.aivavo-stay-chat__field input::placeholder, .aivavo-stay-chat__field textarea::placeholder { color: #454b48; opacity: 1; }
.aivavo-stay-chat__consent { grid-column: 1 / -1; display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; color: var(--aivavo-muted); font-size: 12px; line-height: 1.45; }
.aivavo-stay-chat__consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--aivavo-accent); }
.aivavo-stay-chat.aivavo-stay-chat .aivavo-stay-chat__consent a,
.aivavo-stay-chat.aivavo-stay-chat .aivavo-stay-chat__consent a:visited {
  color: #527b68 !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}
.aivavo-stay-chat .aivavo-stay-chat__contact-submit { grid-column: 1 / -1; min-height: 46px; padding: 10px 16px; border: 0; border-radius: 11px; background: var(--aivavo-accent); color: var(--aivavo-dark); cursor: pointer; font-weight: 750; }
.aivavo-stay-chat .aivavo-stay-chat__contact-submit:hover { background: var(--aivavo-accent-soft); }

.aivavo-stay-chat__status { min-height: 0; padding: 0 18px; color: var(--aivavo-violet); font-size: 12px; line-height: 1.4; font-weight: 600; }
.aivavo-stay-chat__status:not(:empty) { padding-bottom: 8px; }

.aivavo-stay-chat__composer { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 8px; align-items: end; padding: 16px 14px 12px; border-top: 1px solid var(--aivavo-border); background: #ffffff; }
.aivavo-stay-chat__composer textarea { width: 100%; max-height: 112px; min-height: 46px; resize: none; overflow-y: hidden; padding: 12px 13px; border: 1px solid var(--aivavo-border); border-radius: 11px; background: #ffffff; color: var(--aivavo-white); outline: none; line-height: 1.45; scrollbar-width: thin; }
.aivavo-stay-chat__composer textarea::placeholder { color: #454b48; opacity: 1; }
.aivavo-stay-chat .aivavo-stay-chat__composer button { width: 46px; height: 46px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 11px; background: var(--aivavo-accent); color: var(--aivavo-dark); cursor: pointer; }
.aivavo-stay-chat__composer button:disabled, .aivavo-stay-chat__contact-submit:disabled { cursor: wait; opacity: 0.65; }
.aivavo-stay-chat__honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.aivavo-stay-chat__footer { padding: 0 16px 12px; background: #ffffff; color: var(--aivavo-muted); text-align: center; font-size: 10px; line-height: 1.4; }
.aivavo-stay-chat.aivavo-stay-chat .aivavo-stay-chat__footer a,
.aivavo-stay-chat.aivavo-stay-chat .aivavo-stay-chat__footer a:visited {
  color: #527b68 !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}

.aivavo-stay-chat button:focus-visible, .aivavo-stay-chat textarea:focus-visible, .aivavo-stay-chat input:focus-visible, .aivavo-stay-chat a:focus-visible, .aivavo-stay-chat__messages:focus-visible {
  outline: 3px solid var(--aivavo-accent);
  outline-offset: 2px;
}

@keyframes aivavo-pulse { 0%, 70%, 100% { opacity: .35; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-2px); } }

@media (max-width: 600px) {
  .aivavo-stay-chat { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .aivavo-stay-chat .aivavo-stay-chat__launcher { width: 52px; min-width: 52px; height: 52px; min-height: 52px; padding: 0; gap: 0; justify-content: center; }
  .aivavo-stay-chat__launcher-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .aivavo-stay-chat__panel { position: fixed; inset: 10px 10px max(10px, env(safe-area-inset-bottom)); width: auto; height: auto; min-height: 0; border-radius: 18px; }
  .aivavo-stay-chat__header { gap: 8px; padding: 14px 12px; }
  .aivavo-stay-chat__brand { gap: 9px; }
  .aivavo-stay-chat__avatar { width: 38px; height: 38px; }
  .aivavo-stay-chat .aivavo-stay-chat__brand h2 { font-size: 15px; }
  .aivavo-stay-chat .aivavo-stay-chat__clear { min-height: 44px; padding: 7px 8px; }
  .aivavo-stay-chat .aivavo-stay-chat__close { width: 44px; height: 44px; flex-basis: 44px; }
  .aivavo-stay-chat__suggestions, .aivavo-stay-chat__slots { max-height: 28vh; }
  .aivavo-stay-chat__contact { grid-template-columns: 1fr; }
  .aivavo-stay-chat__field--wide, .aivavo-stay-chat__consent, .aivavo-stay-chat__contact-submit { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .aivavo-stay-chat *, .aivavo-stay-chat *::before, .aivavo-stay-chat *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
