.theme-ad--inline-grid,
.theme-float-ad--inline-grid {
  width: 100%;
  margin: 16px 0 0;
}

.theme-ad--inline-grid .theme-ad__list,
.theme-float-ad--inline-grid .theme-float-ad__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.theme-ad--inline-grid .theme-ad__link {
  display: block;
  height: 65px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #1b3048;
  border-radius: 6px;
  background: #081321;
}

.theme-ad--inline-grid .theme-ad__image {
  display: block;
  width: 100%;
  height: 65px;
  object-fit: fill;
}

.theme-ad--inline-grid:not(:has(.theme-ad__link)),
.theme-float-ad--inline-grid:not(:has(.theme-float-ad__item)) {
  display: none;
}

.theme-float-ad--inline-grid {
  position: static;
  z-index: auto;
}

.theme-float-ad--inline-grid .theme-float-ad__item {
  position: relative;
  display: block;
  width: 100%;
  height: 65px;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #1b3048;
  border-radius: 6px;
  background: #081321;
  box-shadow: none;
}

.theme-float-ad--inline-grid .theme-float-ad__link {
  display: block;
  width: 100%;
  height: 65px;
}

.theme-float-ad--inline-grid .theme-float-ad__image {
  display: block;
  width: 100%;
  height: 65px;
  object-fit: fill;
}

.theme-float-ad--inline-grid .theme-float-ad__close {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  color: #fff;
  background: rgba(2, 8, 18, .78);
  font-size: 18px;
  font-weight: 700;
  line-height: 20px;
}

.theme-float-ad--inline-grid .theme-float-ad__close:hover {
  background: #e5484d;
}

.theme-ad--website-grid {
  width: 100%;
  margin: 16px 0;
}

.theme-float-ad--website-grid {
  position: static;
  z-index: auto;
  width: min(1200px, calc(100% - 32px));
  margin: 16px auto;
}

.theme-ad--website-grid .theme-ad__list,
.theme-float-ad--website-grid .theme-float-ad__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.theme-ad--website-grid .theme-ad__link,
.theme-float-ad--website-grid .theme-float-ad__item,
.theme-float-ad--website-grid .theme-float-ad__link {
  display: block;
  width: 100%;
  height: 65px;
  min-width: 0;
  overflow: hidden;
}

.theme-ad--website-grid .theme-ad__link,
.theme-float-ad--website-grid .theme-float-ad__item {
  position: relative;
  border: 1px solid #dce5ef;
  border-radius: 6px;
  background: #fff;
}

.theme-ad--website-grid .theme-ad__image,
.theme-float-ad--website-grid .theme-float-ad__image {
  display: block;
  width: 100%;
  height: 65px;
  object-fit: fill;
  border: 0;
}

.theme-float-ad--website-grid .theme-float-ad__close {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, .78);
  font-size: 18px;
  font-weight: 700;
  line-height: 20px;
  cursor: pointer;
}

.theme-ad--website-grid:not(:has(.theme-ad__link)),
.theme-float-ad--website-grid:not(:has(.theme-float-ad__item)) {
  display: none;
}

@media (min-width: 761px) {
  .theme-float-ad[data-float-ad] {
    position: fixed;
    z-index: 90;
    top: 8px;
    right: 8px;
    width: 320px;
    margin: 0;
  }

  .theme-float-ad[data-float-ad] .theme-float-ad__list {
    display: grid;
    width: 320px;
    grid-template-columns: 320px;
    gap: 6px;
  }

  .theme-float-ad[data-float-ad] .theme-float-ad__item {
    position: relative;
    display: grid;
    width: 320px;
    height: 50px;
    min-height: 50px;
    grid-template-columns: 285px 35px;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid #1b3048;
    border-radius: 6px;
    background: #081321;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
  }

  .theme-float-ad[data-float-ad] .theme-float-ad__link,
  .theme-float-ad[data-float-ad] .theme-float-ad__image {
    display: block;
    width: 285px;
    height: 50px;
    min-width: 285px;
    max-width: 285px;
    box-sizing: border-box;
  }

  .theme-float-ad[data-float-ad] .theme-float-ad__image {
    object-fit: fill;
  }

  .theme-float-ad[data-float-ad] .theme-float-ad__close {
    position: static;
    display: grid;
    width: 35px;
    height: 50px;
    min-height: 50px;
    padding: 0;
    place-items: center;
    box-sizing: border-box;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, .18);
    border-radius: 0;
    color: #fff;
    background: rgba(2, 8, 18, .92);
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
  }
}

@media (max-width: 760px) {
  .theme-ad,
  .theme-float-ad {
    display: none !important;
  }

  .theme-ad--inline-grid,
  .theme-float-ad--inline-grid,
  .theme-ad--website-grid,
  .theme-float-ad--website-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .theme-float-ad--inline-grid,
  .theme-float-ad--website-grid {
    position: fixed;
    z-index: 90;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: 100vh;
    margin: 0;
    padding: 6px 8px;
    overflow-y: auto;
    background: rgba(2, 8, 18, .94);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .32);
  }

  .theme-ad--inline-grid .theme-ad__list,
  .theme-float-ad--inline-grid .theme-float-ad__list,
  .theme-ad--website-grid .theme-ad__list,
  .theme-float-ad--website-grid .theme-float-ad__list {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .theme-ad--inline-grid .theme-ad__link,
  .theme-ad--inline-grid .theme-ad__image,
  .theme-float-ad--inline-grid .theme-float-ad__item,
  .theme-float-ad--inline-grid .theme-float-ad__link,
  .theme-float-ad--inline-grid .theme-float-ad__image,
  .theme-ad--website-grid .theme-ad__link,
  .theme-ad--website-grid .theme-ad__image,
  .theme-float-ad--website-grid .theme-float-ad__item,
  .theme-float-ad--website-grid .theme-float-ad__link,
  .theme-float-ad--website-grid .theme-float-ad__image {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    height: 60px;
  }

  .theme-ad--inline-grid .theme-ad__image,
  .theme-float-ad--inline-grid .theme-float-ad__image,
  .theme-ad--website-grid .theme-ad__image,
  .theme-float-ad--website-grid .theme-float-ad__image {
    object-fit: fill;
  }

}
