/**
 * 蓋版廣告 modalAdvertisement.css
 * --------------------------------
 * v2601.1 20260126 by tsshih 初版
 * --------------------------------
 */
html:has(dialog[open]) {
  overflow: hidden;
}

.modalAdvertisement {
  border: none;
  padding: 0;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  background: transparent;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
  overflow: visible;
}

.modalAdvertisement::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  transition: opacity .3s ease;
}

.modalAdvertisement[open] {
  opacity: 1;
}

.modalAdvertisement[open].fading-out {
  opacity: 0;
  transform: scale(0.98);
}
.modalAdvertisement[open].fading-out::backdrop {
  opacity: 0;
  transition-delay: 0.25s;
}

.modalAdvertisement .modalAdvertisement-wrapper {
  position: relative;
  overflow: hidden;
}

.modalAdvertisement .modalAdvertisement-content {
  position: relative;
  width: 50vh;
}

@media (max-width: 767px) {
  .modalAdvertisement .modalAdvertisement-content {
    width: 95vw;
  }
}

.modalAdvertisement .modalAdvertisement-close {
  position: relative;
  z-index: 10;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  color: #333;
  background: transparent;
  cursor: pointer;
}

.modalAdvertisement-close-wrapper {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
}

.countdown-ring {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
}

.countdown-ring__circle_line {
  stroke-dasharray: 113;
  stroke-dashoffset: 0;
  animation: countdown var(--countdown-duration, 5s) linear forwards;
  stroke-linecap: round;
}

@keyframes countdown {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -113;
  }
}

.modalAdvertisement .modalAdvertisement-content ul,
.modalAdvertisement .modalAdvertisement-content li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.modalAdvertisement .modalAdvertisement-content img {
  width: 100%;
  height: auto;
  display: block;
}
