.bcip-popup {
  position: fixed;
  z-index: 999999;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(var(--bcip-width), calc(100vw - 32px));
  line-height: 0;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .28));
}

.bcip-popup--right { right: 16px; }
.bcip-popup--left { left: 16px; }

.bcip-popup__link,
.bcip-popup__image {
  display: block;
  width: 100%;
}

.bcip-popup__image {
  height: auto;
  max-width: 100%;
}

#bcip-popup .bcip-popup__close {
  position: absolute;
  z-index: 1;
  top: -28px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  height: 24px;
  min-height: 24px;
  max-height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c82024;
  color: #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .3);
  font: 400 20px/1 Arial, sans-serif;
  text-align: center;
  cursor: pointer;
  appearance: none;
}

#bcip-popup .bcip-popup__close:hover,
#bcip-popup .bcip-popup__close:focus-visible {
  background: #9e1218;
}

#bcip-popup .bcip-popup__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .bcip-popup {
    right: 0;
    left: 0;
    bottom: env(safe-area-inset-bottom, 0px);
    width: 100%;
  }

  #bcip-popup .bcip-popup__close {
    right: 4px;
  }
}
