.ttb-bar {
  display: flex;
  align-items: center;
  background: var(--ttb-bg, #0d4f87);
  color: var(--ttb-color, #ffffff);
  font-family: var(--ttb-font, 'Plus Jakarta Sans', Arial), sans-serif;
  font-size: var(--ttb-size, 14px);
  line-height: 1.5;
  padding: 8px 16px;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  position: relative;
  z-index: 99;
}

.ttb-window {
  overflow: hidden;
  width: 100%;
  display: flex;
}

.ttb-track {
  display: flex;
  width: max-content;
}

.ttb-group {
  display: flex;
  align-items: center;
  gap: 0px;
  min-width: 100vw;
  justify-content: center;
  flex-shrink: 0;
}

.ttb-group span {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.ttb-divider {
  display: inline-block;
  margin: 0 24px;
  opacity: 0.65;
  font-size: 0.8em;
  color: currentColor;
}

.ttb-animated .ttb-track {
  animation: ttb-scroll var(--ttb-speed, 25s) linear infinite;
}

/* Pausa suave automática ao passar o mouse ou focar com o teclado */
.ttb-bar:hover .ttb-track,
.ttb-bar:focus-within .ttb-track,
.ttb-bar.ttb-paused .ttb-track {
  animation-play-state: paused;
}

.ttb-bar:not(.ttb-animated) .ttb-track {
  width: 100%;
}

.ttb-bar:not(.ttb-animated) .ttb-group {
  flex-wrap: wrap;
  gap: 8px 32px;
  justify-content: center;
  padding: 0;
  width: 100%;
}

.ttb-bar:not(.ttb-animated) .ttb-group span {
  white-space: normal;
}

/* Botão Flutuante */
.ttb-floating {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 650;
  background: var(--ttb-button-bg, #128c46);
  color: var(--ttb-button-color, #ffffff) !important;
  border-radius: 40px;
  padding: 14px 22px;
  font: 600 16px/1.5 Arial, sans-serif;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: calc(100vw - 48px);
  box-sizing: border-box;
  overflow-wrap: anywhere;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ttb-floating:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.ttb-floating:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}

@keyframes ttb-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ttb-animated .ttb-track {
    animation: none;
    width: 100%;
  }
  .ttb-group {
    white-space: normal;
    flex-wrap: wrap;
    padding: 0;
    gap: 12px;
  }
  .ttb-group span {
    white-space: normal;
  }
  .ttb-group[aria-hidden] {
    display: none;
  }
}
