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

:root{
    /* ### Primary */
--Soft-Cyan: hsl(174, 77%, 80%); /* (Full Slider Bar) */
--Strong-Cyan: hsl(174, 86%, 45%); /* (Slider Backround) */
--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 */
--White: hsl(0, 0%, 100%); /* (Pricing Component Background) */
--Very-Pale-Blue: hsl(230, 100%, 99%); /* (Main Background) */
--Light-Grayish-Blue-Slider: hsl(224, 65%, 95%); /* (Empty Slider Bar) */
--Light-Grayish-Blue-Toggle: hsl(223, 50%, 87%); /* (Toggle Background) */
--Grayish-Blue: hsl(225, 20%, 60%); /* (Text) */
--Dark-Desaturated-Blue: hsl(227, 35%, 25%); /* (Text & CTA Background) */
}

html{
    font-family: 'Manrope', sans-serif;
}

.sr-only{
    position: absolute;
    top: auto;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

body {
    min-height: 100vh;
    padding: 8.9rem 2.4rem 8.6rem;
    display: grid;
    place-items: start center;
    background: var(--Very-Pale-Blue);
    background: url("../images/bg-pattern.svg"), #f9faff;
    background-repeat: no-repeat;
    background-size: auto 400px;
}

.card-wrapper{
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    gap: 6.4rem;
    width: 100%;
}

.pricing-card-header{
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    gap: 0.8rem;
    position: relative;
}

.pricing-card-header::before{
    position: absolute;
    content: "";
    background: url("../images/pattern-circles.svg") 
    no-repeat center;
    width: 100%;
    height: 300%;
    transform: translate(0, -33%);
    z-index: -1;
}

.pricing-card-header h2{
    font-weight: 800;
    font-size: 2rem;
    line-height: 2.7rem;
    text-align: center;
    color: var(--Dark-Desaturated-Blue);
}

.pricing-card-header p{
    font-weight: 600;
    font-size: 1.3rem;
    line-height: 2.3rem;
    text-align: center;
    color: var(--Grayish-Blue);
    max-width: 17rem;
}

/* @media screen and (min-width:620px) {
    .pricing-card-header p{
        max-width: unset;
    }
} */

form.pricing-card{
    background-color: var(--White);
    width: 100%;
    max-width: 54rem;
    display: grid;
    box-shadow: 0px 20px 30px -5px rgba(127, 137, 185, 0.152073);
    border-radius: 0.8rem;
    padding: 3.4rem 0;
    gap: 3.4rem;
    justify-items: center;
}

.pricing-card__views{
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.6rem;
    text-align: center;
    letter-spacing: 0.17142rem;
    text-transform: uppercase;
    color: var(--Grayish-Blue);
}

.pricing-card__views-range{
    margin: 0.7rem 0 0.6rem;
    max-width: 85%;
}

/* RESET range input */
input[type="range"]{
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type="range"]::-webkit-slider-thumb{
    -webkit-appearance: none;
}   

input[type="range"]::-moz-range-track{
    outline: none;
    border: none;
}

input[type="range"]:focus{
    outline: none;
}
/* Styling The Thumb */
form.pricing-card {
    --thumb-dimensions: 4rem;
    --thumb-br: 50%;
    --thumb-bg: #10d8c4;
    --thumb-hover-bg: #7aeadf;
    --thumb-active-bg: #24aea1;
    --thumb-bs: 0px 15px 30px rgba(0, 255, 231, 0.6);
}

input[type="range"]::-webkit-slider-thumb {
  margin-top: -1.4rem;
  height: var(--thumb-dimensions);
  width: var(--thumb-dimensions);
  border-radius: var(--thumb-br);
  cursor: pointer;
  background: url("../images/icon-slider.svg") center no-repeat, var(--thumb-bg);
  box-shadow: var(--thumb-bs);
  transition: background 250ms;
}

input[type="range"]:hover::-webkit-slider-thumb {
  background-color: var(--thumb-hover-bg);
}

input[type="range"]:active::-webkit-slider-thumb {
  background-color: var(--thumb-active-bg);
}
/* Styling the track */
form.pricing-card {
    --track-h: 0.8rem;
    --track-bg: #ecf0fb;
    --track-br: 0.5rem;
    --left: 50;
}
  /* Chrome - Track */
input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: var(--track-h);
  cursor: pointer;
  background: var(--track-bg);
  border-radius: var(--track-br);
  background-image: linear-gradient(
    to right,
    #a4f3eb calc(var(--left) * 1%),
    transparent 0%
  );
}

.pricing-card__price-container{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.pricing-card__price{
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 4.4rem;
    letter-spacing: -0.08rem;
    color: var(--Dark-Desaturated-Blue);
}

.pricing-card__billing-frequency{
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.9rem;
    color: var(--Grayish-Blue);
}
/* Custom Toggle */
#billing-freq{
    display: none;
}

.pricing-card__billing-frequency-toggle{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    cursor: pointer;
    transform: translateX(-0.6rem);
    margin-bottom: 0.4rem;
}

.toggle{
    width: 4.4rem;
    height: 2.2rem;
    border-radius: 1.5rem;
    padding: 0.4rem;
    background: var(--Light-Grayish-Blue-Toggle);
    transition: background 250ms ease-in-out;
}

.toggle-circle{
    display: block;
    width: 1.4rem;
    height: 1.4rem;
    background: var(--White);
    border-radius: 50%;
    transform: translateX(0);
    transition: transform 250ms ease-in-out;
}

#billing-freq:checked ~ .toggle > .toggle-circle{
    transform: translateX(2.2rem);
}

.pricing-card__billing-frequency-toggle:hover > .toggle,
#billing-freq:checked ~ .toggle{
    background: var(--Strong-Cyan);
}

.pricing-card__freq-option{
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.6rem;
    color: var(--Grayish-Blue);
    position: relative;
}
/* Features */
.pricing-card__bottom{
    width: 100%;
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    gap: 3.4rem;
    padding: 2.4rem 0 0;
    border-top: 1px solid #ecf0fb;
}

.pricing-card__features{
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    gap: 1rem;
}

.pricing-card__feature{
    display: flex;
    gap: 1.6rem;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.6rem;
    color: var(--Grayish-Blue);
}
/* btn */
.pricing-card__submit-btn{
    width: max-content;
    padding: 1.2rem 4.6rem;
    border-radius: 2rem;
    background: var(--Dark-Desaturated-Blue);
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.6rem;
    color: var(--Pale-Blue);
    transition: color 250ms ease-in-out;
}

.pricing-card__submit-btn:hover{
    color: var(--White);
}
/* Coded */
.attribution { 
    font-size: 11px; 
    text-align: center;
    padding-top: 20px;
}
.attribution a { color: hsl(228, 45%, 44%); }

@media screen and (min-width: 375px) {
    .pricing-card__freq-option--annual::after{
        content: "-25%";
        position: absolute;
        width: max-content;
        left: 100%;
        top: 50%;
        transform: translate(0.55rem, -50%);
        padding: 0.2rem 0.85rem 0.3rem 0.75rem;
        background: var(--Light-Grayish-Red);
        font-size: 1rem;
        font-weight: 800;
        line-height: 1.4rem;
        border-radius: 0.9rem;
        color: var(--Light-Red);
    }
}

@media screen and (min-width: 620px) {
    .pricing-card-header{
        gap: 1.2rem;
    }
    .pricing-card-header h2{
        font-size: 2.8rem;
        line-height: 3.8rem;
    }
    .pricing-card-header p{
        font-size: 1.5rem;
        line-height: 2rem;
        max-width: none;
    }
    form.pricing-card{
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: max-content;
        padding: 4rem 0;
        align-items: center;
        gap: 4rem;
    }
    .pricing-card__views{
        font-size: 1.4rem;
        line-height: 1.9rem;
        letter-spacing: 0.2rem;
    }
    .pricing-card__views-range{
        margin: 0 0 1.6rem;
        grid-row: 2/3;
        grid-column: 1/3;
        max-width: 82%;
    }
    .pricing-card__price-container{
        justify-self: start;
    }
    .pricing-card__price{
        font-size: 4rem;
        line-height: 5.5rem;
        letter-spacing: -0.1rem;
    }
    .pricing-card__billing-frequency{
        font-size: 1.6rem;
        line-height: 2.2rem;
    }
    .pricing-card__billing-frequency-toggle{
        grid-column: 1/3;
        transform: translateX(0);
        margin-bottom: 0;
    }
    .pricing-card__freq-option--annual::after{
        content: "-25% discount";
    }
    .pricing-card__bottom{
        grid-column: 1/3;
        flex-flow: row nowrap;
        padding: 3.2rem 4.4rem 0 4.8rem;
        justify-content: space-between;
    }
    .pricing-card__features{
        grid-column: 1/2;
        align-items: flex-start;
    }
}

@media screen and (min-width: 1000px) {
    body{
        background-size: contain;
        padding-top: 10.4rem;
    }
    .card-wrapper{
        gap: 9.1rem;
    }
}