/* Cookie consent — floating glass panel at bottom */
.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  padding: 1rem var(--layout-gutter, 1.5rem) 1.25rem;
  pointer-events: none;
  background: transparent;
  border: none;
  box-shadow: none;
  transform: translateY(calc(100% + 1.25rem));
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.4s ease;
}

.cookie-bar.is-open {
  transform: translateY(0);
  visibility: visible;
}

.cookie-bar__inner {
  pointer-events: auto;
  width: 100%;
  max-width: min(var(--layout-max, 1520px), 100%);
  margin: 0 auto;
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  flex-wrap: wrap;
  border-radius: 20px;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 32px rgba(45, 212, 191, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.cookie-bar__inner.glass-liquid {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.1), transparent 34%),
    radial-gradient(circle at 88% 92%, rgba(225, 109, 49, 0.06), transparent 40%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%);
  backdrop-filter: blur(18px) saturate(160%) brightness(1.02);
  -webkit-backdrop-filter: blur(18px) saturate(160%) brightness(1.02);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 32px rgba(45, 212, 191, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.cookie-bar__inner.glass-liquid::before {
  background: radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.16), transparent 28%);
}

.cookie-bar__main {
  flex: 1 1 20rem;
  min-width: 0;
}

.cookie-bar__title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.cookie-bar__text {
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.55;
  margin: 0;
}

.cookie-bar__text--mobile,
.cookie-bar__check-text--mobile {
  display: none;
}

.cookie-bar__text a {
  color: var(--color-secondary-light, #2dd4bf);
  text-decoration: none;
  font-weight: 600;
}

.cookie-bar__text a:hover {
  text-decoration: underline;
}

.cookie-bar__check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 0.7rem;
  min-height: 44px;
  padding: 0.25rem 0;
  cursor: pointer;
  font-size: 0.8rem;
  color: #f1f5f9;
  line-height: 1.45;
}

.cookie-bar__check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex-shrink: 0;
  accent-color: var(--color-secondary, #05bcb9);
  cursor: pointer;
}

.cookie-bar__actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.cookie-bar__btn {
  padding: 0.7rem 1.5rem;
  min-height: 44px;
  min-width: 44px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.cookie-bar__accept:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.18);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cookie-bar__inner {
    background: rgba(16, 57, 85, 0.96);
  }
}

@media (max-width: 720px) {
  .cookie-bar {
    padding: 0.45rem 0.65rem calc(0.45rem + env(safe-area-inset-bottom, 0));
  }

  .cookie-bar__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "copy actions"
      "check check";
    align-items: start;
    gap: 0.45rem 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
  }

  .cookie-bar__inner.glass-liquid {
    backdrop-filter: blur(14px) saturate(160%) brightness(1.02);
    -webkit-backdrop-filter: blur(14px) saturate(160%) brightness(1.02);
    box-shadow:
      0 12px 32px rgba(0, 0, 0, 0.38),
      0 0 0 1px rgba(255, 255, 255, 0.06),
      0 0 24px rgba(45, 212, 191, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }

  .cookie-bar__main {
    grid-area: copy;
    flex: none;
  }

  .cookie-bar__title {
    display: none;
  }

  .cookie-bar__text--desktop,
  .cookie-bar__check-text--desktop {
    display: none;
  }

  .cookie-bar__text--mobile,
  .cookie-bar__check-text--mobile {
    display: inline;
  }

  .cookie-bar__text--mobile {
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .cookie-bar__check {
    grid-area: check;
    margin-top: 0;
    font-size: 0.68rem;
    gap: 0.4rem;
    align-items: center;
    min-width: 0;
    min-height: 44px;
    padding: 0.35rem 0;
  }

  .cookie-bar__check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin-top: 0;
  }

  .cookie-bar__actions {
    grid-area: actions;
    width: auto;
    min-width: 7.5rem;
  }

  .cookie-bar__btn {
    padding: 0.55rem 0.85rem;
    font-size: 0.72rem;
  }
}
