/* Block cookies-3276ecec: the one question about cookies, asked once. A dark card of the same
   family as the alert block «Паспарту» (alert-985d3ce8): a passe-partout frame inside the card
   edge, the faint grid of the hero and a sign built like the brand mark. Bottom left on the page
   container; a sheet along the bottom edge on phones.
   Markup in base.html, script js/base/cookies.js. Independent: own font faces, colours and
   layout; shares only the font files. */

/* TikTok Sans of the Rappel brand, renamed for this block. */
@font-face {
  font-family: "TikTok Sans-3276ecec";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../../fonts/tiktok-sans/tiktok-sans-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "TikTok Sans-3276ecec";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../../fonts/tiktok-sans/tiktok-sans-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "TikTok Sans-3276ecec";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../../fonts/tiktok-sans/tiktok-sans-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "TikTok Sans-3276ecec";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../../fonts/tiktok-sans/tiktok-sans-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "TikTok Sans-3276ecec";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../../fonts/tiktok-sans/tiktok-sans-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: "TikTok Sans-3276ecec";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../../fonts/tiktok-sans/tiktok-sans-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, U+02D8-02D9, U+02DB, U+0302, U+0306-0307, U+030A-030C, U+0312, U+031B, U+0326-0328, U+032E, U+0331, U+0335, U+0337-0338, U+0E3F, U+2070, U+2074-207B, U+207D-207E, U+2080-208B, U+208D-208E, U+2100, U+2105, U+2117, U+2153-2154, U+215B-215E, U+2190, U+2192, U+2194-2199, U+2248, U+2260, U+2264-2265, U+2460-2468, U+24EA, U+24FF, U+25CB-25CC, U+25CF, U+2776-277E, U+FB01-FB02;
}

/* The root covers the bottom of the screen only while it is shown; the template keeps it hidden
   until the script finds no earlier answer. */
.cookies-3276ecec {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 24px;
  /* Over every layer of the page, the chat widget included, until the visitor answers. */
  z-index: 2147483647;
  display: block;
  margin: 0;
  padding: 0;
  background: transparent;
  color: #f4f7fa;
  font-family: "TikTok Sans-3276ecec", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", Tahoma, sans-serif;
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  text-align: start;
  text-transform: none;
  font-kerning: normal;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  pointer-events: none;
}
.cookies-3276ecec[hidden] {
  display: none;
}
.cookies-3276ecec,
.cookies-3276ecec :where(*),
.cookies-3276ecec :where(*)::before,
.cookies-3276ecec :where(*)::after {
  box-sizing: border-box;
}
.cookies-3276ecec :where(*) {
  margin: 0;
  padding: 0;
}
.cookies-3276ecec :where(a) {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}
.cookies-3276ecec :where(svg) {
  display: block;
  vertical-align: middle;
  flex-shrink: 0;
}
.cookies-3276ecec :where(button) {
  appearance: none;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.cookies-3276ecec .cookies__inner-3276ecec {
  display: flex;
  justify-content: flex-start;
  width: min(1280px, calc(100% - 32px));
  margin-inline: auto;
}

/* The card rises from the bottom edge a moment after the page, the frame closes in after it. */
.cookies-3276ecec .cookies__card-3276ecec {
  --cookies-fade-3276ecec: 90deg;
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 16px 14px;
  width: min(420px, 100%);
  padding-block: 18px 20px;
  padding-inline: 18px;
  border: 1px solid #46617d;
  border-radius: 20px;
  background:
    linear-gradient(var(--cookies-fade-3276ecec), #192d4300 12%, #192d43 72%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M0 24V0h24' fill='none' stroke='%23a8d1ef' stroke-opacity='.16'/%3E%3C/svg%3E") 8px 8px / 24px 24px,
    #192d43;
  box-shadow:
    inset 0 1px 0 #f4f7fa14,
    0 30px 48px -28px #192d43e6;
  pointer-events: auto;
  animation: cookies-enter-3276ecec 520ms cubic-bezier(0.2, 0.7, 0.2, 1) 300ms backwards;
}
.cookies-3276ecec:dir(rtl) .cookies__card-3276ecec {
  --cookies-fade-3276ecec: 270deg;
}
.cookies-3276ecec .cookies__card-3276ecec::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid #a8d1ef40;
  border-radius: 12px;
  pointer-events: none;
  animation: cookies-frame-3276ecec 700ms cubic-bezier(0.2, 0.7, 0.2, 1) 420ms backwards;
}
.cookies-3276ecec.is-leaving-3276ecec .cookies__card-3276ecec {
  animation: cookies-leave-3276ecec 280ms cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* The sign, as on the alerts: a regular hexagon with a 1.6 contour, a cookie in 3.4 strokes. */
.cookies-3276ecec .cookies__icon-3276ecec {
  width: 44px;
  height: 44px;
}
.cookies-3276ecec .cookies__icon-3276ecec svg {
  width: 100%;
  height: 100%;
}
.cookies-3276ecec .cookies__hex-3276ecec {
  fill: #304d6b;
  stroke: #a8d1ef;
  stroke-width: 1.6;
}
.cookies-3276ecec .cookies__glyph-3276ecec {
  fill: none;
  stroke: #a8d1ef;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cookies-3276ecec .cookies__text-3276ecec {
  min-width: 0;
  color: #f4f7fa;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
/* Words stay in the text colour; the accent is the thin line under the link. */
.cookies-3276ecec .cookies__link-3276ecec {
  color: #f4f7fa;
  text-decoration: underline;
  text-decoration-color: #a8d1ef;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.cookies-3276ecec .cookies__link-3276ecec:hover {
  text-decoration-thickness: 2px;
}

/* Two answers of the same size; allowing is the brand's button, rejecting its outline. */
.cookies-3276ecec .cookies__actions-3276ecec {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cookies-3276ecec .cookies__button-3276ecec {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.938rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  transition:
    background-color 160ms,
    border-color 160ms;
}
.cookies-3276ecec .cookies__button--allow-3276ecec {
  background: #a8d1ef;
  color: #192d43;
}
.cookies-3276ecec .cookies__button--allow-3276ecec:hover {
  background: #d3e8f6;
}
.cookies-3276ecec .cookies__button--reject-3276ecec {
  border-color: #46617d;
  color: #f4f7fa;
}
.cookies-3276ecec .cookies__button--reject-3276ecec:hover {
  border-color: #a8d1ef;
  background: #304d6b;
}
.cookies-3276ecec :is(.cookies__button-3276ecec, .cookies__link-3276ecec):focus-visible {
  outline: 3px solid #a8d1ef;
  outline-offset: 2px;
}

@keyframes cookies-enter-3276ecec {
  from {
    opacity: 0;
    translate: 0 24px;
  }
}
@keyframes cookies-frame-3276ecec {
  from {
    inset: 0;
    opacity: 0;
  }
}
@keyframes cookies-leave-3276ecec {
  to {
    opacity: 0;
    translate: 0 16px;
  }
}
@keyframes cookies-fade-3276ecec {
  from {
    opacity: 0;
  }
}
/* Leaving with reduced motion: a keyframes name of its own, so the animation starts anew and ends
   with an event (the same name in reverse would count as the finished entrance). */
@keyframes cookies-vanish-3276ecec {
  to {
    opacity: 0;
  }
}

/* Phones: a sheet along the bottom edge, clear of the home indicator; the answers share a row. */
@media (max-width: 600px) {
  .cookies-3276ecec {
    inset-block-end: 0;
  }
  .cookies-3276ecec .cookies__inner-3276ecec {
    width: 100%;
  }
  .cookies-3276ecec .cookies__card-3276ecec {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 16px 12px;
    width: 100%;
    padding-block: 18px calc(16px + env(safe-area-inset-bottom, 0px));
    padding-inline: 16px;
    border-width: 1px 0 0;
    border-radius: 20px 20px 0 0;
  }
  .cookies-3276ecec .cookies__card-3276ecec::before {
    inset: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .cookies-3276ecec .cookies__icon-3276ecec {
    width: 40px;
    height: 40px;
  }
  .cookies-3276ecec .cookies__actions-3276ecec {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookies-3276ecec :where(*),
  .cookies-3276ecec :where(*)::before,
  .cookies-3276ecec :where(*)::after {
    transition: none !important;
  }
  .cookies-3276ecec .cookies__card-3276ecec {
    animation: cookies-fade-3276ecec 160ms linear backwards !important;
  }
  .cookies-3276ecec.is-leaving-3276ecec .cookies__card-3276ecec {
    animation: cookies-vanish-3276ecec 160ms linear forwards !important;
  }
  .cookies-3276ecec .cookies__card-3276ecec::before {
    animation: none !important;
  }
}
