:root {
  --nikibi-fixed-banner-pc-width: 390px;
  --nikibi-fixed-banner-pc-height: 195px;

  --nikibi-fixed-banner-sp-width: 150px;
  --nikibi-fixed-banner-sp-height: 75px;

  --nikibi-fixed-menu-height: 84px;
}

.nikibi-fixed-banner {
  position: fixed;
  z-index: 20;
  display: none;
  box-sizing: border-box;

  box-shadow: 0 6px 18px rgb(0 0 0 / 20%);
}

.nikibi-fixed-banner[hidden] {
  display: none !important;
}

.nikibi-fixed-banner__link {
  display: block;
  width: 100%;
  height: 100%;
}

.nikibi-fixed-banner__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.nikibi-fixed-banner__close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #333;
  color: #fff;
  font-size: 0;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(0 0 0 / 20%);
}

.nikibi-fixed-banner__close::before,
.nikibi-fixed-banner__close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}

.nikibi-fixed-banner__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.nikibi-fixed-banner__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.nikibi-fixed-banner__close:focus-visible,
.nikibi-fixed-banner__link:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 3px;
}

/* PC */
@media screen and (min-width: 1640px) {
  .nikibi-fixed-banner {
    display: block;
    left: auto;
    right: 30px;
    bottom: 30px;
    width: var(--nikibi-fixed-banner-pc-width);
    height: var(--nikibi-fixed-banner-pc-height);
  }
}

/* SP */
@media screen and (max-width: 767px) {
  .nikibi-fixed-banner {
    display: block;
    left: auto;
    right: 12px;
    bottom: calc(var(--nikibi-fixed-menu-height) + 12px);
    width: var(--nikibi-fixed-banner-sp-width);
    height: var(--nikibi-fixed-banner-sp-height);
  }
}