/**
 * Cookie notice — shared across the whole site.
 *
 * Loaded from includes/head.php, so it lands on redesigned and legacy pages
 * alike. Legacy pages never pull foodcase.css, which is why the two Poppins
 * weights this bar needs are declared here as well. The URLs are identical to
 * the ones in foodcase.css, so on the home page the browser reuses the files it
 * already has rather than fetching them twice.
 *
 * Visibility is owned by the `hidden` attribute, never by an inline
 * style.display — that was what made the three old copies of this banner
 * reappear on every reload.
 */

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poppins-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poppins-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The attribute wins over every display below, so JS only ever flips
   `el.hidden`. !important because legacy pages carry broad selectors of their
   own that would otherwise reach this element. */
.cookie-bar[hidden] {
  display: none !important;
}

.cookie-bar {
  position: fixed;
  z-index: 1000;
  right: 12px;
  bottom: 12px;
  left: 12px;
  width: auto;
  max-width: 720px;
  margin-inline: auto;
  padding: 12px 18px;
  background-color: #ffffff;
  border: 1px solid #e6e4e5;
  /* Narrow screens stack the bar onto two rows, where a stadium radius would
     bend the end caps into the text. The single-row layout below is a true
     pill: at one line 28px exceeds half the height, so CSS clamps it. */
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(27, 23, 25, 0.14);
  box-sizing: border-box;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  animation: cookie-bar-in 0.32s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@media (min-width: 768px) {
  .cookie-bar {
    right: 20px;
    bottom: 20px;
    left: 20px;
    padding: 8px 10px 8px 24px;
    border-radius: 28px;
  }
}

@keyframes cookie-bar-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-bar {
    animation: none;
  }
}

.cookie-bar__inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

@media (min-width: 768px) {
  .cookie-bar__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
  }
}

.cookie-bar__text {
  margin: 0;
  /* A flex item will not shrink below its content width on its own, so without
     this a long sentence pushes straight out through the side of the pill. */
  min-width: 0;
  color: #40363c;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

@media (min-width: 992px) {
  .cookie-bar__text {
    font-size: 14px;
  }
}

.cookie-bar__link {
  color: #3f8104;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-bar__link:hover {
  color: #2f6103;
}

.cookie-bar__actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

/* Both buttons are the same size and sit at the same level: rejecting must cost
   exactly as much as accepting. */
.cookie-bar__btn {
  flex: 1 1 auto;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
  .cookie-bar__btn {
    flex: 0 0 auto;
  }
}

.cookie-bar__btn:focus-visible {
  outline: 2px solid #3f8104;
  outline-offset: 3px;
}

.cookie-bar__btn--accept {
  background-image: linear-gradient(104deg, #3f8104 0%, #659a36 100%);
  background-color: #3f8104;
  color: #f9f9f6;
}

.cookie-bar__btn--accept:hover {
  background-image: linear-gradient(104deg, #356c03 0%, #578a2c 100%);
}

.cookie-bar__btn--decline {
  background-color: transparent;
  border-color: #c4c1c3;
  color: #40363c;
}

.cookie-bar__btn--decline:hover {
  border-color: #40363c;
  background-color: #f4f3f3;
}
