/* ============================================================
   NuvaMed — consent banner (landing pública solamente).
   Colores tomados de la paleta del sitio (styles.css :root y
   blog: navy + primary + secondary). Se declaran aquí porque no
   todas las páginas cargan el mismo set de variables CSS.
   ============================================================ */

.nv-consent-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  max-width: min(720px, calc(100vw - 32px));
  padding: 16px 20px;
  background: #ffffff;
  color: #0f1724; /* neutral-900 */
  border: 1px solid #d4dce3; /* neutral-200 */
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(5, 45, 63, 0.18); /* primary-900 @ 18% */
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.nv-consent-text {
  flex: 1 1 320px;
  margin: 0;
}

.nv-consent-text a {
  color: #0a4e6b; /* primary-700 */
  text-decoration: underline;
  white-space: nowrap;
}

.nv-consent-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.nv-consent-btn {
  appearance: none;
  border-radius: 8px;
  padding: 9px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.nv-consent-btn-accept {
  background: #0a4e6b; /* primary-700 */
  color: #ffffff;
}

.nv-consent-btn-accept:hover {
  background: #073d54; /* primary-800 */
}

.nv-consent-btn-reject {
  background: transparent;
  color: #2d3e52; /* neutral-700 */
  border-color: #b4c0cb; /* neutral-300 */
}

.nv-consent-btn-reject:hover {
  background: #eaf0f4; /* neutral-100 */
}

.nv-consent-btn:focus-visible,
.nv-consent-settings:focus-visible {
  outline: 2px solid #17b89b; /* secondary-500 */
  outline-offset: 2px;
}

/* Reapertura persistente: enlace discreto inyectado en el footer. */
.nv-consent-settings {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin-top: 8px;
  font: inherit;
  font-size: 13px;
  color: inherit;
  opacity: 0.75;
  text-decoration: underline;
  cursor: pointer;
}

.nv-consent-settings:hover {
  opacity: 1;
}

.nv-consent-settings-fallback {
  text-align: center;
  padding: 16px 0 24px;
}

@media (max-width: 560px) {
  .nv-consent-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .nv-consent-actions {
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .nv-consent-banner {
    animation: nv-consent-in 240ms ease-out;
  }

  @keyframes nv-consent-in {
    from {
      opacity: 0;
      transform: translateX(-50%) translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
  }
}
