:root {
    --main-background: hsl(230, 100%, 99%);
    --pricing-component-background: hsl(0, 0%, 100%);
    --cta-text: hsl(226, 100%, 87%);
    --dark-blue: hsl(227, 35%, 25%);
    --text: hsl(225, 20%, 60%);
    --empty-slider-bar: hsl(224, 65%, 95%);
    --full-slider-bar: hsl(174, 77%, 80%);
    --empty-slider-bar: hsl(224, 65%, 95%);
    --thumb-bg: hsl(174, 86%, 45%);
    --toggle-bg: hsl(223, 50%, 87%);
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    font-family: 'Kumbh Sans', sans-serif;
    color: var(--text);
    font-family: 'Manrope', sans-serif;
    color: var(--text);
}

html {
    background: var(--main-background);
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: url(images/bg-pattern.svg);
    background-repeat: no-repeat;
    height: 100vh;
}

header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 30vh;
}

header strong {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--dark-blue);
    margin-top: 4vh;
    margin: 2vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

header p {
    font-weight: 600;
    font-size: 0.8rem;
}

header img {
    position: absolute;
    z-index: -1;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pricing {
    width: 40vw;
    min-width: 400px;
    height: 50vh;
    background: var(--pricing-component-background);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.11);
    border-radius: 10px;
}

.pageprices {
    font-size: 0.9rem;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    height: 30%;
}

.pageviews {
    text-transform: uppercase;
    font-weight: 800;
}

.slider-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 20%;
}

.slider {
    background: linear-gradient(to right, var(--full-slider-bar) 0%, var(--full-slider-bar) 50%, var(--empty-slider-bar) 50%, var(--empty-slider-bar) 100%);
    border-radius: 8px;
    height: 7px;
    width: 90%;
    outline: none;
    transition: background 450ms ease-in;
    -webkit-appearance: none;
    cursor: pointer;
}

.slider:hover {
    opacity: 1;
    /* Fully shown on mouse-over */
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background-color: var(--thumb-bg);
    background-position: center;
    background-image: url('images/icon-slider.svg');
    background-repeat: no-repeat;
    box-shadow: 0 0 10px var(--thumb-bg);
    cursor: pointer;
    position: relative;
}

.slider::-moz-range-thumb {
    width: 2px;
    height: 25px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background-color: var(--thumb-bg);
    background-position: center;
    background-image: url('images/icon-slider.svg');
    background-repeat: no-repeat;
    box-shadow: 0 0 10px var(--thumb-bg);
    cursor: pointer;
    position: relative;
}

.prices strong {
    font-weight: 800;
    font-size: 2rem;
    color: var(--dark-blue);
    width: 4rem;
}

.monthly-or-year {
    display: grid;
    grid-template-columns: 1fr 3.5rem 1fr;
    justify-content: center;
    font-size: 0.8rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.monthly {
    display: flex;
    justify-content: flex-end;
}

.yearly {
    display: flex;
    flex-direction: row;
}

.discount {
    background: hsl(14, 92%, 95%);
    color: hsl(15, 100%, 70%);
    width: fit-content;
    font-size: 0.7rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    margin-left: 0.35rem;
    margin-right: 0.35rem;
}

.discount span{
    color: hsl(15, 100%, 70%);

}


.toggle {
    --toggle-width: 2.5rem;
    --toggle-height: calc(var(--toggle-width) / 2);
    --toggle-border-radius: calc(var(--toggle-height) / 2);
    display: flex;
    justify-content: center;
    cursor: pointer;
}

.toggle__input {
    display: none;
}

.toggle__fill {
    position: relative;
    width: var(--toggle-width);
    height: var(--toggle-height);
    border-radius: var(--toggle-border-radius);
    background: var(--toggle-bg);
    transition: background .5s;
}

.toggle__input:checked~.toggle__fill {
    background: var(--thumb-bg);
}

.toggle__fill::after {
    content: "";
    height: var(--toggle-height);
    width: var(--toggle-height);
    border-radius: var(--toggle-border-radius);
    position: absolute;
    top: 0;
    left: 0;
    background: var(--pricing-component-background);
    transition: .5s;
    box-sizing: border-box;
    border: 3px solid var(--toggle-bg);
}

.toggle__input:checked~.toggle__fill::after {
    transform: translateX(var(--toggle-height));
    border: 3px solid var(--thumb-bg);
}

.bottom-div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--toggle-bg);
    padding: 1rem;
}

.checkboxes-wrapper {
    padding-left: 20%;
    font-size: 0.8rem;
}

.button-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.button-wrapper button {
    background: var(--dark-blue);
    color: var(--toggle-bg);
    height: 2.5rem;
    width: 60%;
    border: none;
    border-radius: 1.25rem;
    transition: 0.2s;
    cursor: pointer;
}

.button-wrapper button:hover {
    background: var(--thumb-bg);
    color: var(--pricing-component-background);
}

.attribution {
    position: relative;
    top: 10vh;
    font-size: 11px;
    text-align: center;
}

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

@keyframes changecolor {
    0% {
        color: var(--thumb-bg);
    }
    100% {
        color: var(--text);
    }
}

@keyframes changecolor-prices {
    0% {
        color: var(--thumb-bg);
    }
    100% {
        color: var(--dark-blue);
    }
}

@media screen and (max-width: 460px) {
    header strong{
        font-size: 1.3rem;
    }
    header p{
        padding: 5vw;
        text-align: center;

    }

    .pricing{
        min-width: 0;
        width: 90vw;
        height: 60vh;
    }
    .discount{
        height: 1rem;
    }
    .discount::after{
        content: '-25%';
    }
    .discount span{
        display: none;
    }
    .bottom-div{
        display: flex;
        flex-direction: column;
    }
    
    .button-wrapper button {
        margin: 1rem;
    }
    
    .attribution{
        top: 5vh;
    }
    .pageprices{
        height: 20%;
    }
    .checkboxes-wrapper{
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}