#visit-measurement[hidden], #visit-measurement-preferences[hidden] { display: none !important; }
#visit-measurement { position: fixed; z-index: 10000; bottom: 1rem; left: 1rem; width: min(28rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; box-sizing: border-box; padding: 1.4rem; background: #fffdf8; color: #23281f; border: 1px solid #d9d8ce; border-radius: .5rem; box-shadow: 0 6px 30px #0002; font: 400 15px/1.5 system-ui, sans-serif; text-align: left; }
#visit-measurement h2 { font: 600 18px/1.3 system-ui, sans-serif; margin: 0 0 .65rem; color: inherit; letter-spacing: normal; text-transform: none; }
#visit-measurement p { font: inherit; margin: 0 0 1rem; color: inherit; }
#visit-measurement > div { display: flex; gap: .7rem; }
#visit-measurement button { flex: 1; min-height: 44px; padding: .65rem .9rem; background: #23281f; color: #fffdf8; border: 1px solid #23281f; border-radius: .25rem; font: 600 15px/1.3 system-ui, sans-serif; cursor: pointer; letter-spacing: normal; text-transform: none; }
#visit-measurement button:hover { background: #3e4935; border-color: #3e4935; }
#visit-measurement button[data-analytics-choice="denied"] { background: #fffdf8; color: #23281f; border-color: #8a9081; }
#visit-measurement button[data-analytics-choice="denied"]:hover { background: #e2e3d8; border-color: #737a69; }
#visit-measurement button:focus-visible, #visit-measurement-preferences:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
#visit-measurement button:focus-visible { outline-color: #23281f; }
#visit-measurement-preferences { display: block; margin: 1rem auto; padding: .5rem; min-height: 44px; background: transparent; color: inherit; border: 0; font: 400 13px/1.5 system-ui, sans-serif; text-decoration: underline; cursor: pointer; letter-spacing: normal; text-transform: none; }

#visit-measurement details { margin: -.35rem 0 1rem; font: inherit; color: inherit; border: 0; padding: 0; }
#visit-measurement summary { cursor: pointer; font: inherit; font-size: 13px; color: inherit; text-decoration: underline; padding: .35rem 0; }
#visit-measurement details p { font-size: 13px; margin: .5rem 0; }
#visit-measurement a { color: inherit; text-decoration: underline; }
#visit-measurement summary:focus-visible, #visit-measurement a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Vivant: a stamped card on yellow paper, with the same pills as the wine filters. */
[data-theme="vivant"] {
  #visit-measurement { bottom: 1.25rem; left: 1.25rem; padding: 1.5rem 1.5rem 1.35rem; background: var(--sun); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--tomato); font: 400 .9375rem/1.55 var(--text); transform: rotate(-1deg); transform-origin: 0 100%; animation: v-consent-in .5s var(--ease) both; }
  #visit-measurement h2 { width: fit-content; margin: 0 0 .8rem; padding-bottom: 8px; background: var(--squiggle) left bottom / 24px 6px repeat-x; font: 700 1.375rem/1.1 var(--display); letter-spacing: -.02em; }
  #visit-measurement summary, #visit-measurement details p { font: 500 .8125rem/1.5 var(--display); }
  #visit-measurement details p { font-family: var(--text); }
  #visit-measurement summary { width: fit-content; color: var(--tomato); text-underline-offset: 4px; }
  #visit-measurement > div { gap: 10px; }
  #visit-measurement button { min-height: 48px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 .9375rem/1 var(--display); }
  #visit-measurement button:hover { background: var(--tomato); border-color: var(--tomato); }
  #visit-measurement button[data-analytics-choice="denied"] { background: transparent; color: var(--ink); border-color: var(--ink); }
  #visit-measurement button[data-analytics-choice="denied"]:hover { background: var(--paper); border-color: var(--ink); }
  #visit-measurement :focus-visible { outline: 3px solid var(--tomato); outline-offset: 3px; }
  .footer-attribution #visit-measurement-preferences { display: inline; min-height: 0; margin: 0; padding: 0; font: inherit; text-underline-offset: 3px; }
  .footer-attribution #visit-measurement-preferences::before { content: '·'; display: inline-block; margin: 0 .3em; text-decoration: none; }
  @media (max-width: 740px) {
    #visit-measurement { bottom: .75rem; left: .75rem; width: calc(100vw - 1.5rem - 6px); max-height: calc(100dvh - 1.5rem); transform: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    #visit-measurement { animation: none; }
  }
}
@keyframes v-consent-in { from { opacity: 0; transform: translateY(24px) rotate(2deg); } }

/* Affiche, inspired by Vivant's stamped card: a beer mat with a bitten cookie set on its corner, as served with a beer.
   As on Vivant, Accept is filled and Refuse is outlined, at the same size. */
[data-theme="affiche"] {
  #visit-measurement {
    bottom: 1.25rem; left: 1.25rem; padding: 1.6rem 1.5rem 1.4rem; border: 0; border-top: 4px solid var(--sun); border-radius: 0;
    background: var(--cream);
    color: var(--ink); box-shadow: 6px 6px 0 var(--red); font: 400 .9375rem/1.55 var(--text);
    rotate: -1deg; transform-origin: 0 100%; animation: a-consent-in .5s cubic-bezier(.23, 1, .32, 1) both;
  }
  /* Drawn rather than photographed: it matches the age question's glass and stays sharp at any size. */
  #visit-measurement::before {
    content: ''; position: absolute; top: 12px; right: 12px; width: 80px; height: 80px; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 72'%3E%3Cdefs%3E%3Cmask id='b'%3E%3Crect width='72' height='72' fill='%23fff'/%3E%3Ccircle cx='63' cy='13' r='11' fill='%23000'/%3E%3Ccircle cx='67' cy='27' r='7.5' fill='%23000'/%3E%3Ccircle cx='51' cy='5' r='8' fill='%23000'/%3E%3C/mask%3E%3C/defs%3E%3Cg mask='url%28%23b%29'%3E%3Ccircle cx='35' cy='38' r='30' fill='%238a5626'/%3E%3Ccircle cx='35' cy='38' r='27' fill='%23cf9149'/%3E%3Ccircle cx='31' cy='33' r='19' fill='%23e0aa62' opacity='.55'/%3E%3Cg fill='%233a2214'%3E%3Cpath d='M19 27l5-3 4 3-1 5-6 1z'/%3E%3Cpath d='M37 21l5-1 3 4-3 4-5-2z'/%3E%3Cpath d='M47 38l5-2 3 5-3 4-5-2z'/%3E%3Cpath d='M27 45l5-2 4 4-2 5-6-1z'/%3E%3Cpath d='M14 40l4-1 3 3-2 4-4-1z'/%3E%3Cpath d='M40 53l4-2 4 3-2 4-5 0z'/%3E%3Cpath d='M33 33l3-1 2 3-2 2-3-1z'/%3E%3C/g%3E%3C/g%3E%3Cg fill='%23cf9149'%3E%3Ccircle cx='66' cy='38' r='1.8'/%3E%3Ccircle cx='61' cy='44' r='1.2'/%3E%3Ccircle cx='70' cy='8' r='1.4'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; filter: drop-shadow(0 6px 10px rgb(0 0 0 / .3));
    rotate: -12deg; animation: a-cookie-in .5s cubic-bezier(.34, 1.56, .64, 1) .3s both;
  }
  #visit-measurement h2 { max-width: calc(15ch + 76px); padding-right: 76px; margin: 0 0 .7rem; font: 800 1.75rem/1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
  #visit-measurement summary, #visit-measurement details p { font: 400 .8125rem/1.5 var(--text); }
  #visit-measurement summary { width: fit-content; color: var(--red-deep); text-underline-offset: 4px; }
  #visit-measurement > div { gap: 10px; }
  #visit-measurement button {
    min-height: 48px; border: 2px solid var(--ink); border-radius: 0; background: var(--ink); color: var(--cream);
    font: 700 .78rem/1 var(--text); letter-spacing: .14em; text-transform: uppercase; transition: background .2s ease, color .2s ease, border-color .2s ease;
  }
  #visit-measurement button:hover { background: var(--red-deep); border-color: var(--red-deep); color: #fff; }
  #visit-measurement button[data-analytics-choice="denied"] { background: transparent; color: var(--ink); border-color: var(--ink); }
  #visit-measurement button[data-analytics-choice="denied"]:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
  #visit-measurement :focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
  .footer-attribution #visit-measurement-preferences { display: inline; min-height: 0; margin: 0; padding: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; text-underline-offset: 3px; }
  @media (max-width: 740px) {
    #visit-measurement { bottom: .75rem; left: .75rem; width: calc(100vw - 1.5rem - 6px); max-height: calc(100dvh - 1.5rem); rotate: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    #visit-measurement { animation-name: a-consent-fade; }
    #visit-measurement::before { animation-name: a-consent-fade; }
  }
}
/* Valduc: the age question's slate card, a yellow Gothic title and red caps on the buttons. */
[data-theme="affiche"][data-producer-id="valduc"] {
  #visit-measurement {
    background: var(--grain), #1f1f1f;
    color: #dedbd5; box-shadow: 6px 6px 0 var(--red-deep), 0 24px 60px rgb(0 0 0 / .5);
  }
  #visit-measurement h2 { color: var(--sun); font: 400 1.9rem/1.05 'BouteilleHeading', Georgia, serif; font-variation-settings: 'wght' 540; text-transform: none; letter-spacing: 0; }
  #visit-measurement summary { color: #fff; text-decoration-color: var(--red); }
  #visit-measurement a { color: #fff; }
  #visit-measurement button { border: 1px solid var(--red-deep); background: var(--red-deep); color: #fff; font: 400 .78rem/1.3 var(--text); letter-spacing: .16em; }
  #visit-measurement button:hover { background: #b51c1d; border-color: #b51c1d; color: #fff; }
  #visit-measurement button[data-analytics-choice="denied"] { border-color: var(--red-deep); background: transparent; color: #fff; }
  #visit-measurement button[data-analytics-choice="denied"]:hover { background: var(--red-deep); border-color: var(--red-deep); color: #fff; }
  #visit-measurement :focus-visible { outline-color: var(--sun); }
}
@keyframes a-consent-in { from { opacity: 0; translate: 0 24px; rotate: 2deg; } }
@keyframes a-consent-fade { from { opacity: 0; } }
/* The cookie lands on the card a beat after it, with a small overshoot. */
@keyframes a-cookie-in { from { opacity: 0; scale: .6; rotate: -50deg; } }
