/* =========================================================
   COOKIE BANNER
   ========================================================= */

.cookie-banner {
  position: fixed;
  z-index: 1200;

  right: 28px;
  bottom: 28px;

  display: grid;

  width: min(430px, calc(100vw - 56px));

  gap: 22px;

  padding: 26px;

  border:
    1px
    solid
    rgb(13 13 13 / 16%);

  border-radius: 0;

  color: var(--text);
  background: var(--page-bg);

  box-shadow:
    0
    12px
    36px
    rgb(0 0 0 / 12%);
}


/* hidden должен реально скрывать элемент */

.cookie-banner[hidden] {
  display: none;
}


/* =========================================================
   TEXT
   ========================================================= */

.cookie-banner__text {
  margin: 0;

  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
}


.cookie-banner__text a {
  text-decoration: underline;

  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}


.cookie-banner__text a:hover,
.cookie-banner__text a:focus-visible {
  opacity: .65;

  outline: none;
}


/* =========================================================
   BUTTON
   ========================================================= */

.cookie-banner__button {
  display: grid;

  width: 100%;
  min-height: 50px;

  place-items: center;

  padding:
    0
    24px;

  border: 0;
  border-radius: 999px;

  color: #fff;
  background: var(--sidebar-bg);

  font-size: 15px;
  font-weight: 300;

  cursor: pointer;

  transition:
    opacity 180ms ease,
    transform 180ms ease;
}


.cookie-banner__button:hover,
.cookie-banner__button:focus-visible {
  opacity: .88;

  transform:
    translateY(-1px);

  outline: none;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

  .cookie-banner {
    right: var(--tablet-page-gap);
    bottom: var(--tablet-page-gap);

    width:
      min(
        420px,
        calc(
          100vw -
          var(--tablet-page-gap) * 2
        )
      );
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {

  .cookie-banner {
    right: var(--mobile-page-gap);
    bottom:
      max(
        var(--mobile-page-gap),
        env(safe-area-inset-bottom)
      );

    left: var(--mobile-page-gap);

    width: auto;

    gap: 18px;

    padding:
      20px
      18px;
  }


  .cookie-banner__text {
    font-size: 13px;
    line-height: 1.45;
  }


  .cookie-banner__button {
    min-height: 48px;

    font-size: 14px;
  }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .cookie-banner__button {
    transition-duration:
      .01ms !important;
  }

}