#ujecia-cookie-root.cookie-root {
  position: fixed;
  inset: auto auto max(1rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
  left: max(1rem, env(safe-area-inset-left, 0px));
  right: auto;
  top: auto;
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.65rem;
  pointer-events: none;
  margin: 0;
}

.cookie-fab {
  pointer-events: auto;
  width: 3.35rem;
  height: 3.35rem;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #b8793f;
  background: linear-gradient(145deg, #fff8ef 0%, #f3e0c8 100%);
  box-shadow:
    0 4px 16px rgba(92, 64, 51, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cookie-fab:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 22px rgba(92, 64, 51, 0.26);
}

.cookie-fab:focus-visible {
  outline: 2px solid #6b5740;
  outline-offset: 3px;
}

.cookie-fab__icon {
  width: 1.65rem;
  height: 1.65rem;
}

.cookie-root.is-open .cookie-fab {
  box-shadow:
    0 0 0 3px rgba(107, 87, 64, 0.18),
    0 6px 20px rgba(92, 64, 51, 0.24);
}

.cookie-banner {
  pointer-events: auto;
  width: min(22rem, calc(100vw - 2rem));
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.65rem) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.cookie-root.is-open .cookie-banner {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.cookie-banner__panel {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #e8e3dc;
  border-radius: 16px;
  box-shadow: 0 14px 44px rgba(26, 24, 22, 0.16);
  padding: 0.95rem 1rem 1rem;
}

.cookie-banner__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.cookie-banner__title {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1816;
}

.cookie-banner__close {
  border: none;
  background: transparent;
  color: #8a8278;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 8px;
}

.cookie-banner__close:hover {
  background: #f5f1eb;
  color: #4a4540;
}

.cookie-banner__text {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #6f6a65;
}

.cookie-banner__text a {
  color: #6b5740;
  font-weight: 500;
}

.cookie-banner__details {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.85rem;
  background: #faf8f5;
  border: 1px solid #ebe6df;
  border-radius: 10px;
}

.cookie-banner__check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #4a4540;
  cursor: pointer;
}

.cookie-banner__check:last-child {
  margin-bottom: 0;
}

.cookie-banner__check input {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.cookie-banner__check--locked {
  opacity: 0.85;
  cursor: default;
}

.cookie-banner__actions--save {
  margin-top: 0.35rem;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.cookie-banner__actions .btn {
  margin: 0;
  font-size: 0.78rem;
  padding: 0.5rem 0.75rem;
}

@media (max-width: 520px) {
  #ujecia-cookie-root.cookie-root {
    left: max(0.75rem, env(safe-area-inset-left, 0px));
    right: auto;
    bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 1.5rem);
  }

  .cookie-banner {
    width: min(22rem, calc(100vw - 1.5rem));
  }

  .cookie-banner__actions {
    flex-direction: column;
  }

  .cookie-banner__actions .btn {
    width: 100%;
  }
}
