/* Cookie choices share the account and till tokens. Keep the notice in flow so
   sign-in, policy text, and checkout controls remain reachable above it. */
.cookie-shell:has(#cookie-notice) {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.cookie-shell:has(#cookie-notice) > .adm-nav { flex: none; }
.cookie-shell:has(#cookie-notice) > .policy-footer { display: none; }
.cookie-shell:has(#cookie-notice) > main,
.cookie-shell:has(#cookie-notice) > .console-frame {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

.cookie-shell-jawa-menu:has(#cookie-notice) > .jawa-menu {
  flex: 1;
  min-height: 0;
  height: auto;
}

.cookie-notice {
  flex: none;
  max-height: 55dvh;
  padding: var(--space-4) var(--space-6);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  color: var(--color-text);
  background: var(--color-surface-raised);
  border-top: 1px solid var(--color-border);
  box-shadow: var(--shadow-popover);
  font-size: var(--type-body);
  line-height: var(--type-body-line);
}
.cookie-notice-inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  max-width: 1100px;
  margin-inline: auto;
}
.cookie-notice-copy { flex: 1; min-width: 0; }
.cookie-notice h2 {
  margin: 0 0 var(--space-2);
  color: var(--color-text);
  font-size: var(--type-section);
  line-height: var(--type-section-line);
  font-weight: 600;
}
.cookie-notice p { margin: 0; max-width: 76ch; }
.policy-links {
  flex: none;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-6);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: var(--type-body);
  line-height: var(--type-body-line);
}
.policy-links a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--color-brand);
  text-underline-offset: 0.2em;
}
.cookie-choice { flex: none; }
.cookie-choice-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0;
}
.cookie-choice-form .cookie-choice-button {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  border: 1px solid var(--color-brand);
  border-radius: var(--radius-control);
  background: var(--color-brand-fixed);
  color: #fff;
  font: inherit;
  font-size: var(--type-body-lg);
  line-height: var(--type-body-lg-line);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 140ms ease;
}
.cookie-choice-status { margin: 0 0 var(--space-4); }
.cookie-choice-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.policy-footer {
  flex: none;
  padding: 0 var(--space-6);
  text-align: center;
  font-size: var(--type-body);
  line-height: var(--type-body-line);
}
.policy-footer .policy-links { justify-content: center; }
.sign-in .policy-footer a { color: #fff; }
body.admin .cookie-notice :focus-visible,
body.admin .cookie-choice :focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.entry-legal-links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: var(--space-4);
}
.entry-legal-links .entry-policy-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: #fff;
  font-size: var(--type-body);
  line-height: var(--type-body-line);
  text-decoration: none;
  text-underline-offset: 0.2em;
}

@media (hover: hover) {
  .cookie-choice-form .cookie-choice-button:hover:not(:disabled) {
    background: color-mix(in srgb, var(--color-brand-fixed) 88%, #000);
  }
  .entry-legal-links .entry-policy-link:hover { text-decoration: underline; }
}
.cookie-choice-form .cookie-choice-button:active:not(:disabled) {
  background: color-mix(in srgb, var(--color-brand-fixed) 80%, #000);
}
.cookie-choice-form .cookie-choice-button:disabled {
  cursor: wait;
  color: var(--color-text-muted);
  background: var(--color-canvas);
}

@media (max-width: 760px) {
  .cookie-notice { padding: var(--space-4); }
  .cookie-notice-inner { flex-direction: column; align-items: stretch; gap: var(--space-2); }
  .cookie-choice-form { width: 100%; }
  .cookie-choice-form .cookie-choice-button { padding-inline: var(--space-4); }
  .entry-legal-links { column-gap: var(--space-3); }
}
@media (min-width: 761px) {
  .cookie-shell:has(#cookie-notice) > .console-frame > .console-side { height: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-choice-form .cookie-choice-button { transition: none; }
}
@media print {
  .cookie-notice, .policy-footer { display: none; }
  .cookie-shell:has(#cookie-notice) { display: block; height: auto; overflow: visible; }
  .cookie-shell:has(#cookie-notice) > main,
  .cookie-shell:has(#cookie-notice) > .console-frame { overflow: visible; }
}
