/* The public site's cookie banner (<x-publica.aviso-cookies>), loaded by the component on every page that shows it. */

.aviso-cookies {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99999;
  width: min(380px, calc(100vw - 32px));
  padding: 20px 20px 18px;
  border-top: 4px solid #1668cc;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(13, 60, 118, 0.22);
  color: #1f2937;
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  animation: aviso-cookies-entrada 350ms ease-out both;
}

.aviso-cookies.is-cerrando {
  animation: aviso-cookies-salida 250ms ease-in both;
}

.aviso-cookies__cabecera {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.aviso-cookies__icono {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8f1fc;
  color: #1668cc;
}

.aviso-cookies__titulo {
  margin: 0;
  color: #226108;
  font-family: "Raleway", system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
}

.aviso-cookies__texto {
  margin: 0 0 16px;
}

.aviso-cookies__texto a {
  color: #1668cc;
  font-weight: 500;
  text-decoration: underline;
}

.aviso-cookies__acciones {
  display: flex;
  gap: 10px;
}

/* Both answers carry the same size and weight: rejecting is as easy as accepting. */
.aviso-cookies__boton {
  flex: 1 1 0;
  min-height: 42px;
  padding: 0 16px;
  border: 2px solid #1668cc;
  border-radius: 50px;
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
}

.aviso-cookies__boton--primario {
  background: #1668cc;
  color: #ffffff;
}

.aviso-cookies__boton--primario:hover {
  border-color: #0d3c76;
  background: #0d3c76;
}

.aviso-cookies__boton--secundario {
  background: #ffffff;
  color: #1668cc;
}

.aviso-cookies__boton--secundario:hover {
  background: #e8f1fc;
}

.aviso-cookies__boton:focus-visible,
.aviso-cookies__texto a:focus-visible {
  outline: 2px solid #1668cc;
  outline-offset: 3px;
}

@keyframes aviso-cookies-entrada {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes aviso-cookies-salida {
  to {
    opacity: 0;
    transform: translateY(16px);
  }
}

@media (max-width: 575.98px) {
  .aviso-cookies {
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aviso-cookies,
  .aviso-cookies.is-cerrando {
    animation: none;
  }

  .aviso-cookies__boton {
    transition: none;
  }
}
