/* RolanNutriPro: consentimiento de analítica privada y enlaces de privacidad. */
.analytics-privacy-link {
  appearance: none;
  margin-top: 0.8rem;
  padding: 0.48rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.analytics-privacy-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.analytics-privacy-link:focus-visible,
.analytics-consent button:focus-visible,
.analytics-consent a:focus-visible {
  outline: 3px solid #f4a924;
  outline-offset: 3px;
}

.analytics-consent[hidden] { display: none !important; }

.analytics-consent {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  align-items: end;
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.analytics-consent__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(3px);
}

.analytics-consent__panel {
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 1rem;
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 1.5rem);
  overflow: hidden;
  border: 1px solid rgba(47, 113, 60, 0.32);
  border-radius: 22px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.34);
}

.analytics-consent__panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #2f713c, #7dae3f 65%, #f4a924);
}

.analytics-consent__brand {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #dff1cd, #acd481);
  box-shadow: inset 0 0 0 1px rgba(47, 113, 60, 0.15);
  font-size: 2rem;
}

.analytics-consent__content { min-width: 0; }

.analytics-consent__eyebrow {
  display: block;
  margin-bottom: 0.22rem;
  color: #2f713c;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.analytics-consent h2 {
  margin: 0 2rem 0.55rem 0;
  color: #18351f;
  font-family: Outfit, Inter, sans-serif;
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  line-height: 1.2;
}

.analytics-consent p {
  margin: 0.38rem 0;
  color: #475569;
  font-size: 0.84rem;
  line-height: 1.55;
}

.analytics-consent a {
  color: #2f713c;
  font-weight: 750;
}

.analytics-consent__gpc {
  margin-top: 0.65rem !important;
  padding: 0.62rem 0.75rem;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  background: #f0f9ff;
  color: #075985 !important;
  font-weight: 650;
}

.analytics-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.analytics-consent__actions button {
  min-height: 44px;
  padding: 0.68rem 1rem;
  border-radius: 10px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.analytics-consent__accept {
  border: 1px solid #2f713c;
  background: linear-gradient(135deg, #4c8a34, #2f713c);
  color: #fff;
}

.analytics-consent__necessary {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
}

.analytics-consent__accept:hover:not(:disabled),
.analytics-consent__necessary:hover { filter: brightness(1.06); }

.analytics-consent__accept:disabled {
  border-color: #cbd5e1;
  background: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}

.analytics-consent__fineprint {
  margin-top: 0.72rem !important;
  color: #64748b !important;
  font-size: 0.72rem !important;
}

.analytics-consent__close {
  position: absolute;
  z-index: 1;
  top: 0.72rem;
  right: 0.82rem;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #fff;
  color: #475569;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.analytics-consent__close[hidden] { display: none !important; }

body.analytics-consent-open { overflow: hidden; }

@media (min-width: 760px) {
  .analytics-consent { align-items: end; padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
}

@media (max-width: 580px) {
  .analytics-consent { align-items: end; padding: 0; }
  .analytics-consent__panel {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 0.75rem;
    max-height: min(92dvh, 760px);
    padding: 1rem max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    overflow-y: auto;
    border-radius: 20px 20px 0 0;
  }
  .analytics-consent__brand { width: 44px; height: 44px; border-radius: 12px; font-size: 1.45rem; }
  .analytics-consent h2 { margin-right: 1.9rem; }
  .analytics-consent p { font-size: 0.79rem; }
  .analytics-consent__actions { display: grid; grid-template-columns: 1fr; }
  .analytics-consent__actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .analytics-privacy-link { transition: none; }
}

@media print {
  .analytics-consent,
  .analytics-privacy-link { display: none !important; }
}
