/* Rev1 Energy — GA4 consent banner
 * Rounded pill, bottom-center on mobile, bottom-right on desktop.
 * Matches the floating-pill nav language established in base.css.
 */

.r1-consent {
  position: fixed;
  left: 50%;
  bottom: var(--space-4, 16px);
  transform: translate(-50%, 24px);
  z-index: 9999;
  max-width: min(560px, calc(100vw - 32px));
  width: 100%;
  padding: 14px 18px;
  border-radius: 24px;
  background: rgba(10, 22, 46, 0.96);
  color: #f5f7fb;
  box-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.55),
              0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease, transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: var(--font-body, 'Inter', system-ui, -apple-system, sans-serif);
  font-size: 13.5px;
  line-height: 1.45;
}

.r1-consent.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.r1-consent__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.r1-consent__text {
  margin: 0;
  color: rgba(245, 247, 251, 0.88);
  flex: 1 1 260px;
}

.r1-consent__link {
  color: #dff140;
  text-decoration: none;
  border-bottom: 1px solid rgba(223, 241, 64, 0.4);
  padding-bottom: 1px;
  transition: border-color 160ms ease;
}
.r1-consent__link:hover { border-color: #dff140; }

.r1-consent__actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.r1-consent__btn {
  appearance: none;
  border: 0;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.r1-consent__btn--decline {
  background: transparent;
  color: rgba(245, 247, 251, 0.72);
  box-shadow: inset 0 0 0 1px rgba(245, 247, 251, 0.24);
}
.r1-consent__btn--decline:hover {
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(245, 247, 251, 0.55);
}

.r1-consent__btn--accept {
  background: #ce1126;
  color: #fff;
  box-shadow: 0 2px 8px rgba(206, 17, 38, 0.35);
}
.r1-consent__btn--accept:hover {
  background: #b30e20;
  transform: translateY(-1px);
}

@media (max-width: 520px) {
  .r1-consent {
    left: 12px;
    right: 12px;
    bottom: 12px;
    transform: translateY(24px);
    max-width: none;
    width: auto;
    padding: 12px 14px;
  }
  .r1-consent.is-visible { transform: translateY(0); }
  .r1-consent__inner { gap: 10px; }
  .r1-consent__text { flex: 1 1 100%; }
  .r1-consent__actions { width: 100%; }
  .r1-consent__btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .r1-consent { transition: opacity 200ms linear; }
  .r1-consent,
  .r1-consent.is-visible { transform: translate(-50%, 0); }
  @media (max-width: 520px) {
    .r1-consent,
    .r1-consent.is-visible { transform: none; }
  }
}
