.tpg-ad-popout {
  position: fixed;
  z-index: 1000;
  bottom: 0;
  left: 50%;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 8px 44px 8px 8px;
  overflow: hidden;
  transform: translateX(-50%);
  background: var(--tpg-color-page-canvas, #efefef);
  border: 0;
  border-top: 2px solid #183569;
  border-radius: 0;
  box-shadow: 0 -6px 22px rgba(24, 53, 105, 0.32);
  color: #183569;
  font-family: Arial, sans-serif;
  animation: tpg-ad-popout-in 320ms ease-out both;
}

.tpg-ad-popout__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  width: 28px;
  height: 28px;
  padding: 0;
  align-items: center;
  justify-content: center;
  background: #183569;
  border: 0;
  border-radius: 0;
  color: #fff;
  cursor: pointer;
  font: 700 22px/1 Arial, sans-serif;
}

.tpg-ad-popout__close:hover,
.tpg-ad-popout__close:focus-visible {
  background: #10264d;
  outline: 2px solid #fff;
  outline-offset: -3px;
}

body.tpg-ad-popout-visible::after {
  content: "";
  display: block;
  width: 100%;
  height: var(--tpg-ad-popout-height, 108px);
  flex: 0 0 var(--tpg-ad-popout-height, 108px);
}

body.tpg-ad-popout-visible .color-scheme-toggle {
  bottom: calc(var(--tpg-ad-popout-height, 108px) + 1.125rem);
  z-index: 1001;
}

.tpg-ad-popout__slot {
  display: flex;
  width: 100%;
  max-width: 728px;
  height: 90px;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}

:root[data-theme="dark"] .tpg-ad-popout {
  background: linear-gradient(135deg, #17243a 0%, #1a202b 100%);
  border-top-color: #335da8;
  box-shadow: 0 -6px 22px rgba(0, 0, 0, 0.45);
  color: #f5f7fb;
}

:root[data-theme="dark"] .tpg-ad-popout__slot {
  background: rgba(17, 24, 39, 0.55);
}

:root[data-theme="dark"] .tpg-ad-popout__close {
  background: #335da8;
}

:root[data-theme="dark"] .tpg-ad-popout__close:hover,
:root[data-theme="dark"] .tpg-ad-popout__close:focus-visible {
  background: #183569;
}

@media only screen and (max-width: 599px) {
  .tpg-ad-popout {
    height: 78px;
    max-height: 78px;
  }

  .tpg-ad-popout__slot {
    height: 60px;
    max-height: 60px;
  }

  .tpg-ad-popout__slot .adsbygoogle,
  .tpg-ad-popout__slot iframe {
    max-height: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tpg-ad-popout {
    animation: none;
  }
}

@keyframes tpg-ad-popout-in {
  from {
    transform: translate(-50%, 100%);
  }

  to {
    transform: translate(-50%, 0);
  }
}
