:root {
    /* primary */
    --blue950: hsl(213, 96%, 18%);
    --purple600: hsl(243, 100%, 62%);
    --blue300: hsl(228, 100%, 84%);
    --blue200: hsl(206, 94%, 87%);
    --red500: hsl(354, 84%, 57%);

    /* secondary */
    --grey500: hsl(231, 11%, 63%);
    --purple200: hsl(229, 24%, 87%);
    --blue100: hsl(218, 100%, 97%);
    --blue50: hsl(231, 100%, 99%);
    --white: White: hsl(0, 100%, 100%);

    --fontBodySize: 16px;
    --fontBodyFamily: 'Ubuntu', sans-serif;
    --fontHeadings: 24px;
    --fontSecondaryHeadings: 16px;
    --fontSecondaryBodySize: 8px;
}

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

body {
    background-color: var(--blue100);
    font-size: var(--fontBodySize);
    font-family: var(--fontBodyFamily);
    margin: 0; 
    padding: 0;
}

html, body {
    overflow: hidden;
}

#sideBarSteps {
    display: flex;
    flex-direction: column;
    margin-top: 32px;
}

.step {
    color: white;
    display: grid;
    grid-template-columns: 1fr 4fr;
    grid-template-rows: repeat(2, 1fr);
    position: relative;
    padding: 32px;
}

.stepNo {
    grid-column: 2;
    grid-row: 1;
  padding-left: 16px;
    align-self: end;
    font-weight: 200;
}

.stepInfo {
    grid-column: 2;
    grid-row: 2;
    padding-left: 16px;
    align-self: start;
    font-size: var(--fontBodyFamily);
}

.circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgb(255, 255, 255);

  display: flex;
  align-items: center;
  justify-content: center;

  font-weight: bold;
  font-size: var(--fontBodyFamily);
  grid-column: 1;
  grid-row: 1 / 3;
  justify-self: end;
  margin: auto 0;
}

.circleSelected {
    background-color: white;
    color: black;
}

#main {
    display: grid;
    width: 100%;
    height: 100%;
    grid-template-columns: 1fr 3fr 1fr;
    grid-template-rows: 1fr 6fr 1fr;
    box-sizing: border-box;
}

#formMain {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    background-color: rgb(255, 255, 255);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(6, 1fr);
    padding: 16px;
    border-radius: 32px;
}


#sideBar {
    grid-column: 0 / 1;
    grid-row: 1 / 7;
    background-color: blue;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background-image: url('./assets/images/bg-sidebar-desktop.svg');
    background-size: cover;
}

#info {
    grid-column: 2 / 4;
    grid-row: 1 / 7;
    background-color: white;
    display: grid;
    grid-template-columns: 1fr 6fr 1fr;
    grid-template-rows: 1fr auto 1fr;
}

.infoSection,#infoPlans {
    grid-column: 2;
    grid-row: 1;
    margin: auto 0;
}

.infoSection p {
    color: var(--grey500);
}

.infoSection h1, #infoPlans h1 {
    color: var(--blue950);
    padding-bottom: 16px;
}

.infoSection p, #infoPlans p {
    color: var(--grey500);
}

#infoPlan {
    grid-column: 2 / 4;
    grid-row: 1 / 7;
    background-color: white;
    display: grid;
    grid-template-columns: 1fr 6fr 1fr;
    grid-template-rows: 1fr auto 1fr 1fr;
}

#form1 {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

#form1 label {
    color: var(--blue950);
}

form{
    display: flex;
    flex-direction: column;
    width: 100%;
}

form input {
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  margin-top: 16px;
  padding-left: 16px;
}

form input::placeholder {
    color: var(--grey500);
}

.formInner {
    padding: 32px 0;
}

#nextSteps {
    grid-column: 2;
    grid-row: 3;
    display: flex;
    flex-direction: column;
}

#nextSteps button {
    background-color: var(--blue950);
    padding: 16px;
    padding-right: 32px;
    padding-left: 32px;
    border: 0px;
    color: white;
    border-radius: 8px;
    align-self: end;
    margin-top: auto;
    margin-bottom: 32px;
    cursor: pointer;
}

/* step 2 */
#plans {
    grid-row: 2;
    grid-column: 2 / 3;
    display: flex;
    gap: 1rem;
    width: 100%;
    height: 100%;
    min-height: 0;

}
#plans > * {
  flex: 1;

}
.plan {
    background-color: white;
    border: 2px solid var(--purple200);
    border-radius: 16px;
    display: grid;
    grid-template-rows: 2fr 1fr 1fr;
    height: 100%;
    min-height: 0;
}

.plan img {
    padding: 16px;
}

.plan h2 {
    color: var(--blue950);
    font-size: var(--fontHeadings);
}

.plan > * {
    padding: 8px;
}

.active {
    border: 2px solid var(--blue300);
}

.plan:hover{
    border: 2px solid var(--blue300);
}

.attribution {
    width: 100%;
    position: fixed;
    bottom: 0;
    margin: 0 auto;
}

#step2btn {
    grid-column: 2;
    grid-row: 4;
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
}

.submit1 {
    background-color: var(--blue950);
    padding: 16px;
    padding-right: 32px;
    padding-left: 32px;
    border: 0px;
    color: white;
    border-radius: 8px;
    align-self: end;
    margin-top: auto;
    margin-left: auto;
    margin-bottom: 32px;
    cursor: pointer;
    justify-content: end;
}

.back {
    align-self: end;
    margin-top: auto;
    margin-bottom: 32px;
    padding: 16px;
    border-radius: 8px;
    background-color: white;
    border: none;
    color: var(--blue950);
    cursor: pointer;
    font-size: var(--fontBodySize);
    font-weight: bold;
}

#monthlyyearly {
    display: grid;
    grid-template-rows: repeat(4, 1fr);
    grid-row: 3;
    grid-column: 2 / 3;

}

#monthlyyearlycontainer {
    width: 100%;
    height: 100%;
    grid-row: 2;
    background-color: var(--blue100);
    display: flex;
    justify-content: center;
}

.billing-switch{
  display:flex;
  align-items:center;
  gap:12px;
  font-size:16px;
font-weight: bold;

}

.toggle {
  width: 45px;
  height: 22.5px;
  background: var(--blue950);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
}

.toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}


.pill {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17.5px;
  height: 17.5px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform 0.2s ease;
}

.label {
    color: var(--grey500);
}

.selectedSwitch {
    color: var(--blue950);
}

.error {
    width: auto;
    float: right;
    color: var(--red500);
}

.form-input {
    border: 1px solid var(--blue950);
}

/* move knob when checked (Yearly) */
.toggle input:checked + .pill {
  transform: translateX(22.5px);
}

.monthsFreeHidden {
    display: none;
}


#addOns {
    grid-column: 2 / 4;
    grid-row: 1 / 7;
    background-color: white;
    display: grid;
    grid-template-columns: 1fr 6fr 1fr;
    grid-template-rows: 1.5fr auto 1fr;
    width: 100%;
    height: 100%;
}

#services{
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: 1fr 1fr 1fr;
    gap: 16px;

}

.service {
    width: auto;
    height: 100%;
    background-color: white;
    border: 2px solid var(--purple200);
    border-radius: 8px;
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    grid-template-columns: 1fr 3fr 1fr;
    padding: 8px;
    gap: 16px;
    box-sizing: border-box;
}

.serviceInput {
    grid-row: 1 / 3;
    grid-column: 1;
}

.mutliplayerService {
    grid-column: 2;
    grid-row: 2;
}

.service h1 {
    padding:8px 8px 0 8px;
    font-size:var(--fontSecondaryHeadings);
    color: var(--blue950);
}

.service p {
    padding:0 8px 8px 8px;
    font-size:var(--fontSecondaryHeadings);
    color: var(--grey500);
}

.onlineService {
    align-self: end;
}

.serviceInput {
    margin: 0 auto;
    align-self: center;
}

.serviceInput input[type="checkbox"] {
  transform: scale(2);
  accent-color: var(--purple600); /* blue */
}

.mutliplayerService {
    align-self: end;
}

.customizeService {
    grid-column: 3;
    grid-row: 1 / 3;
    padding: 8px;
    margin: auto 0;
    color: var(--blue950);
}

#finishing {
    grid-row: 1 / 7;
    grid-column: 2 / 4;
    display: grid;
    grid-template-columns: 1fr 6fr 1fr;
    grid-template-rows: 1fr auto 1fr 1fr;
}

#submit4 {
    background-color: var(--purple600)
}

#invoice {
    background-color: var(--blue100);
    width: 100%;
    height: 100%;
    grid-row: 2 / 3;
    grid-column: 2;
    display: grid;
    /* grid-template-rows: auto;
    grid-template-columns: auto; */
    padding: 8px;
    box-sizing: border-box;
}

#invoice h1 {
    padding: 8px;
}

#total {
    grid-row: 3;
    grid-column: 2;
}

#invoiceTop {
    /* grid-row: 1; */
    width: 100%;
    height: 100%;
    padding-bottom: 16px;
    margin-top: 16px;
}

#invoiceBottom {
    grid-row: 2;
    width: 100%;
    height: 100%;
    padding-top: 16px;
    margin-bottom: 16px;
}

.invoiceCard {
    grid-column: 1 / 2;
    display: flex;
    justify-content: space-between;
}

.colorGray {
    color: var(--grey500);
    font-size: var(--fontBodySize);
    font-weight: lighter;
}

#invoiceTop:first-child {
    color: var(--blue950);
    font-size: 8px;
}

.change {
    text-decoration: underline;
    color: var(--grey500);
}

.monthlyAmount {
    font-size: 16px;
    color: var(--blue950);
    font-weight: lighter;
    justify-self: end;
    align-self: center;
    margin: auto 0;
}

.changeHigher {
    font-size: 16px;
    /* grid-column: 2; */
    grid-row: 1 / 3;
    justify-self: end;
    align-self: center;
}

#total {
    display: grid;
    grid-template-columns: auto 1fr;
    padding: 16px;
}

#totalShown {
    grid-column: 2;
    grid-row: 1;
    font-size: 20px;
    justify-self: end;
    color: var(--purple600);
}

#mainConfirmation {
    grid-column: 2 / 4;
    grid-row: 1 / 7;
    background-color: rgb(255, 255, 255);
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    grid-template-columns: 1fr 6fr 1fr;
}

#mainConfirmationInner {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    text-align: center;
}

#mainConfirmationInner h1 {
    color: var(--blue950);
}

#mainConfirmationInner p {
    color: var(--grey500);
}

#mainConfirmationInner > * {
    padding: 8px;
}

.hidden {
    display: none;
}

@media (max-width: 768px){
    * {
        box-sizing: border-box;
        grid-template-columns: auto;
        grid-template-rows: auto;
    }
    html, body {
        overflow: visible;
    }

    #main {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
        min-width: 0;
        width: 100%;
        height: 100%;
        overflow-x: hidden;

    }

    #formMain {
        grid-column: auto;
        grid-row: auto;
        padding: 0;
        grid-template-columns: none;
        box-sizing: border-box;
        display:block;
        min-width: 0;
    }

    #sideBar {
        border-radius: 0;
        height: 25%;
        grid-row: auto;
        grid-column: auto;
        background-position: bottom center;
        background-size: cover;
    }

    #info {
        grid-row: auto;
        grid-column: auto;
        margin: 16px;
        border-radius: 16px;
        box-sizing: border-box;
    }  
    .infoSection {
        padding: 32px;
    }

    .stepNo, .stepInfo {
        display: none;
    }

    #sideBarSteps {
        flex-direction: row;
        display: flex;
        place-items: center;
        justify-content: center;
        margin-top: 0;
    }

    .step {
        grid-template-columns: auto;
    }

    .formInner {
        padding: 16px;
    }

    #nextSteps {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: white;       /* so content doesn’t show behind */
        padding: 16px;
        padding-right: 32px;
        z-index: 999;
    }

    #infoPlans {
        padding: 32px;
    }

    #plans {
        flex-direction: column;
    }

    .plan {
        grid-template-columns: auto 1fr;
        grid-template-rows: 1fr 1fr;
  align-items: start;
  justify-items: start;
    }

    .plan img {
        grid-row: 1 / 3;
    }

   .plan h2, .plan p {
  justify-self: start;
}

    #mainConfirmation {
        margin-top: 16px;
    }
}

