/**
 * Botão flutuante WhatsApp — site público CS Repair.
 * Isolado: não altera outros botões nem o tema global.
 * Stack: .cs-public-floating-actions (WhatsApp + Consultar Assistência).
 */

.cs-public-floating-actions {
  position: fixed;
  left: max(14px, calc(10px + env(safe-area-inset-left, 0px)));
  top: 50%;
  transform: translateY(-50%);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  box-sizing: border-box;
  max-width: calc(100vw - 28px);
  pointer-events: none;
}

.cs-public-floating-actions > * {
  pointer-events: auto;
}

.cs-wa-float {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  max-width: 100%;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(18, 90, 48, 0.28);
  -webkit-tap-highlight-color: transparent;
}

.cs-wa-float:hover,
.cs-wa-float:focus-visible {
  background: #1ebe5d;
  color: #fff;
}

.cs-wa-float:focus-visible {
  outline: 3px solid #0b57d0;
  outline-offset: 3px;
}

.cs-wa-float__icon {
  display: block;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
}

.cs-wa-float__label {
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .cs-wa-float {
    transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
  }

  .cs-wa-float:hover {
    transform: scale(1.04);
    box-shadow: 0 10px 26px rgba(18, 90, 48, 0.34);
  }
}

@media (max-width: 720px) {
  .cs-public-floating-actions {
    left: max(10px, calc(8px + env(safe-area-inset-left, 0px)));
  }

  .cs-wa-float {
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .cs-wa-float__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .cs-wa-float__icon {
    width: 24px;
    height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-wa-float,
  .cs-wa-float:hover {
    transition: none;
    transform: none;
  }
}

@media print {
  .cs-public-floating-actions,
  .cs-wa-float {
    display: none !important;
  }
}
