/*
 * Cookie consent card on public model pages. Mirrors the SPA banner
 * (frontend/src/features/privacy/cookie-consent.css): dark card, bottom right,
 * equal-weight choices. Same-origin stylesheet, no inline styles.
 */
.cookie-consent {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  width: min(390px, calc(100vw - 28px));
  max-height: calc(100dvh - 44px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  background: rgba(15, 17, 19, .96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .04);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  color: var(--text);
}
.cookie-consent[hidden], .cookie-consent [hidden] { display: none; }

.cookie-consent__head { display: flex; align-items: center; gap: 10px; }
.cookie-consent__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #1a1c1e;
  box-shadow: inset 0 0 11px rgba(255, 255, 255, .052), 0 1px 2px rgba(0, 0, 0, .14);
  color: rgba(255, 255, 255, .8);
}
.cookie-consent h2 { margin: 0; font-size: 17px; line-height: 1.2; letter-spacing: -.01em; text-wrap: initial; }
.cookie-consent p { margin: 13px 0 8px; font-size: 13px; line-height: 1.48; }
.cookie-consent .cookie-consent__more { margin: 0; font-size: 12px; line-height: 1.4; }
.cookie-consent__link {
  color: rgba(255, 255, 255, .72);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .26);
  text-underline-offset: 3px;
  transition: color .15s, text-decoration-color .15s;
}
.cookie-consent__link:hover { color: #fff; text-decoration-color: var(--accent); }
.cookie-consent .cookie-consent__error { margin: 10px 0 0; color: #ff8aa4; font-size: 12px; line-height: 1.4; }

.cookie-consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
.cookie-consent button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 6px 12px;
  border: 0;
  border-radius: 10px;
  background: #1a1c1e;
  box-shadow: inset 0 0 11px rgba(255, 255, 255, .052), 0 1px 2px rgba(0, 0, 0, .14);
  color: rgba(255, 255, 255, .84);
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.25;
  text-align: center;
  transition: background-color .15s, box-shadow .15s, color .15s;
}
.cookie-consent button:hover {
  background: #1d1f21;
  box-shadow: inset 0 0 11px rgba(255, 255, 255, .065), 0 1px 2px rgba(0, 0, 0, .14);
  color: #fff;
}
.cookie-consent button:disabled { opacity: .62; cursor: wait; }
.cookie-consent button:focus-visible, .cookie-consent__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Reserve scroll room so the card never hides the last content or footer links. */
body:has(.cookie-consent:not([hidden])) { padding-bottom: 250px; }

@media (max-width: 520px) {
  .cookie-consent {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    padding: 14px;
    border-radius: 16px;
  }
  .cookie-consent__icon { width: 28px; height: 28px; border-radius: 9px; }
  .cookie-consent__icon svg { width: 16px; height: 16px; }
  .cookie-consent h2 { font-size: 15px; }
  .cookie-consent p { margin: 9px 0 6px; font-size: 12.5px; line-height: 1.42; }
  .cookie-consent__actions { gap: 8px; margin-top: 11px; }
  .cookie-consent button { padding-inline: 8px; }
  body:has(.cookie-consent:not([hidden])) { padding-bottom: 216px; }
}
@media (max-width: 340px) {
  .cookie-consent__actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-consent button, .cookie-consent__link { transition: none; }
}
