/* Rede Rota — widget FAQ com logo */

.rota-faq {
  --faq-green: #21843d;
  --faq-green-bright: #61ce70;
  --faq-yellow: #f3c226;
  --faq-orange: #df6320;
  --faq-ink: #1b252f;
  --faq-muted: #5c656c;
  --faq-cream: #fbf8f0;
  --faq-line: #e2ddd0;
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 60;
  font-family: "Manrope", sans-serif;
  color: var(--faq-ink);
}

.rota-faq[hidden] {
  display: none !important;
}

.rota-faq-dock {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.rota-faq-teaser {
  max-width: min(220px, calc(100vw - 100px));
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--faq-line);
  border-radius: 14px 14px 4px 14px;
  background: #fff;
  color: var(--faq-ink);
  font: 700 13px/1.35 "Manrope", sans-serif;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(27, 37, 47, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  animation: rota-faq-teaser-in 0.45s ease;
}

.rota-faq-teaser:hover,
.rota-faq-teaser:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(27, 37, 47, 0.18);
  outline: none;
}

.rota-faq.is-open .rota-faq-teaser {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(8px);
}

@keyframes rota-faq-teaser-in {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.rota-faq-launcher {
  position: relative;
  z-index: 1;
  width: 68px;
  height: 68px;
  padding: 6px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: #fff;
  box-shadow:
    0 10px 28px rgba(33, 132, 61, 0.28),
    0 0 0 3px rgba(33, 132, 61, 0.18);
  display: grid;
  place-items: center;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  flex-shrink: 0;
}

.rota-faq-launcher:hover,
.rota-faq-launcher:focus-visible {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 14px 32px rgba(33, 132, 61, 0.36),
    0 0 0 3px rgba(243, 194, 38, 0.55);
  outline: none;
}

.rota-faq-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.rota-faq-pulse {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(33, 132, 61, 0.45);
  animation: rota-faq-pulse 2.4s ease-out infinite;
}

.rota-faq.is-open .rota-faq-pulse {
  display: none;
}

@keyframes rota-faq-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(33, 132, 61, 0.4);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(33, 132, 61, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(33, 132, 61, 0);
  }
}

.rota-faq-panel {
  position: absolute;
  right: 0;
  bottom: 84px;
  width: min(360px, calc(100vw - 28px));
  max-height: min(520px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--faq-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 50px rgba(27, 37, 47, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.96);
  transform-origin: bottom right;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s;
  pointer-events: none;
}

.rota-faq.is-open .rota-faq-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.rota-faq-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  background:
    linear-gradient(135deg, #176832 0%, var(--faq-green) 45%, #2a9a4a 100%);
  color: #fff;
}

.rota-faq-head-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  padding: 4px;
  box-shadow: inset 0 0 0 2px rgba(243, 194, 38, 0.55);
}

.rota-faq-logo--head {
  width: 100%;
  height: 100%;
}

.rota-faq-head-copy {
  flex: 1;
  min-width: 0;
}

.rota-faq-head-copy strong {
  display: block;
  font-family: "Chakra Petch", sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.15;
}

.rota-faq-head-copy span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.88;
}

.rota-faq-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.rota-faq-close:hover,
.rota-faq-close:focus-visible {
  background: rgba(255, 255, 255, 0.26);
  outline: none;
}

.rota-faq-body {
  flex: 1;
  overflow: auto;
  padding: 16px;
  background:
    radial-gradient(ellipse at top right, rgba(97, 206, 112, 0.12), transparent 50%),
    var(--faq-cream);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rota-faq-msg {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  animation: rota-faq-in 0.28s ease;
}

@keyframes rota-faq-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rota-faq-msg--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--faq-line);
  border-bottom-left-radius: 4px;
  color: var(--faq-ink);
}

.rota-faq-msg--user {
  align-self: flex-end;
  background: var(--faq-green);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.rota-faq-questions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.rota-faq-q {
  text-align: left;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid rgba(33, 132, 61, 0.28);
  background: #fff;
  color: var(--faq-green);
  font: 600 13px/1.35 "Manrope", sans-serif;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rota-faq-q:hover,
.rota-faq-q:focus-visible {
  background: rgba(33, 132, 61, 0.08);
  border-color: var(--faq-green);
  outline: none;
}

.rota-faq-foot {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--faq-line);
  background: #fff;
}

.rota-faq-foot a,
.rota-faq-foot button {
  flex: 1;
  text-align: center;
  text-decoration: none;
  border: 0;
  border-radius: 10px;
  padding: 10px 8px;
  font: 700 12.5px/1 "Manrope", sans-serif;
  cursor: pointer;
}

.rota-faq-reset {
  background: var(--faq-cream);
  color: var(--faq-ink);
}

.rota-faq-reset:hover,
.rota-faq-reset:focus-visible {
  background: #efe9da;
  outline: none;
}

.rota-faq-contact {
  background: var(--faq-orange);
  color: #fff;
}

.rota-faq-contact:hover,
.rota-faq-contact:focus-visible {
  filter: brightness(1.05);
  outline: none;
}

@media (max-width: 720px) {
  .rota-faq {
    bottom: calc(72px + max(10px, env(safe-area-inset-bottom)));
    right: max(10px, env(safe-area-inset-right));
  }

  .rota-faq-dock {
    gap: 6px;
  }

  .rota-faq-teaser {
    max-width: 118px;
    padding: 7px 10px;
    border-radius: 12px 12px 4px 12px;
    font-size: 11px;
    line-height: 1.25;
    animation: rota-faq-teaser-mobile 7s ease forwards;
  }

  .rota-faq-launcher,
  .rota-faq-pulse {
    width: 50px;
    height: 50px;
  }

  .rota-faq-launcher {
    padding: 5px;
    box-shadow:
      0 8px 20px rgba(33, 132, 61, 0.26),
      0 0 0 2px rgba(33, 132, 61, 0.18);
  }

  .rota-faq-panel {
    bottom: 62px;
    width: calc(100vw - 20px);
    max-height: min(480px, calc(100vh - 170px));
  }
}

@keyframes rota-faq-teaser-mobile {
  0% {
    opacity: 0;
    visibility: visible;
    transform: translateX(10px);
  }
  8%,
  85% {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    pointer-events: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rota-faq-pulse,
  .rota-faq-msg,
  .rota-faq-launcher,
  .rota-faq-panel,
  .rota-faq-teaser {
    animation: none !important;
    transition: none !important;
  }
}
