@font-face {
    font-family: 'Overpass';
    src: url('/assets/fonts/Overpass-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* CSS reset */

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    min-height: 100vh;
}

img,
picture,
svg,
video {
    display: block;
    max-width: 100%;
}

/* Colors */

:root {
    --orange-500: hsl(25, 97%, 53%);
    --white: hsl(0, 100%, 100%);
    --grey-500: hsl(217, 12%, 63%);
    --grey-900: hsl(213, 19%, 18%);
    --grey-950: hsl(216, 12%, 8%);
}

/* Typography */

body {
    font-family: 'Overpass', sans-serif;
    font-style: normal;
    font-feature-settings: 'liga' off, 'clig' off;
}

.card-title {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.875rem;

    @media screen and (min-width: 768px) {
        font-size: 1.75rem;
        line-height: 2.1875rem;
    }
}

.regular-paragraph {
    color: var(--grey-500);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.375rem;

    @media screen and (min-width: 768px) {
        font-size: 0.9375rem;
        line-height: 1.5rem;
    }
}

.score {
    color: var(--grey-500);
    font-size: 0.875rem;
    font-weight: 700;
    /*line-height: 1.125rem;*/
    /*letter-spacing: 0.11688rem;*/

    @media screen and (min-width: 768px) {
        font-size: 1rem;
        /*line-height: 1.5rem;*/
        /*letter-spacing: 0.0125rem;*/
    }
}

.button {
    color: var(--grey-950);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.125rem;
    letter-spacing: 0.11688rem;
    text-transform: uppercase;

    @media screen and (min-width: 768px) {
        font-weight: 600;
        line-height: 1.5rem;
        letter-spacing: 0.01063rem;
    }
}

.selection {
    color: var(--orange-500);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.375rem;

    @media screen and (min-width: 768px) {
        font-size: 0.9375rem;
        line-height: 1.5rem;
    }
}

/* General */

body {
    position: relative;
    background-color: var(--grey-950);
}

/* Card */

.card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 87.2%;
    max-width: 327px;
    background: radial-gradient(98.96% 98.96% at 50% 0%, #232A34 0%, #181E27 100%);
    border-radius: 15px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease-in-out;

    @media screen and (min-width: 768px) {
        gap: 32px;
        width: 53.7%;
        max-width: 412px;
        border-radius: 30px;
    }
}

.card.active {
    opacity: 1;
    pointer-events: auto;
}

/* Card - How did we do */

#how-did-we-do {
    padding: 28.5px 24px;

    @media screen and (min-width: 768px) {
        padding: 34.5px 32px;
    }

    .star-wrapper {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: var(--grey-900);
        display: flex;
        justify-content: center;
        align-items: center;

        @media screen and (min-width: 768px) {
            width: 48px;
            height: 48px;
        }

        img {
            width: 13.956px;
            height: 13.333px;

            @media screen and (min-width: 768px) {
                width: 16.747px;
                height: 16px;
            }
        }
    }

    .container {
        display: flex;
        flex-direction: column;
        gap: 16px;

        .score-wrapper {
            display: flex;
            justify-content: space-between;

            .score {
                display: flex;
                justify-content: center;
                align-items: center;
                width: 42px;
                height: 42px;
                border-radius: 50%;
                transition: all .3s ease-in-out;
                background-color: var(--grey-900);

                @media screen and (min-width: 768px) {
                    width: 51px;
                    height: 51px;
                }

                @media (hover: hover) {
                    &:hover,
                    &:focus,
                    &:active {
                        color: var(--grey-900);
                        background-color: var(--orange-500);
                        cursor: pointer;
                    }
                }

                input {
                    position: absolute;
                    opacity: 0;
                    width: 0;
                    height: 0;
                }
            }

            .score:has(input[type="radio"]:focus),
            .score:has(input[type="radio"]:checked) {
                color: var(--grey-900);
                background-color: var(--white);
                transition: all .3s ease-in-out;

                @media (hover: hover) {
                    &:hover {
                        background-color: var(--orange-500);
                        cursor: pointer;
                    }
                }
            }
        }
    }

    .button {
        height: 45px;
        background-color: var(--orange-500);
        border-radius: 22.5px;
        transition: all .3s ease-in-out;
        border: none;

        &:not(:disabled):hover,
        &:not(:disabled):focus,
        &:not(:disabled):active {
            background-color: var(--white);
        }

        @media (hover: hover) {
            &:hover {
                cursor: pointer;
            }
        }

        &:disabled {
            opacity: .5;
            cursor: not-allowed;
        }
    }
}

/* Card - Thank you */

#thank-you {
    align-items: center;
    padding: 36px 24px;

    @media screen and (min-width: 768px) {
        padding: 44.5px 32px;
    }

    img {
        width: 100%;
        max-width: 144px;

        @media screen and (min-width: 768px) {
            max-width: 162px;
        }
    }

    .selection {
        width: fit-content;
        height: 32px;
        padding: 2px 16px 0 16px;
        display: flex;
        align-items: center;
        border-radius: 22.5px;
        background-color: var(--grey-900);

        @media screen and (min-width: 768px) {
            padding: 2px 20px 0 20px;
        }
    }

    .container {
        text-align: center;
        display: flex;
        flex-direction: column;
        gap: 16px;

        p {
            @media screen and (min-width: 768px) {
                max-width: 340px;
                margin: 0 auto;
            }
        }
    }
}