/* Audience preferences are independent from the portfolio's layout. */
.analytics-consent[hidden],
.analytics-preferences[hidden] { display: none; }

.analytics-consent {
  display: flex;
  flex-direction: column;
  position: fixed;
  z-index: 10000;
  right: 20px;
  bottom: max(20px, env(safe-area-inset-bottom));
  width: min(600px, calc(100vw - 40px));
  max-height: min(70vh, 620px);
  overflow: hidden;
  overscroll-behavior: contain;
  padding: 22px;
  border: 1px solid #465469;
  border-radius: 12px;
  background: #101b2b;
  color: #e7ecf3;
  box-shadow: 0 12px 44px rgba(0, 0, 0, .5);
  font: 400 14px/1.5 var(--font-site);
  text-align: left;
}

.analytics-consent h2 {
  flex-shrink: 0;
  margin: 0 0 8px;
  color: #f5f8fb;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.3;
}

.analytics-consent p { margin: 0 0 12px; }
.analytics-consent-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
.analytics-consent details { margin: 12px 0 16px; }
.analytics-consent summary { width: fit-content; cursor: pointer; color: #83edc5; }
.analytics-consent details[open] summary { margin-bottom: 12px; }
.analytics-consent a { color: #83edc5; text-decoration: underline; text-underline-offset: 3px; }
.analytics-consent-actions { flex-shrink: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 8px; }

.analytics-consent-actions button {
  min-width: 0;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #83edc5;
  border-radius: 6px;
  background: transparent;
  color: #eafbf4;
  font: 600 14px/1.3 var(--font-site);
  cursor: pointer;
}

.analytics-consent-actions button:hover { background: #18332f; }
.analytics-preferences {
  display: block;
  min-height: 44px;
  max-width: 100%;
  margin: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #b9c5d4;
  font: 400 12px/1.4 var(--font-site);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.analytics-consent :focus-visible,
.analytics-preferences:focus-visible { outline: 2px solid #83edc5; outline-offset: 4px; }

@media (max-width: 560px) {
  .analytics-consent {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    max-height: 75vh;
    padding: 18px;
    font-size: 13px;
  }
}
