:root { --consent-space: 0px; }
/* One footer in normal flow. Optional overlays reserve space INSIDE it. */
body[data-public-page], body[data-legal-page] {
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
  margin: 0; padding-bottom: 0; --public-controls-space: 0px;
}
body[data-public-page] > *, body[data-legal-page] > * { flex-shrink: 0; }
body[data-public-page] > main { width: 100%; min-width: 0; box-sizing: border-box; }
body[data-public-page] .menu-sections,
body[data-public-page] .menu-content,
body[data-public-page] .reservation-container { padding-bottom: 40px; }
body[data-public-page=reservas]:has(.sticky-footer) { --public-controls-space: 100px; }
body[data-public-page=carta]:has(.toggle-allergens-btn) { --public-controls-space: 80px; }
body[data-legal-page] .legal-header { width: min(940px,100%); margin: 0 auto; }
body[data-legal-page] .legal-main { width: min(940px,calc(100% - 24px)); margin: 0 auto 24px; }
.public-legal-footer {
  box-sizing: border-box; width: 100%; max-width: none; margin: auto 0 0;
  padding: 32px clamp(16px,4vw,32px) calc(24px + var(--consent-space) + var(--public-controls-space,0px));
  border-top: 1px solid var(--border,#e5ddd7); background: var(--surface-2,var(--bg,#f8f6f2));
  color: var(--text-dim,#5c5a55); font: 13px/1.6 var(--font-body,system-ui,sans-serif);
  letter-spacing: normal; text-transform: none; text-align: center;
}
body[data-public-page=index] .public-legal-footer { padding-top: 48px; }
.public-legal-footer .menu-footer-copy { margin: 0; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.public-legal-footer nav { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.public-legal-footer .copyright + nav,
.public-legal-footer .menu-footer-copy + nav { margin-top: 20px; }
.public-legal-footer a, .public-legal-footer button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; max-width: 100%;
  padding: 6px 0; background: transparent; border: 0; box-shadow: none; border-radius: 0;
  font: inherit; color: inherit; text-decoration: underline; text-decoration-color: transparent;
  text-underline-offset: 3px; cursor: pointer; overflow-wrap: anywhere;
}
.public-legal-footer a:hover, .public-legal-footer button:hover { color: var(--primary,#7a1028); text-decoration-color: currentColor; }
.public-legal-footer [role=status] { max-width: 720px; margin: 8px auto 0; }
.public-legal-footer [role=status]:empty { display: none; }
.consent-banner,.consent-dialog { box-sizing: border-box; color: #211b19; background: #fffdf9; font: 14px/1.6 system-ui,sans-serif; text-align: left; border: 1px solid #e1d8d0; border-radius: 18px; box-shadow: 0 12px 48px #28101b26; padding: 20px; }
.consent-banner { position: fixed; z-index: 900; bottom: 12px; left: 50%; transform: translateX(-50%); width: min(720px,calc(100% - 24px)); max-height: min(55dvh,440px); overflow: auto; }
.consent-banner h2,.consent-dialog h2 { font: 600 18px/1.4 system-ui,sans-serif; margin: 0 0 8px; color: #7a1028; }
.consent-banner p,.consent-dialog p { margin: 0 0 12px; }
.consent-editor { color: #674b54; font-size: 12px; overflow-wrap: anywhere; }
.consent-banner > a { display: inline-block; margin-top: 10px; color: #7a1028; font-size: 13px; }
.consent-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.consent-banner .consent-actions { position: sticky; bottom: 0; z-index: 1; padding-top: 8px; background: #fffdf9; }
.consent-actions button,.consent-dialog > button { min-width: 0; min-height: 44px; padding: 10px 8px; border: 1px solid #7a1028; border-radius: 10px; background: #fffdf9; color: #7a1028; font: 600 14px/1.4 system-ui,sans-serif; cursor: pointer; box-shadow: none; text-align: center; overflow-wrap: anywhere; }
.consent-actions button:hover,.consent-dialog > button:hover { background: #f3e8e9; }
.consent-dialog { position: fixed; width: min(600px,calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; margin: auto; z-index: 20000; }
.consent-dialog::backdrop { background: #24151b80; }
.consent-dialog > button { margin-bottom: 16px; }
.consent-dialog .consent-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
.consent-choice { display: flex; align-items: start; gap: 12px; margin: 12px 0 16px; }
.consent-choice input { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 2px; accent-color: #7a1028; }
.consent-choice span { min-width: 0; }
.consent-banner :focus-visible,.consent-dialog :focus-visible,.public-legal-footer :focus-visible { outline: 3px solid #b68b98; outline-offset: 3px; }
body[data-public-page] .sticky-footer { bottom: var(--consent-space); }
body[data-public-page] .toggle-allergens-btn { bottom: calc(24px + var(--consent-space)); }
.reservation-privacy-note { margin: 16px 0 0; color: var(--text-dim,#5c5a55); font: 12px/1.6 system-ui,sans-serif; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
@media(max-width:400px) { .consent-banner,.consent-dialog { padding: 16px; font-size: 13px; } .consent-banner .consent-actions button { font-size: 12px; padding-inline: 4px; white-space: nowrap; overflow-wrap: normal; } }
