@property --au-daily20-beam-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.au-daily20-widget {
  box-sizing: border-box;
  width: 767px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow: visible;
  background: transparent;
  border: none;
  font-family: "Tahoma", "Segoe UI", sans-serif;
}

.au-daily20-widget *,
.au-daily20-widget *::before,
.au-daily20-widget *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.au-daily20-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 767 / 726;
  flex: 0 0 auto;
}

.au-daily20-link {
  position: absolute;
  z-index: 1;
  /* ช่องโปร่งใสภายในกรอบ 20th.png (767x726) */
  top: 44%;
  left: 7%;
  right: 6.5%;
  bottom: 9.5%;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  text-decoration: none;
}

.au-daily20-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Animated border beam รอบช่องแบนเนอร์ */
.au-daily20-beam {
  --au-daily20-beam-angle: 0deg;
  position: absolute;
  z-index: 3;
  top: 44%;
  left: 7%;
  right: 6.5%;
  bottom: 9.5%;
  border-radius: 6px;
  pointer-events: none;
}

.au-daily20-widget .au-daily20-beam::before,
.au-daily20-widget .au-daily20-beam::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 8px;
  padding: 2px;
  background: conic-gradient(
    from var(--au-daily20-beam-angle),
    transparent 0%,
    transparent 62%,
    #7cff6b 72%,
    #ff4ec8 80%,
    #7b5cff 88%,
    transparent 96%,
    transparent 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: au-daily20-beam-spin 2.8s linear infinite;
}

.au-daily20-widget .au-daily20-beam::after {
  inset: -6px;
  border-radius: 12px;
  padding: 3px;
  filter: blur(8px);
  opacity: 0.75;
}

@keyframes au-daily20-beam-spin {
  to {
    --au-daily20-beam-angle: 360deg;
  }
}

.au-daily20-frame {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  display: block;
}

.au-daily20-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 8px 10px;
  background: linear-gradient(90deg, #6b2cff 0%, #c43dff 50%, #ff3d9a 100%);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.au-daily20-countdown {
  line-height: 1;
  font-family: "Kanit", sans-serif;
  font-weight: 400;
  font-size: 14px;
}

@media (max-width: 767px) {
  .au-daily20-widget {
    width: 100%;
    max-width: 767px;
    margin: 0 auto;
  }

  .au-daily20-footer {
    font-size: clamp(11px, 3.2vw, 16px);
    padding: 8px;
  }

  .au-daily20-countdown {
    font-size: clamp(12px, 3.4vw, 16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .au-daily20-widget .au-daily20-beam::before,
  .au-daily20-widget .au-daily20-beam::after {
    animation: none;
  }
}
