/* U458 own cookie consent bar (replaces CookieScript). Glass = the category megamenu recipe in nh-header.css
   (see-through, blur 28px, saturate 180%). Always the same smoky glass with white text and a dark shadow
   (Martin 16.11: no light/dark switching while scrolling, it flickered).
   Type and buttons follow the site's modals: title 20/700, text 14/400, buttons 16/700 at 48px. */
.ck {
  --ck-bg: rgba(24, 26, 32, .42);
  --ck-border: rgba(255, 255, 255, .28);
  --ck-ink: #fff;
  --ck-ink2: rgba(255, 255, 255, .94);
  --ck-line: rgba(255, 255, 255, .85);
  --ck-divider: rgba(255, 255, 255, .28);
  --ck-shadow: 0 1px 2px rgba(0, 0, 0, .6), 0 2px 10px rgba(0, 0, 0, .45);
  --ck-box: 0 12px 40px rgba(15, 17, 20, .18), 0 2px 8px rgba(15, 17, 20, .08), inset 0 1px 0 rgba(255, 255, 255, .55);
  position: fixed; z-index: 1130; /* over the header too (hero, brand and offer pages lift it to 1120); under an open Bootstrap modal, see below */
  left: 50%; bottom: 24px; transform: translateX(-50%);
  width: min(1100px, calc(100% - 48px));
  font-family: var(--chilli-font, "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif);
  color: var(--ck-ink);
  text-shadow: var(--ck-shadow);
  opacity: 0; transition: opacity .25s ease, translate .25s ease; translate: 0 12px;
}
.ck.is-in { opacity: 1; translate: 0 0; }
[data-bs-theme="dark"] .ck {
  --ck-box: 0 12px 40px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.ck__card {
  position: relative; box-sizing: border-box;
  padding: 18px 20px;
  background: var(--ck-bg);
  border: 1px solid var(--ck-border);
  border-radius: 22px;
  box-shadow: var(--ck-box);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "icon title btns" "icon text btns";
  column-gap: 16px; row-gap: 2px; align-items: center;
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .ck__card { background: rgba(28, 28, 32, .94); }
}
.ck__icon--side { grid-area: icon; width: 52px; height: 52px; display: block; }
.ck__icon--inline { display: none; }
/* title row: «Ahjusooja küpsist?» with the «Seaded» link right beside it */
.ck__head { grid-area: title; align-self: end; display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.ck__title { margin: 0; font-family: inherit; font-size: 20px; line-height: 1.3; font-weight: 700; color: inherit; }
.ck__text { grid-area: text; align-self: start; margin: 0; font-size: 14px; line-height: 1.5; font-weight: 400; color: var(--ck-ink2); }
.ck__btns { grid-area: btns; display: flex; align-items: center; gap: 10px; }

/* both buttons: the same box as the site's modal buttons (btn-success «Selge»); the global .btn-success min-height 60px is undone here */
.ck .ck__btn.btn {
  box-sizing: border-box; min-width: 124px; height: 48px; min-height: 48px; padding: 0 22px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 16px; line-height: 24px; font-weight: 700;
  border-radius: 15px !important; text-shadow: none; white-space: nowrap;
}
.ck .ck__btn--no.btn { background: transparent; color: var(--ck-ink); border: 1.5px solid var(--ck-line); }
.ck .ck__btn--no.btn:hover, .ck .ck__btn--no.btn:focus-visible { background: rgba(255, 255, 255, .14); color: var(--ck-ink); border-color: var(--ck-line); }

/* «Seaded» / «Tagasi»: plain text link, quieter than the buttons */
.ck__link {
  flex: none; padding: 4px 2px;
  border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
  color: var(--ck-ink); opacity: .85; text-shadow: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px;
  transition: opacity .15s, text-decoration-color .15s;
}
.ck__link:hover, .ck__link:focus-visible { opacity: 1; text-decoration-color: currentColor; }

/* settings */
.ck--settings { width: min(600px, calc(100% - 48px)); }
.ck--settings .ck__card { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 20px 22px; }
.ck__shead { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ck__shead .ck__link { margin-right: -2px; }
.ck__rows { display: flex; flex-direction: column; }
.ck__row { display: flex; align-items: center; gap: 16px; padding: 10px 0; border-top: 1px solid var(--ck-divider); margin: 0; cursor: default; }
.ck__row:last-child { border-bottom: 1px solid var(--ck-divider); }
label.ck__row { cursor: pointer; }
.ck__rowtext { flex: 1 1 auto; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ck__rt { font-size: 16px; font-weight: 700; }
.ck__rd { font-size: 14px; line-height: 1.45; color: var(--ck-ink2); }
.ck__always { flex: none; font-size: 14px; font-weight: 600; color: var(--ck-ink2); }
.ck__sw {
  flex: none; appearance: none; -webkit-appearance: none; margin: 0;
  width: 52px; height: 30px; border-radius: 15px; background: rgba(110, 116, 125, .85); position: relative; cursor: pointer;
  transition: background-color .2s;
}
.ck__sw::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.ck__sw:checked { background: #18AE00; }
.ck__sw:checked::after { transform: translateX(22px); }
.ck__sw:focus-visible { outline: 2px solid var(--ck-ink); outline-offset: 2px; }
.ck__sbtns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ck__sbtns .ck__btn.btn { min-width: 0; }
.ck__more { margin: 0; font-size: 12px; color: var(--ck-ink2); }
.ck__more a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* phones: on top of the bottom navbar, like the CookieScript bar was */
@media (max-width: 767.98px) {
  .ck, .ck--settings { left: 10px; right: 10px; width: auto; transform: none; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  body:has(.mobile-navbar) .ck { bottom: calc(var(--mobile-navbar-height, calc(73px + env(safe-area-inset-bottom, 0px))) + 8px); }
  body.rv-open:has(.mobile-navbar) .ck { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  /* phones: everything centred (Martin 16.11), the cookie inline before the title */
  .ck__card {
    padding: 14px; row-gap: 10px; text-align: center;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "text" "btns";
  }
  .ck__icon--side { display: none; }
  .ck__icon--inline { display: block; flex: none; width: 30px; height: 30px; }
  /* icon + title truly centred; «Seaded» in the top right corner, equal room kept on both sides */
  .ck__head { align-self: center; justify-content: center; align-items: center; gap: 8px; padding: 0 62px; }
  .ck__head .ck__link { position: absolute; top: 6px; right: 8px; padding: 8px 6px; }
  .ck__title { font-size: 18px; }
  .ck__text { font-size: 14px; line-height: 1.45; text-align: center; }
  .ck__btns { gap: 8px; }
  .ck .ck__btn.btn { flex: 1 1 0; min-width: 0; padding: 0 12px; }
  .ck--settings .ck__card { padding: 14px; gap: 8px; max-height: calc(100vh - 140px); overflow-y: auto; }
  .ck__row { padding: 8px 0; gap: 12px; }
  .ck__rt { font-size: 15px; }
  .ck__rd { font-size: 13px; }
}
/* Chilli Creators: above its own tab bar */
@media (max-width: 899.98px) {
  .creators-shell:has(.cr-tabbar) .ck { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .ck { transition: none; translate: 0 0; }
}

/* a Bootstrap modal (1055) opened while the bar is up stays on top */
body.modal-open .ck { z-index: 1040; }
