.cookie-banner-desktop {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 1002;
  width: min(476px, calc(100vw - 32px));
  --cookie-banner-hover: #eaeaea;
}

.cookie-banner-mobile {
  display: none;
  width: 100%;
  max-width: 100%;
  --cookie-banner-hover: #eaeaea;
}

html[data-theme="dark"] .cookie-banner-desktop,
html[data-theme="dark"] .cookie-banner-mobile {
  --cookie-banner-hover: #27282c;
}

.cookie-banner {
  width: 100%;
  max-width: 476px;
  z-index: 9999;
}

.cookie-banner__card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-color);
}

.cookie-banner__text {
  flex: 1 1 80%;
  min-width: 0;
  margin: 0;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
}

.cookie-banner__link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__link:hover {
  text-decoration-thickness: 2px;
}

.cookie-banner__accept {
  flex: 0 0 20%;
  width: 100%;
  min-width: 64px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
}

.cookie-banner__accept:hover {
  background-color: var(--cookie-banner-hover);
}

.archive-wide-home .preserve-show-page {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

@media (max-width: 776px) {
  .cookie-banner-desktop {
    display: none;
  }

  .cookie-banner-mobile {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  .cookie-banner-mobile .cookie-banner {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .cookie-banner-mobile {
    width: 100%;
    max-width: none;
    align-self: stretch;
  }

  .cookie-banner-mobile .cookie-banner {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 450px) {
  .cookie-banner__text {
    flex-basis: 70%;
  }

  .cookie-banner__accept {
    flex-basis: 30%;
    min-width: 58px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 18px;
  }
}
