/* Componentes reutilizáveis: aviso de segurança, botões de link, badge e modal. */

/* ===== Aviso de segurança ===== */

.security-warning {
  width: 100%;
  max-width: 350px;
  margin: 0 auto 24px;
  padding: 11px 14px;
  border-radius: 16px;
  background: var(--alerta);
  border: 1px solid rgba(0, 172, 209, 0.22);
  color: var(--branco);
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 10px 26px rgba(0, 172, 209, 0.08);
}

.security-warning strong {
  color: var(--branco);
  font-weight: 800;
}

/* ===== Botões de link ===== */

.links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link-button {
  position: relative;
  min-height: 58px;
  padding: 0 18px;
  border-radius: var(--raio-pill);
  background: linear-gradient(135deg, var(--azul-marinho), var(--azul-claro));
  color: var(--branco);
  text-decoration: none;
  font-family: var(--fonte-titulo);
  font-weight: 700;
  font-size: 16px;
  display: grid;
  grid-template-columns: 36px 1fr 30px;
  align-items: center;
  border: 0;
  box-shadow: 0 10px 0 var(--sombra-botao);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    background 0.35s ease,
    filter 0.35s ease;
  overflow: hidden;
}

.link-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.45) 45%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}

.link-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 50%, rgba(255, 255, 255, 0.22), transparent 25%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.link-button:hover::before,
.link-button:focus::before {
  transform: translateX(120%);
}

.link-button:hover::after,
.link-button:focus::after {
  opacity: 1;
}

.link-button:hover,
.link-button:focus {
  transform: translateY(6px) scale(1.025);
  box-shadow:
    0 4px 0 var(--sombra-botao),
    0 18px 36px rgba(0, 172, 209, 0.24);
  background: linear-gradient(135deg, #263a85, var(--azul-claro-hover));
  filter: saturate(1.08);
}

.link-button:active {
  transform: translateY(10px) scale(0.98);
  box-shadow: 0 0 0 var(--sombra-botao);
}

.link-button.clicked {
  animation: clickPulse 0.45s ease;
}

/* Variante destacada: inversão de hierarquia — fundo branco, borda ciano, texto marinho */
.link-button--featured {
  background: var(--branco);
  color: var(--azul-marinho);
  border: 2px solid var(--azul-claro);
  box-shadow: 0 10px 0 rgba(0, 172, 209, 0.35);
}

.link-button--featured .icon {
  background: rgba(0, 172, 209, 0.15);
  color: var(--azul-claro);
}

.link-button--featured:hover,
.link-button--featured:focus {
  background: rgba(0, 172, 209, 0.06);
  color: var(--azul-marinho);
  box-shadow:
    0 4px 0 rgba(0, 172, 209, 0.35),
    0 18px 36px rgba(0, 172, 209, 0.26);
  filter: none;
}

.link-button--featured:active {
  box-shadow: 0 0 0 rgba(0, 172, 209, 0.35);
}

/* Container com um único botão (ex.: tela do balcão) — vira um CTA de destaque, não um botão perdido */
.links--single {
  margin-top: 6px;
}

.links--single .link-button {
  min-height: 86px;
  padding: 0 26px;
  grid-template-columns: 52px 1fr 30px;
  font-size: 19px;
  border-radius: 24px;
}

.links--single .icon {
  width: 44px;
  height: 44px;
  font-size: 18px;
}

.links--single .arrow {
  font-size: 24px;
}

.icon {
  position: relative;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  color: var(--branco);
  font-size: 13px;
}

.link-button span:nth-child(2) {
  position: relative;
  z-index: 2;
}

.arrow {
  position: relative;
  z-index: 2;
  font-size: 20px;
  transition: transform 0.35s ease;
}

.link-button:hover .arrow {
  transform: translateX(5px);
}

/* Badge NOVO — absoluto dentro do botão (overflow:hidden do .link-button exige que fique nos limites) */
.badge-novo {
  position: absolute;
  top: 5px;
  right: 10px;
  padding: 2px 7px;
  border-radius: var(--raio-pill);
  background: var(--azul-claro);
  color: var(--branco);
  font-family: var(--fonte-titulo);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.6;
  z-index: 3;
  pointer-events: none;
}

/* ===== Modal de alerta de segurança ===== */

.alert-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.alert-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.alert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 33, 61, 0.38);
  backdrop-filter: blur(10px);
}

.alert-box {
  position: relative;
  width: min(100%, 390px);
  padding: 36px 26px 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 30px 90px rgba(39, 51, 109, 0.34);
  text-align: center;
  transform: translateY(18px) scale(0.96);
  transition: transform 0.28s ease;
}

.alert-modal.active .alert-box {
  transform: translateY(0) scale(1);
}

.alert-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(39, 51, 109, 0.08);
  color: var(--azul-marinho);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.alert-close:hover {
  background: var(--azul-marinho);
  color: var(--branco);
  transform: rotate(90deg) scale(1.05);
}

.alert-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--azul-marinho), var(--azul-claro));
  color: var(--branco);
  font-family: var(--fonte-titulo);
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 26px rgba(0, 172, 209, 0.22);
}

.alert-box h2 {
  font-family: var(--fonte-titulo);
  color: var(--azul-marinho);
  font-size: 25px;
  line-height: 1.1;
  margin-bottom: 10px;
}

.alert-box p {
  color: rgba(20, 33, 61, 0.72);
  font-size: 14.5px;
  line-height: 1.55;
  margin-bottom: 22px;
}

.alert-ok {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: var(--raio-pill);
  background: linear-gradient(135deg, var(--azul-marinho), var(--azul-claro));
  color: var(--branco);
  font-family: var(--fonte-titulo);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 0 var(--sombra-botao);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

.alert-ok:hover {
  transform: translateY(4px);
  box-shadow: 0 4px 0 var(--sombra-botao);
  filter: saturate(1.08);
}

.alert-ok:active {
  transform: translateY(8px);
  box-shadow: 0 0 0 var(--sombra-botao);
}

@keyframes clickPulse {
  0% {
    transform: scale(1);
  }

  45% {
    transform: scale(0.96);
  }

  100% {
    transform: scale(1.03);
  }
}

@media (max-width: 420px) {
  .link-button {
    font-size: 15px;
    min-height: 56px;
  }

  .links--single .link-button {
    min-height: 70px;
    font-size: 17px;
    grid-template-columns: 44px 1fr 26px;
  }

  .links--single .icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .security-warning {
    font-size: 12px;
    margin-bottom: 22px;
  }

  .alert-box {
    border-radius: 24px;
    padding: 36px 22px 24px;
  }

  .alert-box h2 {
    font-size: 23px;
  }

  .alert-close {
    width: 32px;
    height: 32px;
    font-size: 23px;
  }
}
