@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@600;800&display=swap');

* {
    font-family: 'Manrope', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: 0.3s;
}

body {
    --background-color: hsl(230, 100%, 99%);
    --color-primary: hsl(174, 86%, 45%);
    --color-primary-variant: hsl(174, 77%, 80%);
    --color-white: hsl(0, 0%, 100%);
    --color-black: black;
    --color-text: hsl(227, 35%, 25%);
    --color-text-variant: hsl(225, 20%, 60%);
    --color-text-variant2: hsl(225, 20%, 60%);
    --color-discount-background: hsl(14, 92%, 95%);
    --color-discount-text: hsl(15, 100%, 70%);
}

body.dark-theme {
    --background-color: #191d1c;
    --color-primary: #3c636e;
    --color-primary-variant: #3c636e;
    --color-white: black;
    --color-black: white;
    --color-text: #314561;
    --color-text-variant: hsl(225, 20%, 60%);
    --color-text-variant2: #2b2e30;
    --color-discount-background: #3e1103;
    --color-discount-text: #dc7451;
}

body {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    overflow-x: hidden;
    background: var(--background-color);
}

#darkmode-toggle {
    position: absolute;
    top: 0;
    right: 0;
    display: none;
}

.darkmode>label {
    position: absolute;
    width: 80px;
    height: 40px;
    display: block;
    background: var(--color-text-variant);
    border-radius: 25px;
    top: 20px;
    right: 20px;
    cursor: pointer;
    transition: 0.4s;
}

.darkmode>label::after {
    content: "";
    width: 30px;
    height: 30px;
    position: absolute;
    top: 5px;
    left: 5px;
    background: linear-gradient(180deg, #ffca89, #d8860b);
    border-radius: 20px;
    transition: 0.4s;

}

.darkmode>input:checked+label {
    background: #242424;
}

.darkmode>input:checked+label::after {
    left: 75px;
    transform: translateX(-100%);
    background: linear-gradient(180deg, #777, #3a3a3a);
}

.darkmode>label:active::after {
    width: 40px;
}

.darkmode>input:checked+body {
    background: black;
}

.bg__pattern {
    z-index: -2;
    position: absolute;
    top: 0;
    width: 100%;
    height: 55%;
}

.pattern__circles {
    position: absolute;
    z-index: -2;
    top: 8%;
    left: 45%;
}

.heading {
    display: flex;
    margin-top: 6rem;
    flex-direction: column;
    background: transparent;
    justify-content: center;
    align-items: center;
}

.heading>h1 {
    background: transparent;
    text-align: center;
    color: var(--color-text);
}

.heading>h4 {
    display: flex;
    gap: 10px;
    text-align: center;
    color: var(--color-text-variant);
    margin-top: 0.5rem;
    font-weight: 300;
}

.heading>img {
    display: flex;
    position: absolute;
    align-items: center;
    justify-content: center;
}

.container {
    background: var(--color-white);
    margin-top: 4rem;
    width: 600px;
    height: 450px;
    border-radius: 10px;
    box-shadow: 0 15px 20px rgb(0 0 0 / 3%);
}

.card,
.card__footer {
    padding: 3rem 3rem 2rem 3rem;
}

.card__header {
    display: flex;
    position: relative;
    text-transform: capitalize;
    justify-content: space-between;
}

.pageviews {
    color: var(--color-text-variant);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.card_amount {
    display: flex;
    color: var(--color-text);
    font-weight: 600;
    text-transform: lowercase;
    gap: 10px;
}

.card_amount>.amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-text);
    margin-top: -25px;
}

.slider {
    margin: 2.5rem 0 2.5rem 0;
    text-align: center;
}

.slider>input[type="range"] {
    position: relative;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    outline: none;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg, hsl(174, 77%, 80%) 0%, hsl(224, 65%, 95%) 0%);
}

.track-inner {
    width: 0;
    height: 100%;
    background: yellow;
}

.slider>input[type="range"]::-webkit-slider-runnable-track {
    -webkit-appearance: none;

}

.slider>input[type="range"]::-moz-range-track {
    -moz-appearance: none;

}

.slider>input[type="range"]::-ms-track {
    appearance: none;

}

.slider>input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 50px;
    width: 50px;
    border-radius: 50%;
    background-color: var(--color-primary);
    background-image: url(./images/icon-slider.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 2rem;
    cursor: pointer;
    box-shadow: 0 15px 40px var(--color-primary);
}

.slider>input[type="range"]:active::-webkit-slider-thumb {
    background-color: rgb(18, 154, 140);
    cursor: grabbing;
}


.slider>input[type="range"]::-moz-range-thumb {
    -moz-appearance: none;
    height: 50px;
    width: 50px;
    border-radius: 50%;
    background: var(--color-primary);
    background-image: url(./images/icon-slider.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 2rem;
    cursor: pointer;
    box-shadow: 0 15px 40px var(--color-primary);
}

.slider>input[type="range"]::-ms-thumb {
    appearance: none;
    height: 50px;
    width: 50px;
    border-radius: 50%;
    background: var(--color-primary);
    background-image: url(./images/icon-slider.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 2rem;
    cursor: pointer;
    box-shadow: 0 15px 40px var(--color-primary);
}

.billing_container {
    position: relative;
    margin-bottom: 1rem;
}


.billing {
    position: relative;
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem
}

.billing>h4 {
    color: var(--color-text-variant);
    margin-top: 0.5rem;
    font-weight: 100;
}

.switch {
    position: relative;
    top: 3px;
    width: 55px;
    height: 25px;
}

.switch>input {
    display: none;
}

.switch_slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-text-variant2);
    border-radius: 35px;
}

.switch_slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: var(--color-white);
    transition: 0.4s;
    border-radius: 50px;
}

.switch>input:checked+.switch_slider,
.switch_slider:hover {
    background-color: var(--color-primary);
}

.switch>input:checked+.switch_slider::before {
    transform: translateX(30px);
}

.discount {
    background: var(--color-discount-background);
    position: absolute;
    padding: 2px 8px;
    right: 0;
    top: 8px;
    font-size: 13px;
    color: var(--color-discount-text);
    border-radius: 20px;
}

hr {
    height: 1px;
    background-color: var(--color-text-variant2);
    border: none;
}

.card__footer {
    display: flex;
    justify-content: space-between;
}

.description {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 15px;

}

.description__details {
    display: flex;
    gap: 1rem;
}

.description__details>img {
    margin-top: 6px;
    width: 10px;
    height: 10px;
}

.description__details>p {
    color: var(--color-text-variant);
}

.button>button {
    border: none;
    margin: 1rem 1rem;
    padding: 0.8rem 3rem;
    color: var(--color-text-variant2);
    background: var(--color-text);
    border-radius: 25px;
    cursor: pointer;
}

.button>button:hover {
    color: var(--color-white);
}

.discount_sm {
    display: none;
}

.attribution {
    display: flex;
    gap: 0.5rem;
    font-size: 11px;
    text-align: center;
    position: relative;
    margin-top: 30px;
    color: var(--color-black);
}

.attribution a {
    color: hsl(228, 45%, 44%);
}

@media screen and (max-width: 700px) {
    .pattern__circles {
        left: 40%;
    }

    .container {
        width: 90%;
        height: 550px;
        justify-content: center;
        text-align: center;
        align-items: center;
    }

    .heading>h4 {
        flex-direction: column;
    }

    .card__header {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .card_amount {
        position: absolute;
        top: 9rem;
    }

    .billing_container {
        top: 5rem;
    }

    .card,
    .card__footer {
        padding: 3rem 1rem 2rem 1rem;
    }

    hr {
        position: relative;
        top: 4rem;
    }

    .card__footer {
        position: relative;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        top: 4rem;
    }

}

@media screen and (max-width: 600px) {
    .billing_container>p {
        display: none;
    }

    .discount_sm {
        display: inline;
    }
}

@media screen and (max-width: 460px) {
    .heading>h1 {
        font-size: 1.5rem;
    }

    .attribution {
        flex-direction: column;
    }

    .discount {
        display: block;
        top: 0.3rem;
        right: -7.5rem;
    }

    .discount_sm {
        display: inline;
        position: absolute;
    }

    hr {
        top: 5rem;
    }
}