.zakrec {
  position: fixed;
  inset: 0;
  z-index: 10150;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  pointer-events: none;
  visibility: hidden;
}

.zakrec.is-open {
  pointer-events: auto;
  visibility: visible;
}

body.is-zakrec-open {
  overflow: hidden;
}

.zakrec__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(10, 10, 10, 0.42);
  opacity: 0;
  cursor: pointer;
  transition: opacity 320ms ease;
}

.zakrec.is-open .zakrec__backdrop {
  opacity: 1;
}

.zakrec__card {
  position: relative;
  z-index: 1;
  width: min(calc(100vw - 32px), 440px);
  padding: 28px 24px 22px;
  border: 1px solid rgba(10, 10, 10, 0.08);
  border-radius: 24px;
  background: #fbfaf7;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 8px 24px rgba(10, 10, 10, 0.08), 0 32px 64px rgba(10, 10, 10, 0.14);
  text-align: center;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
}

.zakrec.is-open .zakrec__card {
  animation: zakrec-in 480ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes zakrec-in {
  to {
    opacity: 1;
    transform: none;
  }
}

.zakrec__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.05);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.zakrec__eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.zakrec__title {
  margin: 0 0 8px;
  font-family: var(--font-display, inherit);
  font-size: clamp(26px, 6vw, 32px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.zakrec__text {
  margin: 0 0 18px;
  color: var(--voitkus-gray-dark, #3a3a3a);
  font-size: 15px;
  line-height: 1.5;
}

.zakrec .wheel {
  position: relative;
  width: min(78vw, 340px);
  height: min(78vw, 340px);
  max-width: 100%;
  margin: 16px auto 18px;
}

.zakrec .wheel__shadow {
  position: absolute;
  inset: 8% -2% -10%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 70%, rgba(20, 16, 10, 0.28), transparent 62%);
  filter: blur(10px);
}

.zakrec .wheel__bezel {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 50%;
  background: conic-gradient(
    from 210deg,
    #f4f1ea,
    #9a958c 8%,
    #d8d3c8 14%,
    #6f6a62 22%,
    #ece7dc 32%,
    #8b8680 40%,
    #f7f3ea 48%,
    #5c5852 58%,
    #ddd8ce 68%,
    #a39e94 78%,
    #f0ebe3 88%,
    #7a756c 94%,
    #f4f1ea
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 -8px 16px rgba(0, 0, 0, 0.18) inset,
    0 18px 28px rgba(30, 24, 16, 0.18);
}

.zakrec .wheel__bezel::after {
  content: "";
  position: absolute;
  inset: 4.6%;
  border-radius: 50%;
  background: #1a1814;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset;
}

.zakrec .wheel__spin {
  position: absolute;
  inset: 6.2%;
  z-index: 2;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  will-change: transform;
}

.zakrec .wheel__spin.is-spinning {
  transition: transform 5.1s cubic-bezier(0.16, 0.8, 0.2, 1);
}

.zakrec .wheel__spin svg {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
}

.zakrec .wheel__spin.is-waiting svg {
  animation: zakrec-wind 0.38s linear infinite;
}

@keyframes zakrec-wind {
  to {
    transform: rotate(360deg);
  }
}

.zakrec .wheel__glass {
  position: absolute;
  inset: 6.2%;
  z-index: 5;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.38), transparent 34%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.16), transparent 42%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2) inset,
    0 10px 18px rgba(0, 0, 0, 0.08) inset;
}

.zakrec .wheel__hub {
  position: absolute;
  inset: 35%;
  z-index: 6;
  border-radius: 50%;
  background: conic-gradient(
    from 130deg,
    #eeeae3,
    #8d8982 12%,
    #f4f0e8 22%,
    #5e5a54 38%,
    #d9d4cb 52%,
    #9b968e 64%,
    #f6f2ea 78%,
    #6a6660
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 -6px 10px rgba(0, 0, 0, 0.22) inset,
    0 10px 18px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.zakrec .wheel__hub-ring {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 32%, #3a3834, #111 70%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 6px 10px rgba(0, 0, 0, 0.35);
}

.zakrec .wheel__hub-v {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #c8f5b8;
  font-size: clamp(16px, 4.6vw, 20px);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-shadow: 0 0 10px rgba(200, 245, 184, 0.45);
}

.zakrec .wheel__screw {
  position: absolute;
  top: 50%;
  width: 9%;
  height: 9%;
  margin-top: -4.5%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d7d3cc, #6c6862 55%, #3f3c38);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.zakrec .wheel__screw::after {
  content: "";
  position: absolute;
  inset: 38% 18%;
  background: #2a2824;
  transform: rotate(18deg);
}

.zakrec .wheel__screw--l {
  left: 6%;
}

.zakrec .wheel__screw--r {
  right: 6%;
}

.zakrec .wheel__pin {
  position: absolute;
  top: 3.4%;
  left: 50%;
  z-index: 8;
  width: 14px;
  height: 28px;
  margin-left: -7px;
  overflow: visible;
  pointer-events: none;
}

.zakrec svg.wheel__pin {
  width: 14px !important;
  height: 28px !important;
}

.zakrec__cta {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: 999px;
  background: var(--voitkus-black, #0a0a0a);
  color: #fff;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.zakrec__cta:disabled {
  opacity: 0.45;
  cursor: default;
}

.zakrec__cta:hover:not(:disabled) {
  opacity: 0.82;
}

.zakrec__skip {
  margin-top: 8px;
  border: 0;
  background: none;
  color: var(--voitkus-gray, #6b6b6b);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.zakrec__error {
  margin: 0 0 10px;
  color: #9b1c1c;
  font-size: 13px;
}

.zakrec__views > * {
  display: none;
}

.zakrec[data-view="idle"] .view-idle,
.zakrec[data-view="spin"] .view-idle,
.zakrec[data-view="result"] .view-result {
  display: block;
}

.zakrec__badge {
  display: inline-flex;
  margin: 4px auto 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--voitkus-black, #0a0a0a);
  color: #dff2d6;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.zakrec__urgency {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--voitkus-gray-dark, #3a3a3a);
}

.zakrec__next {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--voitkus-gray, #6b6b6b);
}

.zakrec__code {
  margin: 0 0 16px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--voitkus-gray, #6b6b6b);
}

.zakrec__code strong {
  display: block;
  margin-top: 4px;
  color: var(--voitkus-black, #0a0a0a);
  font-size: 15px;
  letter-spacing: 0.08em;
}

@media (prefers-reduced-motion: reduce) {
  .zakrec.is-open .zakrec__card {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .zakrec .wheel__spin.is-spinning {
    transition: none;
  }

  .zakrec .wheel__spin.is-waiting svg {
    animation: none;
  }
}
