/* Cookie card: slides in from the bottom-left after the visitor scrolls a bit. */

.r-cookie {
  position: fixed;
  z-index: 95;
  left: max(24px, env(safe-area-inset-left, 0px));
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: 380px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px;
  border-radius: 24px;
  background: #faf7f0;
  color: var(--r-navy);
  box-shadow: 0 20px 50px -20px rgba(10, 18, 48, .35);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s var(--r-ease), transform .6s var(--r-ease);
}
.r-cookie[hidden] { display: none; }
.r-cookie.is-on { opacity: 1; transform: none; }

.r-cookie__title { display: flex; align-items: center; gap: 10px; font: 400 20px/normal var(--r-font-head); }
.r-cookie__title img { width: 34px; height: 34px; flex: none; }
.r-cookie.is-on .r-cookie__title img { animation: r-cookie-wobble 1s var(--r-ease) .3s both; }
@keyframes r-cookie-wobble { 0% { transform: rotate(-30deg) scale(.6); opacity: 0; } 60% { transform: rotate(10deg) scale(1.05); opacity: 1; } 100% { transform: none; } }
.r-cookie__text { max-width: 298px; font: 400 14px/1.55 var(--r-font); color: rgba(10, 18, 48, .66); }
.r-cookie__text a { color: #8a6a2e; text-decoration: underline; text-underline-offset: 2px; }

.r-cookie__btns { display: flex; gap: 10px; }
.r-page .r-cookie__btn {
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  font: 500 14px/1 var(--r-font);
  white-space: nowrap;
  transition: filter .2s, background .2s, color .2s, border-color .2s;
}
.r-page .r-cookie__btn--accept { flex: none; width: 130px; background: var(--r-gold-grad); color: var(--r-navy); }
.r-cookie__btn--accept:hover { filter: brightness(1.08); }
.r-page .r-cookie__btn--min { flex: 1 1 0; min-width: 0; border: 1px solid rgba(169, 132, 63, .6); color: #8a6a2e; }
.r-page .r-cookie__btn--min:hover { background: var(--r-gold-grad); border-color: transparent; color: var(--r-navy); }

@media (max-width: 767px) {
  .r-cookie { left: 16px; right: 16px; width: auto; max-width: none; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); padding: 22px; }
  /* «Только необходимые» doesn't fit next to a fixed 130px button at 390. */
  .r-page .r-cookie__btn--accept { flex: 0 0 104px; width: auto; }
  .r-page .r-cookie__btn--min { flex: 1 1 0; padding: 0 10px; }
}

/* Hide the card while the mobile menu is open (it sits above the menu panel). */
.r-page.r-menu-open .r-cookie { visibility: hidden; }
