:root {
    /* Primary Color */
    --soft-cyan: hsl(174, 77%, 80%); /* Full Slider Bar */
    --strong-cyan: hsl(174, 86%, 45%); /* Slider Background */
    --light-grayish-red: hsl(14, 92%, 95%); /* Discount Background */
    --light-red: hsl(15, 100%, 70%); /* Discount Text */ 
    --pale-blue: hsl(226, 100%, 87%); /* CTA Text */

    /* Neutral Color */
    --white: hsl(0, 0%, 100%); /* Pricing Component Background */
    --very-pale-blue: hsl(230, 100%, 99%); /* Main Background */
    --light-grayish-blue: hsl(224, 65%, 95%); /* Empty Slider Bar */
    --light-grayish-blue2: hsl(223, 50%, 87%); /* Toggle Background */
    --grayish-blue: hsl(225, 20%, 60%); /* Text */
    --dark-desaturated-blue: hsl(227, 35%, 25%); /* Text & CTA Background */

    /* Font settings */
    --ff: "Manrope", sans-serif;
    --fw-600: 600;
    --fw-800: 800; 
}

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

body {
    font-family: var(--ff);
    background-color: var(--very-pale-blue);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-right: 1rem;
}


/* HEAD CONTAINER */    

.head-container {
    position: relative;
    width: 100%;
}

.background-circles {
    position: absolute;
    left: 30%;
    top: 10%;
}

.header-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    left: 13%;
    top: 17%;
    text-align: center;
}

.pricing-header {
    color: var(--dark-desaturated-blue);
    font-size: 1.2rem;
    font-weight: var(--fw-800);
    padding-bottom: 0.8rem;
}

.pricing-text {
    color: var(--grayish-blue);
    font-size: 0.8rem;
    font-weight: var(--fw-600);
    line-height: 1.2rem;
}

/* MAIN CONTAINER */

.main-content {
    background-color: var(--white);
    max-width: 350px;
    width: 100%;
    border-radius: 10px;
    position: relative;
    top: -12rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.page-views {
    color: var(--grayish-blue);
    font-weight: var(--fw-800);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* SLIDER */

.slider {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: var(--light-grayish-blue);
    border-radius: 5px;
    outline: none;
    margin-bottom: 1.5rem;
}

    .slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 36px;
    height: 36px;
    background: var(--strong-cyan);
    box-shadow: 0 10px 20px var(--strong-cyan);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: background 0.3s ease;
}

    .slider::-moz-range-thumb {
    width: 36px;
    height: 36px;
    background: var(--strong-cyan);
    box-shadow: 0 10px 20px var(--strong-cyan);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

    .slider::-webkit-slider-thumb:active {
    background-color: var(--soft-cyan);
}

.slider::-moz-range-thumb:active {
    background-color: var(--soft-cyan);
}


/* BILLING TOGGLE */

.price {
    color: var(--dark-desaturated-blue);
    font-size: 1.5rem;
    font-weight: var(--fw-800);
}

.price-month {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--grayish-blue);
    font-size: 0.8rem;
    font-weight: var(--fw-600);
    margin-bottom: 1.5rem;
}

.billing-toggle-wrapper {
    font-size: 0.7rem;
    font-weight: var(--fw-600);
    color: var(--grayish-blue);
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding-left: 3rem;
    margin-bottom: 1rem;
}

.billing-toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.slider-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 18px; 
    background-color: var(--light-grayish-blue2);
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-toggle::before {
    content: "";
    position: absolute;
    height: 14px;
    width: 14px;
    left: 2px;
    top: 2px;
    background-color: var(--white);
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
}

.discount-yearly {
    display: none;
}

.discount {
    font-size: 0.65rem;
    font-weight: var(--fw-800);
    background-color: var(--light-grayish-red);
    color: var(--light-red);
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
}

.divider {
    height: 1px;
    background-color: var(--light-grayish-blue2);
    width: 110%;
    margin-bottom: 2rem;
}

/* TOGGLE CHECKED */

.billing-toggle input[type="checkbox"]:checked + .slider-toggle {
    background-color: var(--strong-cyan);
}

.billing-toggle input[type="checkbox"]:checked + .slider-toggle::before {
    transform: translateX(20px);
}


/* FEATURES + BUTTON */

.pricing-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.feature {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding-bottom: 1rem;
    text-align: center;
}

ul > li > p {
    color: var(--grayish-blue);
    font-size: 0.7rem;
    font-weight: var(--fw-600);
}

.start-trial-button {
    background-color: var(--dark-desaturated-blue);
    color: var(--pale-blue);
    font-size: 0.7rem;
    font-weight: var(--fw-800);
    padding: 0.5rem 2rem;
    border: none;
    border-radius: 20px;
}

/* ATTRIBUTION */

.attribution {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    margin-top: -10rem;
}

.attribution > a {
    padding-left: 0.2rem;
}



/* DESKTOP SCREEN */

@media (min-width: 768px) {

    /* HEAD CONTAINER */

    .background {
        width: 100%;
    }

    .background-circles {
        left: 50%;
        top: 10%;
        transform: translateX(-50%);
        width: auto;
    }

    .header-text {
        left: 50%;
        top: 17%;
        transform: translateX(-50%);
        text-align: center;
    }

    .pricing-header {
        font-size: 2rem;
    }

    .pricing-text {
        font-size: 1rem;
    }

    /* MAIN CONTAINER */
    .main-content {
        max-width: 700px;
        padding: 3rem 4rem;
        top: -10rem;
        border-radius: 15px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    }

    /* PAGE VIEWS + PRICE */
    .views {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 2rem;
    }

    .page-views {
        font-size: 1.1rem;
    }

    .price-month {
        font-size: 1.2rem;
        gap: 0.5rem;
    }

    .price {
        font-size: 2.5rem;
    }

    /* SLIDER */
    .slider {
        margin-top: 1rem;
        margin-bottom: 2rem;
    }

    /* BILLING TOGGLE */
    .billing-toggle-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        margin-top: 2rem;
        margin-bottom: 2rem;
        font-size: 1rem;
    }

    .slider-toggle {
        width: 50px;
        height: 28px;
    }

    .slider-toggle::before {
        width: 20px;
        height: 20px;
        top: 4px;
        left: 4px;
    }

    .billing-toggle input[type="checkbox"]:checked + .slider-toggle::before {
        transform: translateX(22px);
    }

    .discount {
        font-size: 0.9rem;
        padding: 0.2rem 0.8rem;
    }

    .discount-yearly {
        display: inline;
    }

    /* DIVIDER */
    .divider {
        width: 122.5%;
        margin: 2rem 0;
    }

    /* FEATURES + BUTTON */
    .pricing-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 2rem;
    }

    .features {
        display: flex;
        flex-direction: column;
        margin-top: 1rem;
        gap: 0.8rem;
    }

    .feature p {
        font-size: 0.9rem;
    }

    .start-trial-button {
        font-size: 0.9rem;
        border-radius: 25px;
        padding: 1rem 4rem;
    }

    /* ATTRIBUTION */
    .attribution {
        margin-top: 1rem;
    }

}
