.asw-lw-modal[hidden] {
  display: none !important;
}

.asw-lw-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 16px;
  font-family: inherit;
}

.asw-lw-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 11, 20, 0.34),
    rgba(7, 11, 20, 0.58)
  );
  backdrop-filter: blur(18px) saturate(175%);
}

.asw-lw-dialog {
  position: relative;
  width: min(920px, 100%);
  max-height: min(720px, calc(100vh - 32px));
  overflow-x: hidden;
  overflow-y: auto;
  isolation: isolate;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.48),
      rgba(255, 255, 255, 0.18)
    ),
    linear-gradient(
      140deg,
      rgba(255, 255, 255, 0.18),
      rgba(255, 255, 255, 0.04) 58%
    ),
    rgba(243, 247, 251, 0.2);
  color: #151719;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 22px;
  box-shadow:
    0 34px 90px rgba(5, 10, 20, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -24px 46px rgba(255, 255, 255, 0.08),
    inset 18px 0 28px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(32px) saturate(165%);
}

.asw-lw-close {
  display: flex;
  justify-content: center;
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.56),
    rgba(255, 255, 255, 0.22)
  );
  color: #151719;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(18px) saturate(175%);
  box-shadow:
    0 12px 24px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -10px 20px rgba(255, 255, 255, 0.08);
}

.asw-lw-content {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(260px, 1fr);
  gap: 24px;
  align-items: center;
  padding: 30px;
  position: relative;
  z-index: 1;
}

.asw-lw-stage {
  --asw-lw-size: min(380px, calc(100vw - 64px));
  --asw-lw-label-radius: calc(var(--asw-lw-size) * 0.34);
  --asw-lw-label-offset-x: -70%;
  --asw-lw-label-width: clamp(
    78px,
    calc((var(--asw-lw-size) * 3.1416 / var(--asw-lw-count)) * 0.5),
    128px
  );
  position: relative;
  width: min(100%, var(--asw-lw-size));
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.asw-lw-disc {
  --asw-lw-rotation: 0deg;
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(255, 255, 255, 0.42),
      rgba(255, 255, 255, 0) 35%
    ),
    linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.18),
      rgba(255, 255, 255, 0) 42%
    ),
    var(--asw-lw-bg);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow:
    0 22px 42px rgba(6, 14, 28, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    inset 0 0 0 10px rgba(255, 255, 255, 0.36),
    inset 0 -22px 34px rgba(8, 15, 28, 0.08);
  transition: transform 4.8s cubic-bezier(0.12, 0.78, 0.18, 1);
  will-change: transform;
  overflow: hidden;
}

.asw-lw-disc-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.asw-lw-pointer {
  position: absolute;
  bottom: -8px;
  left: 50%;
  z-index: 4;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-right: 18px solid transparent;
  border-left: 18px solid transparent;
  border-bottom: 36px solid rgba(17, 24, 39, 0.94);
  filter: drop-shadow(0 -8px 12px rgba(0, 0, 0, 0.2));
}

.asw-lw-label {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--asw-lw-label-width);
  transform: translate(-50%, -50%) rotate(var(--asw-lw-angle))
    translateY(calc(var(--asw-lw-label-radius) * -1))
    translateX(var(--asw-lw-label-offset-x));
  transform-origin: center center;
  pointer-events: none;
}

.asw-lw-label-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transform: rotate(var(--asw-lw-counter-angle));
  transform-origin: center center;
}

.asw-lw-label-text {
  --asw-lw-optical-shift: 0px;
  display: grid;
  place-items: center;
  gap: 2px;
  width: 100%;
  min-height: clamp(58px, calc(var(--asw-lw-size) * 0.17), 86px);
  padding: 6px 6px 4px;
  color: #fffdf7;
  text-align: center;
  direction: rtl;
  unicode-bidi: isolate;
  transform: translateY(var(--asw-lw-optical-shift))
    rotate(calc(0deg - var(--asw-lw-rotation, 0deg)));
  transform-origin: center center;
  transition: transform 4.8s cubic-bezier(0.12, 0.78, 0.18, 1);
  text-shadow:
    0 2px 4px rgba(8, 15, 28, 0.92),
    0 6px 18px rgba(8, 15, 28, 0.35);
  text-wrap: balance;
  will-change: transform;
}

.asw-lw-label-text.is-coupon,
.asw-lw-label-text.is-percent,
.asw-lw-label-text.is-try-again {
  --asw-lw-optical-shift: clamp(7px, calc(var(--asw-lw-size) * 0.03), 12px);
}

.asw-lw-label-primary,
.asw-lw-label-secondary {
  display: block;
  width: 100%;
  text-align: center;
}

.asw-lw-label-primary {
  font-size: clamp(1.24rem, 3.1vw, 1.92rem);
  font-weight: 1000;
  line-height: 0.98;
  letter-spacing: -0.04em;
  -webkit-text-stroke: 0.35px rgba(8, 15, 28, 0.45);
}

.asw-lw-label-secondary {
  font-size: clamp(0.72rem, 1.45vw, 0.9rem);
  font-weight: 900;
  line-height: 1.08;
}

.asw-lw-label-text.is-percent .asw-lw-label-primary {
  font-size: clamp(1.08rem, 2.65vw, 1.54rem);
  letter-spacing: -0.02em;
}

.asw-lw-label-text.is-coupon .asw-lw-label-primary,
.asw-lw-label-text.is-percent .asw-lw-label-primary {
  direction: ltr;
  unicode-bidi: plaintext;
}

.asw-lw-label-text.is-try-again .asw-lw-label-primary {
  font-size: clamp(1rem, 2.5vw, 1.34rem);
  letter-spacing: 0;
}

.asw-lw-label-text.is-try-again .asw-lw-label-secondary,
.asw-lw-label-text.is-text .asw-lw-label-secondary {
  font-size: clamp(0.72rem, 1.3vw, 0.88rem);
}

.asw-lw-label-text.is-text .asw-lw-label-primary {
  font-size: clamp(0.96rem, 2.2vw, 1.16rem);
  letter-spacing: 0;
}

.asw-lw-spin {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(136px, 36%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 50%;
  background: linear-gradient(
    180deg,
    rgba(18, 23, 33, 0.9),
    rgba(18, 23, 33, 0.72)
  );
  color: #fff;
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.25;
  cursor: pointer;
  box-shadow:
    0 18px 32px rgba(8, 15, 28, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 0 8px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(130%);
}

.asw-lw-spin:disabled {
  cursor: wait;
  opacity: 0.86;
}

.asw-lw-copy {
  min-width: 0;
  padding: 22px 20px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 20px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.28),
      rgba(255, 255, 255, 0.12)
    ),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.16),
      rgba(255, 255, 255, 0.03)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -18px 34px rgba(255, 255, 255, 0.06),
    0 18px 34px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(22px) saturate(150%);
}

.asw-lw-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.44),
    rgba(255, 255, 255, 0.16)
  );
  color: #157a6e;
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.asw-lw-copy h2 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 2.15rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.asw-lw-copy p {
  margin: 0 0 16px;
  color: rgba(15, 23, 42, 0.78);
  font-size: 0.98rem;
  line-height: 1.8;
}

.asw-lw-result {
  margin: 16px 0 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.36),
    rgba(255, 255, 255, 0.16)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -14px 24px rgba(255, 255, 255, 0.08),
    0 14px 26px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px) saturate(155%);
}

.asw-lw-result strong {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 1rem;
}

.asw-lw-code-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 8px;
}

.asw-lw-code-row code {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.44),
    rgba(255, 255, 255, 0.26)
  );
  color: #0f172a;
  font-size: 1.08rem;
  font-weight: 900;
  direction: ltr;
  text-align: center;
  backdrop-filter: blur(14px) saturate(148%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -10px 20px rgba(255, 255, 255, 0.06);
}

.asw-lw-code-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(21, 122, 110, 0.92),
    rgba(21, 122, 110, 0.74)
  );
  color: #fff;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -10px 18px rgba(12, 76, 68, 0.18),
    0 12px 22px rgba(21, 122, 110, 0.22);
}

.asw-lw-result small {
  display: block;
  color: rgba(15, 23, 42, 0.72);
  font-weight: 800;
}

.asw-lw-note {
  display: block;
  color: rgba(15, 23, 42, 0.66);
  line-height: 1.7;
}

.asw-lw-trigger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #157a6e;
  border-radius: 8px;
  background: #157a6e;
  color: #fff;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
}

.asw-lw-trigger-button.is-disabled,
.asw-lw-trigger-button:disabled {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.asw-lw-trigger-image {
  position: relative;
  display: inline-grid;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #eef2f7;
  color: inherit;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.asw-lw-trigger-image-media {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
}

.asw-lw-trigger-image.is-disabled,
.asw-lw-trigger-image:disabled {
  cursor: not-allowed;
}

.asw-lw-trigger-image.is-disabled .asw-lw-trigger-image-media,
.asw-lw-trigger-image:disabled .asw-lw-trigger-image-media {
  filter: grayscale(0.2);
  opacity: 0.82;
}

.asw-lw-trigger-status {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(21, 23, 25, 0.88);
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

body.asw-lw-lock {
  overflow: hidden;
}

@media (max-width: 760px) {
  .asw-lw-modal {
    padding: 8px;
  }

  .asw-lw-backdrop {
    background: linear-gradient(
      180deg,
      rgba(7, 11, 20, 0.3),
      rgba(7, 11, 20, 0.62)
    );
    backdrop-filter: blur(20px) saturate(185%);
  }

  .asw-lw-dialog {
    width: 100%;
    max-height: calc(100vh - 12px);
    border-radius: 24px;
    background:
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.52),
        rgba(255, 255, 255, 0.2)
      ),
      linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.2),
        rgba(255, 255, 255, 0.04) 60%
      ),
      rgba(243, 247, 251, 0.24);
    box-shadow:
      0 24px 60px rgba(5, 10, 20, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.56),
      inset 0 -28px 40px rgba(255, 255, 255, 0.08),
      inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  }

  .asw-lw-content {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px 14px 16px;
  }

  .asw-lw-stage {
    --asw-lw-size: clamp(260px, calc(100vw - 72px), 326px);
    --asw-lw-label-radius: calc(var(--asw-lw-size) * 0.332);
    --asw-lw-label-width: clamp(
      72px,
      calc((var(--asw-lw-size) * 3.1416 / var(--asw-lw-count)) * 0.52),
      108px
    );
  }

  .asw-lw-label-shell {
    width: 100%;
  }

  .asw-lw-label-text {
    min-height: clamp(54px, calc(var(--asw-lw-size) * 0.18), 76px);
  }

  .asw-lw-label-primary {
    font-size: clamp(1.08rem, 4.8vw, 1.56rem);
  }

  .asw-lw-label-secondary {
    font-size: clamp(0.68rem, 2.75vw, 0.84rem);
  }

  .asw-lw-copy {
    padding: 18px 16px 20px;
    text-align: center;
    border-radius: 18px;
  }

  .asw-lw-copy h2 {
    font-size: 1.65rem;
  }

  .asw-lw-code-row {
    flex-direction: column;
  }

  .asw-lw-code-row code,
  .asw-lw-code-row button {
    width: 100%;
  }

  .asw-lw-pointer {
    bottom: -10px;
    border-right-width: 16px;
    border-left-width: 16px;
    border-bottom-width: 32px;
  }
}
