/* Paleta do Guia de Comunicação do Plano de Saúde Hospitalar (valores exatos, tema claro) */
:root {
  --azul: #004f9f;
  --marinho: #203b7b;
  --cinza: #4a5b72;
  --branco: #ffffff;
  --celeste: #59c3f1;
  --azul-claro: #c4e4f9;
  --coral: #ef787c;

  /* Gotham é a fonte da marca; Helvetica Neue / Arial entram quando ela não está instalada */
  --fonte: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--branco);
  color: var(--cinza);
  font-family: var(--fonte);
  -webkit-text-size-adjust: 100%;
}

/* ---------- chat ---------- */
#blip-chat-target {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  background: var(--branco);
}

#blip-chat-target iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- tela de espera / erro ---------- */
.estado {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background: var(--branco);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.estado[data-visivel="false"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.estado__conteudo {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  max-width: 30rem;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
}

.estado h1 {
  margin: 0;
  color: var(--marinho);
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
}

.estado p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.5;
}

/* barra de progresso: único movimento da página, só enquanto carrega */
.barra {
  height: 6px;
  background: var(--azul-claro);
  overflow: hidden;
}

.barra::after {
  content: "";
  display: block;
  width: 35%;
  height: 100%;
  background: var(--celeste);
  animation: correr 1.4s ease-in-out infinite;
}

.estado[data-modo="erro"] .barra::after {
  animation: none;
  width: 100%;
  background: var(--coral);
}

@keyframes correr {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(300%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .barra::after {
    animation: none;
    width: 100%;
    opacity: 0.6;
  }
  .estado {
    transition: none;
  }
}

/* ---------- botão (alvo de toque grande, leitura fácil) ---------- */
.botao {
  align-self: flex-start;
  min-height: 56px;
  margin-top: 8px;
  padding: 0 28px;
  border: 0;
  border-radius: 12px;
  background: var(--azul);
  color: var(--branco);
  font: 700 1.125rem/1 var(--fonte);
  cursor: pointer;
}

.botao:hover {
  background: var(--marinho);
}

.botao:focus-visible {
  outline: 3px solid var(--celeste);
  outline-offset: 3px;
}

.botao[hidden] {
  display: none;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 20;
  margin: 0;
  padding: 24px;
  background: var(--branco);
  color: var(--marinho);
  font-size: 1.125rem;
}
