@import url('font.css');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-default);
    font-weight: var(--font-weight-400);
    background: #fee440;
    background: radial-gradient(circle, #FAFFAF 0%, #3FA2F6 100%);
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 100vh;
}

.deal-wheel {
    --size: clamp(250px, 85vmin, 700px);
    --lg-hs: 10 -330%;
    --lg-stop: 50%;
    --lg: linear-gradient(#4A628A 0 var(--lg-stop),
            hsl(var(--lg-hs) 20%) var(--lg-stop) 100%);

    position: relative;
    display: grid;
    grid-gap: calc(var(--size) / 20);
    padding: 2em 0 0;
    align-items: center;
    justify-content: center;
    grid-template-areas:
        "spinner"
        "trigger";
    font-family: "Girassol", sans-serif;
    font-size: calc(var(--size) / 21);
    line-height: 1;
    text-transform: uppercase;
    font-weight: var(--font-weight-700);
    filter: drop-shadow(0px 12px 20px rgba(15, 103, 177, 0.4));
    overflow: hidden;
}

.deal-wheel>* {
    grid-area: spinner;
}

.deal-wheel .btn-spin {
    grid-area: spinner;
    justify-self: center;
}

.spinner {
    position: relative;
    display: grid;
    align-items: center;
    grid-template-areas: "spinner";
    width: var(--size);
    height: var(--size);
    transform: rotate(calc(var(--rotate, 25) * 1deg));
    border-radius: 50%;
    box-shadow: inset 0 0 10px calc(var(--size) / 40) rgba(250, 255, 176, 0);
}

.spinner::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    border: 15px solid hsl(6.33deg 1.27% 86.09%);
    box-shadow: inset 0 0 0px calc(var(--size) / 90) #3FA2F6;
    pointer-events: none;
    z-index: 0;
}

.spinner * {
    grid-area: spinner;
}

.prize {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 calc(var(--size) / 6) 0 calc(var(--size) / 20);
    width: 50%;
    height: 50%;
    transform-origin: center right;
    transform: rotate(var(--rotate));
    user-select: none;
}

.ticker {
    position: relative;
    left: calc(var(--size) / -15);
    width: calc(var(--size) / 10);
    height: calc(var(--size) / 20);
    background: var(--lg);
    z-index: 1;
    clip-path: polygon(20% 0, 100% 50%, 20% 100%, 0% 50%);
    transform-origin: center left;
}

.cap {
    --cap-size: calc(var(--size) / 4);
    position: relative;
    justify-self: center;
    width: var(--cap-size);
    height: var(--cap-size);
}

.btn-spin {
    --cap-size: calc(var(--size) / 4);
    position: relative;
    justify-self: center;
    width: var(--cap-size);
    height: var(--cap-size);

    color: hsl(0deg 0% 100%);
    background: var(--lg);
    border: none;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    text-transform: inherit;
    border-radius: 50%;
    cursor: pointer;
    transition: all 200ms ease-out;
    filter: drop-shadow(0px 7px 2px rgba(0, 0, 0, 0.3));
}

.btn-spin:focus {
    outline-offset: 2px;
}

.btn-spin:active {
    transform: translateY(1px);
}

.btn-spin:disabled {
    cursor: progress;
    /* opacity: 0.25; */
    color: hsl(0, 0%, 84%);
}

/* Spinning animation */
.is-spinning .spinner {
    transition: transform 8s cubic-bezier(0.1, -0.01, 0, 1);
}

.is-spinning .ticker {
    animation: tick 700ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.image {
    margin: 0 auto;
    text-align: center;
}
.image img {
    max-width: 300px;
    width: 100%;
    height: auto;
}

@keyframes tick {
    40% {
        transform: rotate(-12deg);
    }
}

/* Selected prize animation */
.prize.selected .text {
    color: white;
    animation: selected 800ms ease;
}

.count {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100px;
    background-color: azure;
    width: 50px;
    height: 20px;
    color: black;
    font-size: 1.5rem;
    line-height: 1em;
}

@keyframes selected {
    25% {
        transform: scale(1.25);
        text-shadow: 1vmin 1vmin 0 hsla(0 0% 0% / 0.1);
    }

    40% {
        transform: scale(0.92);
        text-shadow: 0 0 0 hsla(0 0% 0% / 0.2);
    }

    60% {
        transform: scale(1.02);
        text-shadow: 0.5vmin 0.5vmin 0 hsla(0 0% 0% / 0.1);
    }

    75% {
        transform: scale(0.98);
    }

    85% {
        transform: scale(1);
    }
}

.group {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 20px;
}

.group .group-inp {
    position: relative;
    flex: 0 0 100%;
    margin: 5px 0 20px;
}

.group .group-inp input {
    position: relative;
    width: 100%;
    padding: 10px;
    border-radius: 100px;
    display: block;
    border: 2px solid #fff;
    background-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 16px;
    transition: all 0.3s;
}

.group .group-inp input:focus,
.group .group-inp input:not(:placeholder-shown) {
    outline: none;
    border-color: #fff;
}

.group .title {
    position: relative;
    color: #ffffff;
    transition: all 0.3s ease;
    z-index: 1;
}

.group .group-inp input:-webkit-autofill,
.group .group-inp input:-webkit-autofill:hover,
.group .group-inp input:-webkit-autofill:focus,
.group .group-inp input:-webkit-autofill:active {
    color: #fff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: #fff;
    transition: background-color 5000s ease-in-out 0s;
    box-shadow: none;
}

.button {
    position: absolute;
    top: 0;
    right: 0;
    align-items: center;
    appearance: none;
    background-color: #FCFCFD;
    border-radius: 0 100px 100px 0;
    border-width: 0;
    box-shadow: rgba(45, 35, 66, 0.4) 0 2px 4px, rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #D6D6E7 0 -3px 0 inset;
    box-sizing: border-box;
    color: #36395A;
    cursor: pointer;
    display: inline-flex;
    width: 90px;
    height: 100%;
    justify-content: center;
    line-height: 1;
    list-style: none;
    overflow: hidden;
    padding-left: 16px;
    padding-right: 16px;
    text-align: left;
    text-decoration: none;
    transition: box-shadow .15s, transform .15s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    white-space: nowrap;
    will-change: box-shadow, transform;
    font-size: 16px;
}

.button:focus {
    box-shadow: #D6D6E7 0 0 0 1.5px inset, rgba(45, 35, 66, 0.4) 0 2px 4px, rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #D6D6E7 0 -3px 0 inset;
}

.button:hover {
    /* box-shadow: rgba(45, 35, 66, 0.4) 0 4px 8px, rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #D6D6E7 0 -3px 0 inset; */
    /* transform: translateY(-2px); */
}

.button:active {
    box-shadow: #D6D6E7 0 3px 7px inset;
    /* transform: translateY(2px); */
}

svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    pointer-events: none;
    z-index: -1;
}

.sweet-container {
    padding: 2rem 0 0;
}
.sweet-title {
    order: 2;
    color: #fde9ff;
    font-weight: 900;
    text-transform: uppercase;
    font-size: clamp(3rem, 10vw, 6rem);
    line-height: 0.75em;
    text-align: center;
    text-shadow: 3px 1px 1px #4af7ff, 2px 2px 1px #165bfb, 4px 2px 1px #4af7ff, 3px 3px 1px #165bfb, 5px 3px 1px #4af7ff, 4px 4px 1px #165bfb, 6px 4px 1px #4af7ff, 5px 5px 1px #165bfb, 7px 5px 1px #4af7ff, 6px 6px 1px #165bfb, 8px 6px 1px #4af7ff, 7px 7px 1px #165bfb, 9px 7px 1px #4af7ff;
}

.sweet-title span {
    display: block;
    position: relative;
}

.sweet-title span:before {
    content: attr(data-text);
    position: absolute;
    text-shadow: 2px 2px 1px #e94aa1, -1px -1px 1px #c736f9, -2px 2px 1px #e94aa1, 1px -1px 1px #f736f9;
    z-index: 1;
}

.sweet-title span:nth-child(1) {
    padding-right: 2.25rem;
}

.sweet-title span:nth-child(2) {
    padding-left: 2.25rem;
}

.bottom-title {
    text-align: center;
    display: block;
    color: #fff;
    font-size: clamp(1rem, 4vw, 1.5rem);
    margin-top: 0.5rem;
    padding-left: 2rem;
}

@media (max-width: 767px) {
    .spinner::before {
        border-width: 8px;
    }
    .deal-wheel {
        --size: clamp(250px, 50vmin, 350px);
    }
    .sweet-title {
    font-size: 2.5em;
    }
}

.deal-detail {
    padding: 1rem;
    margin: 1rem;
}
.deal-detail ol {
    margin-left: 2rem;
}
.deal-detail p {
    font-weight: bold;
}