.spf-custom-ads__link {
  display: block;
}

.spf-custom-ads__image {
  max-width: 100%;
  height: auto;
}

.spf-custom-ads__close {
  position: absolute;
  top: 0;
  right: 0;
  width: 15px;
  height: 15px;
  background-color: #fff;
  border: none;
}

.spf-custom-ads__close::before,
.spf-custom-ads__close::after {
  content: "";
  background-color: #00aecd;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}
.spf-custom-ads__close::before {
  width: 100%;
  height: 1px;
}
.spf-custom-ads__close::after {
  width: 1px;
  height: 100%;
}

.spf-custom-ads-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  filter: opacity(0.8);
  z-index: 10000;
}

.spf-custom-ads {
  background-color: #fff;
  z-index: 10001;
  overflow: hidden;
  text-decoration: unset;
  display: block;
}

/* 動画広告対応 */
.spf-custom-ads__link:has(iframe) {
  pointer-events: none;
}

.spf-custom-ads__link > iframe {
  pointer-events: auto;
  aspect-ratio: 740/416;
  width: 100%;
  height: auto;
}

.spf-custom-ads__footer {
  display: flex;
  padding: 5px 0;
  gap: 15px;
  line-height: 1.3;
  font-size: 90%;
}

.spf-custom-ads__video-title {
  flex: 1 0 70%;
}

.spf-custom-ads__video-detail {
  width: 100%;
  border: 1px solid;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5em;
}

@media screen and (max-width: 1024px) {
  .spf-custom-ads__footer {
    flex-direction: column;
    gap: 5px;
  }
}

/* 左サイド広告 */
.spf-custom-ads--type1 {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: clamp(100px, 15vw, 300px);
}

@media (max-width: 1279px) {
  .spf-custom-ads--type1 {
    display: none;
  }
}

/* 全画面広告 */
.spf-custom-ads--type2 {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
/*   max-width: 540px;
  width: 95%; */
  max-width: 40vw;
  width: 50%;
  padding: 15px;
  border-radius: 10px;
}

.spf-custom-ads--type2 .spf-custom-ads__close {
  top: 14px;
  right: 20px;
}

.spf-custom-ads--type2 p {
  font-size: 14px;
  font-weight: bold;
  padding: 0 0 1.2em 1em;
}

@media screen and (max-width: 1024px) {
    .spf-custom-ads--type2 {
        max-width: 100%;
        width: 95%;
    }
}

/* 上部固定広告 */
.spf-custom-ads--type3 {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
}

.spf-custom-ads__inner {
  max-width: 1000px;
  width: fit-content;
  margin: 0 auto;
  position: relative;
}
