/* Profesionálne cookie okno – vzhľad aj správanie obsahu riadi js/cookie.js. */
body.cookie-consent-open {
  overflow: hidden;
}

body.cookie-consent-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(18, 29, 21, 0.56);
  backdrop-filter: blur(3px);
}

.cookie-banner {
  position: fixed;
  z-index: 9999;
  top: 50%;
  left: 50%;
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  background: #fff;
  color: #26352b;
  border: 1px solid rgba(53, 78, 51, 0.14);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-consent__content {
  padding: 30px;
}

.cookie-consent__eyebrow {
  margin: 0 0 7px;
  color: #657965;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.cookie-consent__content h2 {
  margin: 0;
  color: #27382b;
  font-size: clamp(24px, 3vw, 29px);
  line-height: 1.18;
}

.cookie-consent__description {
  margin: 15px 0 8px;
  color: #56675b;
}

.cookie-consent__link {
  margin: 0;
  font-size: 14px;
}

.cookie-consent__link a {
  color: #354e33;
  font-weight: 700;
  text-underline-offset: 3px;
}

.cookie-consent__preferences {
  display: none;
  margin-top: 22px;
  border-top: 1px solid #e4e9e2;
}

.cookie-consent__preferences.is-visible {
  display: block;
}

.cookie-consent__option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #e4e9e2;
}

.cookie-consent__option strong {
  display: block;
  color: #2d3d30;
  font-size: 16px;
}

.cookie-consent__option p {
  margin: 3px 0 0;
  color: #68766a;
  font-size: 14px;
  line-height: 1.4;
}

.cookie-consent__option--locked strong::after {
  content: "  (vždy aktívne)";
  color: #728172;
  font-size: 12px;
  font-weight: 500;
}

.cookie-consent__switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
  cursor: pointer;
}

.cookie-consent__switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.cookie-consent__switch span {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #aeb8af;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s ease;
}

.cookie-consent__switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.24);
  transition: transform 0.2s ease;
}

.cookie-consent__switch input:checked + span {
  background: #3f6543;
}

.cookie-consent__switch input:checked + span::after {
  transform: translateX(20px);
}

.cookie-consent__switch input:focus-visible + span {
  outline: 3px solid rgba(63, 101, 67, 0.35);
  outline-offset: 3px;
}

.cookie-consent__switch input:disabled + span {
  cursor: default;
  background: #789178;
}

.cookie-consent__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.cookie-consent__button,
.cookie-consent__text-button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cookie-consent__button:hover,
.cookie-consent__text-button:hover {
  transform: translateY(-1px);
}

.cookie-consent__button:focus-visible,
.cookie-consent__text-button:focus-visible {
  outline: 3px solid rgba(63, 101, 67, 0.35);
  outline-offset: 2px;
}

.cookie-consent__button--primary {
  background: #354e33;
  color: #fff;
}

.cookie-consent__button--primary:hover {
  background: #263c25;
}

.cookie-consent__button--secondary,
.cookie-consent__button--outline {
  border-color: #9dad9d;
  background: #fff;
  color: #354e33;
}

.cookie-consent__button--secondary:hover,
.cookie-consent__button--outline:hover {
  border-color: #354e33;
  background: #f1f5ef;
}

.cookie-consent__button--outline,
.cookie-consent__text-button {
  grid-column: 1 / -1;
}

.cookie-consent__text-button {
  min-height: auto;
  padding: 3px;
  background: transparent;
  color: #354e33;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 560px) {
  .cookie-banner {
    top: auto;
    /* Necháva voľný priestor nad plávajúcim tlačidlom chatu. */
    bottom: calc(96px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    max-height: calc(100vh - 112px - env(safe-area-inset-bottom));
    border-radius: 15px;
  }

  .cookie-consent__content {
    padding: 23px 20px;
  }

  .cookie-consent__actions {
    grid-template-columns: 1fr;
  }

  .cookie-consent__button--outline,
  .cookie-consent__text-button {
    grid-column: auto;
  }
}

