.ht-wheel-entry[hidden],
.ht-wheel-entry [hidden] {
    display: none !important;
}

.ht-wheel-entry {
    margin-inline: auto;
    max-inline-size: 1200px;
    padding: 12px clamp(16px, 4vw, 32px);
}

.ht-wheel-dialog {
    --ht-wheel-red: #d71920;
    --ht-wheel-ink: #111313;
    background: #fff;
    border: 0;
    border-radius: 16px;
    color: var(--ht-wheel-ink);
    inline-size: min(92vw, 760px);
    max-block-size: 92dvh;
    max-inline-size: none;
    padding: 0;
}

.ht-wheel-dialog::backdrop {
    background: rgb(17 19 19 / 66%);
}

.ht-wheel-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    position: relative;
}

.ht-wheel-content {
    align-self: center;
    min-inline-size: 0;
    padding: 44px 28px;
}

.ht-wheel-content h2 {
    margin-block: 0 10px;
    overflow-wrap: anywhere;
}

.ht-wheel-stage {
    align-self: center;
    aspect-ratio: 1;
    direction: ltr;
    inline-size: min(83%, 318px);
    margin: 36px auto;
    position: relative;
}

.ht-wheel-disc {
    background: #fff0f1;
    border: 5px solid var(--ht-wheel-ink);
    border-radius: 50%;
    inset: 0;
    position: absolute;
    transition: transform 2.25s cubic-bezier(.12,.65,.16,1);
}

.ht-wheel-disc::before {
    border: 2px solid rgb(255 255 255 / 65%);
    border-radius: inherit;
    content: '';
    inset: 4px;
    pointer-events: none;
    position: absolute;
}

.ht-wheel-disc--immediate {
    transition: none;
}

.ht-wheel-hub {
    background: var(--ht-wheel-ink);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: inset 0 0 0 4px var(--ht-wheel-red);
    inset: 42.5%;
    position: absolute;
}

.ht-wheel-pointer {
    background: #fff;
    block-size: 30px;
    clip-path: polygon(0 0, 100% 0, 100% 26%, 50% 100%, 0 26%);
    inline-size: 28px;
    left: 50%;
    position: absolute;
    top: -8px;
    transform: translateX(-50%);
}

.ht-wheel-pointer::before {
    background: #a41319;
    clip-path: inherit;
    content: '';
    inset: 2px 3px 4px;
    position: absolute;
}

.ht-wheel-icon {
    fill: none;
    flex: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.ht-wheel-sector-icon {
    block-size: auto;
    color: #fff;
    inline-size: 11%;
    position: absolute;
    transform: translate(-50%, -50%) rotate(var(--ht-wheel-counter-rotation, 0deg));
}

.ht-wheel-sector-icon[data-sector-type="none"] {
    color: #a41319;
}

.ht-wheel-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 12px;
    list-style: none;
    margin: 15px 0 21px;
    padding: 0;
}

.ht-wheel-legend li {
    align-items: center;
    color: var(--ht-wheel-ink);
    display: flex;
    font-size: 13px;
    gap: 6px;
    line-height: 1.45;
    margin: 0;
}

.ht-wheel-legend .ht-wheel-icon {
    background: var(--ht-wheel-ink);
    border-radius: 5px;
    box-sizing: content-box;
    color: #fff;
    inline-size: 15px;
    padding: 4px;
}

.ht-wheel-legend [data-sector-type="coupon"] .ht-wheel-icon {
    background: var(--ht-wheel-red);
}

.ht-wheel-legend [data-sector-type="none"] .ht-wheel-icon {
    background: #fff0f1;
    color: #a41319;
}

.ht-wheel-close {
    background: #fff;
    border: 1px solid #d9dde3;
    border-radius: 50%;
    color: #111313;
    font-size: 24px;
    inline-size: 44px;
    inset-block-start: 8px;
    inset-inline-end: 8px;
    min-block-size: 44px;
    padding: 0;
    position: absolute;
    z-index: 1;
}

.ht-wheel-code {
    align-items: center;
    background: #f6f7f9;
    border: 1px dashed #858a91;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: space-between;
    margin-block: 8px;
    padding: 8px;
}

.ht-wheel-code bdi {
    font-weight: 700;
    overflow-wrap: anywhere;
    user-select: all;
}

.ht-wheel-feedback {
    margin-block: 10px 0;
}

.ht-wheel-feedback:empty {
    display: none;
}

@media (max-width: 620px) {
    .ht-wheel-panel {
        grid-template-columns: 1fr;
    }

    .ht-wheel-stage {
        inline-size: min(64vw, 246px);
        margin-block: 19px 4px;
    }

    .ht-wheel-content {
        padding: 12px 20px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ht-wheel-disc {
        transition: none;
    }
}

.ht-wheel-disc--result::after {
    background: conic-gradient(from var(--ht-wheel-winner-start), #fff var(--ht-wheel-winner-end), transparent 0);
    border-radius: 50%;
    content: '';
    filter: drop-shadow(0 0 2px #111313);
    inset: 4px;
    mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
    pointer-events: none;
    position: absolute;
}
