
#theme-page-bg {
  background-size: cover !important;
  background-color: #f0f0f0;
}
.multiform {
  /* color vars */
  --black: rgb(0,0,0);
  --white: rgb(255,255,255);
  --gray: rgb(99,100,102);
  --gray2: rgb(205, 205, 205);
  --gray3: rgb(195,195,195);
  --darkred: rgb(177,24,30);
  --darkerred: rgb(153,0,0);

  --blackrgb: 0,0,0;
  --whitergb: 255,255,255;
  --grayrgb: 99,100,102;
  --gray2rgb: 205, 205, 205;
  --gray3rgb: 195,195,195;
  --darkredrgb: 177,24,30;
  --darkerredrgb: 153,0,0;


  padding-bottom: 5rem;
  display: grid;
  
  &.theme-page-wrapper:not(.full-width-layout) {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .box {
    background-color: var(--white);
    border: 3px solid var(--gray2);
    padding: 1.75rem 1.875rem 1.25rem;
    cursor: pointer;
    display: flex;
    flex-flow: column nowrap;
    align-items: flex-start;
    /* transition: background-color .15s ease-in-out, border .15s ease-in-out; */

    .meta {
      display: flex;
      justify-content: space-between;
      width: 100%;
      
      .icon {
        width: 1.875rem;
        height: 1.875rem;
        margin-left: auto;
      }
    }
    .type {
      font-size: 0.5625rem;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 11%;
      line-height: 1.5rem;
      color: var(--white) !important;
      background-color: var(--gray);
      border-radius: 0.75rem;
      height: 1.5rem;
      padding: 0 0.75rem;
      /* transition: color .15s ease-in-out, background-color .15s ease-in-out; */
    }
    .icon {
      background-color: var(--darkred);
      width: 3rem;
      min-width: 3rem;
      height: 3rem;
      min-height: 3rem;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      --svgcolor: var(--white);
    }

    h2 {
      display: flex;
      justify-content: space-between;
      text-align: left;
      color: var(--gray);
      width: 100%;
      padding-top: 0;
      padding-bottom: 1.5rem;
      border-bottom: 1px solid rgba(var(--grayrgb), .3);
      margin-bottom: 2.5rem;
      /* transition: color .15s ease-in-out, border-bottom .15s ease-in-out; */
    }



    button {
      margin-top: auto;
      margin-left: 0;
      /* transition: background-color .15s ease-in-out, color .15s ease-in-out; */
    }

    &:hover, &:focus, &:active, &:has(:checked) {
      background-color: var(--darkred);
      border-color: var(--darkerred);
      .icon {
        background-color: var(--white);
        --svgcolor: var(--darkred);
      }
      h2 {
        color: var(--white);
        border-bottom: 1px solid rgba(var(--whitergb), .3);
      }
      p, li {
        color: var(--white);
      }
      button {
        background-color: var(--white);
        color: var(--gray);
      }
    }
  }
  .title {
    padding: 3.75rem 0 2.5rem;
  }

  nav.nav {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  button.prev, button.next, button.submit, button.select, a.button {
    text-transform: uppercase;
    font-size: 0.6875rem;
    font-weight: bold;
    line-height: 1.25rem !important;
    display: flex;
    gap: 0.25rem;
    grid-column: 1 / 4;
    background-color: var(--darkred);
    margin-right: 0;
    margin-left: 0;
    border-radius: .2em;
    --svgcolor: var(--white);
  }
  button.prev, a.button.prev {
    justify-self: start;
    grid-column: 1 / 2;
    
    /* grid-column: -4 / -3; */
    svg {
      transform: rotate(180deg);
    }
  }
  button.next, button.submit {
    justify-self: end;
    grid-column: 2 / 3;
  }
  

  .page {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    max-width: calc(100vw - 40px);
    padding: 0 20px;
    margin-bottom: auto;
    opacity: 0;
    max-height: 0;
    pointer-events: none;
    transition: 200ms opacity ease-in-out;

    @media screen and (min-width: 64rem) {
      padding: 0;
    }

    &.active {
      opacity: 1;
      max-height: 100000rem;
      pointer-events: auto;
    }
  }
  .errormsg {
    display: none;
    color: var(--darkred);
  }
  .error {
    /* border: 1px solid var(--darkred) !important; */
    .errormsg {
      display: block;
    }
  }

  .individual_options {
    padding: 20px 0;
    display: flex;
    flex-flow: column nowrap;
    gap: 20px;

    @media screen and (min-width: 64rem) {
      display: grid;
      grid-template-columns: 50% 50%;
    }
  }
  
}
.page1 {
  display: grid;
  gap: 1rem;
  grid-template-areas: "title" "multiple" "individual" "support";

  @media screen and (min-width: 64rem) {
    grid-template-columns: 50% 50%;
    grid-template-rows: auto 30rem auto;
    grid-template-areas: "title title" "multiple individual" "support support";
  }

  .box {
    padding: 2.5rem 3.75rem;
  }
  p {
    font-size: 1.5rem !important;
    line-height: 1.5;
  }

  .title {
    grid-area: title;
  }

  .multiple {
    grid-area: multiple;
  }

  .individual {
    grid-area: individual;
  }

  .support {
    grid-area: support;
    h2 {
      border-bottom: 0 !important;
      padding-bottom: 0;
      margin-bottom: 0;
    }

  }
}

.page2 {
  display: grid;
  gap: 1rem;
  grid-template-areas: "title" "rqi" "heartcode" "nrp" "unsure" "nav";
  @media screen and (min-width: 64rem) {
    grid-template-columns: 33.3333% 33.3333% 33.3333%;
    grid-template-rows: auto auto auto;
    grid-template-areas: "title title title" "rqi nrp heartcode" "unsure unsure unsure" "nav nav nav";
  }
  

  .box {
    h2 {
      display: block;
      font-size: 1.875rem;
      padding: 1.25rem 0 .625rem;
      margin: 0;
      border-bottom: 0 !important;
    }
    p {
      padding-bottom: 1.25rem;
      border-bottom: 1px solid rgba(var(--grayrgb), .3);
      margin-bottom: 1.25rem;
      /* transition: color .15s ease-in-out, border-bottom .15s ease-in-out; */
    }

    input[type="checkbox"] {
      -webkit-appearance: none;
      appearance: none;
      outline: none;
      background-color: var(--gray2);
      margin: auto 0 0 auto;
      border: 2px solid var(--gray);
      border-radius: 0.3125rem;
      width: 1.875rem;
      height: 1.875rem;
      display: grid;
      place-content: center;

      &::before {
        content:'';
        width: 0.9rem;
        height: 0.9rem;
        transform: scale(0) rotate(15deg);
        transition: 120ms transform ease-in-out;
        box-shadow: inset 1em 1em rgba(var(--blackrgb), .75);
        clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
      }
      &:checked {
        background-color: var(--white);
        &::before {
          transform: scale(1) rotate(15deg);
        }
      }
    }

    &.unsure {
      flex-flow: row wrap;
      align-items: center;
      gap: 1rem;
      padding-top: 1.4375rem;
      @media screen and (min-width: 64rem) {
        flex-flow: row nowrap;
      }
      
      .icon {
        width: 1.875rem;
        height: 1.875rem;
        background-color: var(--gray);
      }
      h2 {
        width: auto;
        padding: 0 0 .3125rem;
      }
      p {
        border-bottom: 0 !important;
        padding: 0;
        margin: 0 !important; 
      }
      input[type="checkbox"] {
        margin-top: 0;
      }
    }

    &:hover, &:focus, &:active, &:has(:checked) {
      &.unsure {
        .icon {
          background-color: var(--white);
        }
      }
      p {
        border-bottom: 1px solid rgba(var(--whitergb), .3);
      }
      .type {
        background-color: var(--white);
        color: var(--darkred) !important;
      }
    }

  }
  .title {
    grid-area: title;
    h2 {
      text-align: left;
    }
  }
  .rqi {
    grid-area: rqi;
  }
  .heartcode {
    grid-area: heartcode;
  }
  .nrp {
    grid-area: nrp;
  }
  .unsure {
    grid-area: unsure;
  }
  nav.nav {
    grid-area: nav;
  }
}

.page3 {
  display: flex;
  flex-flow: column nowrap;
  gap: 1rem;
  min-height: 90vh;

  .title {
    h2 {
      text-align: left;
    }
  }

  .users {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    @media screen and (min-width: 64rem) {
      grid-template-columns: 1fr 1fr 1fr 1fr;
    }
    
    
    .box {
      display: grid;
      place-content: center;
      font-size: 1.875rem;
      font-weight: 500;
      padding: 1.25rem;
      p {
        margin-bottom: 0.125rem !important;
      }
      &:hover, &:focus, &:active, &:has(:checked) {
        border-color: var(--darkerred);
      }
    }
    input {
      display: none;
    }
    .errormsg {
      @media screen and (min-width: 64rem) {
        grid-column: 1 / 5;
      }
    }
  }
  nav.nav {
    margin-top: auto;
  }
}

.page4 {
  min-height: 90vh;
  display: flex;
  flex-flow: column nowrap;
  .title {
    h2 {
      text-align: left;
    }
  }
  .form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px 40px;
    @media screen and (min-width: 64rem) {
      grid-template-columns: 1fr 1fr;
    }
    
    > div {
      label {
        display: block;
      }
      input {
        width: 100%;
        box-sizing: border-box;
        &.error {
          & + .errormsg {
            display: block;
          }
        }
      }
    }
    > div.contactMethod {
      display: flex;
      flex-flow: row wrap;
      gap: 0 20%;
      padding-bottom: 40px;

      /* @media screen and (min-width: 64rem) {
        grid-column: 1 / 3;
      } */

      > p, .errormsg {
        width: 100%;
        flex: 0 1 100%;
        margin-bottom: 0 !important;
      }
      
      label.contactPref {
        padding-top: 20px;
        display: flex;
        flex: 0 1 auto;
        gap: 20px;
        align-items: center;

        input {
          width: auto;
        }
        p {
          margin-bottom: 0 !important;
        }
      }
    }
  }
  
  nav.nav {
    margin-top: auto;
  }
}

.page5 {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 30px;

  @media screen and (min-width: 64rem) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: max-content max-content 1fr;
    gap: 30px 40px;
  }

  .title {
    grid-column: 1 / 3;
    padding-bottom: 0;
    h2 {
      text-align: left;
    }
  }

  h6 {
    text-align: left;
  }
  .box {
    padding: 1.25rem 1.875rem;

    input {
      display: none;
    }
    p {  
      font-weight: bold;
      line-height: 1;
      margin-bottom: 0 !important;
      margin-left: auto;
      margin-right: auto;
    }
  }
  .day, .time {
    display: flex;
    flex-flow: column nowrap;
    gap: .875rem;
  }
  nav.nav {
    grid-column: 1 / 3;
    margin-top: auto;
  }
}

.page6 {

  &.active.disabled {
    pointer-events: none !important;
    filter: saturate(0);
    opacity: .5 !important;
  }

  min-height: 90vh;
  display: flex;
  flex-direction: column;

  @media screen and (min-width: 64rem) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: min(11rem, 20rem) auto auto;
    gap: 30px 40px;
  }

  .title {
    grid-column: 1 / 3;
    h2 {
      text-align: left;
    }
  }

  .question {
    display: flex;
    flex-flow: column nowrap;
    gap: 0.625rem;
    box-shadow: 0 0 32px 16px rgba(var(--whitergb), 0.7);
    background-color: rgba(var(--whitergb),0.5);

    .qtitle {
      font-size: 1.5rem;
      font-weight: bold;
    }
    .errormsg {
      display: none;
    }
    &.error {
      .qtitle + .errormsg {
        display: block;
      }
    }

    label {
      font-size: 1.25rem;
      display: grid;
      grid-template-columns: 1.875rem auto;
      gap: 1.25rem;

      input[type=radio] {
        -webkit-appearance: none;
        appearance: none;
        background-color: var(--white);
        margin: 0;
        width: 1.875rem;
        height: 1.875rem;
        border: 1px solid var(--gray3);
        border-radius: 50%;
        display: grid;
        place-content: center;

        &::before {
          content: '';
          width: 1.125rem;
          height: 1.125rem;
          border-radius: 50%;
          transform: scale(0);
          transition: 120ms transform ease-in-out;
          box-shadow: inset 1em 1em var(--darkred);
        }

        &:checked::before {
          transform: scale(1);
        }
      }

      & + textarea.ta-other {
        transform: scale(0);
        transform-origin: top left;
        opacity: 0;
        transition: 120ms transform ease-in-out, 120ms opacity ease-in-out;
        & + .errormsg {
          display: none;
        }
      }

      &:has(:checked) + textarea.ta-other {
        transform: scale(1);
        opacity: 1;
        &.error + .errormsg {
          display: block;
        }
      }
    }
  }
  nav.nav {
    grid-column: 1 / 3;
    margin-top: auto;
  }
  
}

/* tech support */
.multiform.support {
  nav.nav {
    padding-left: 20px;
  }
  a.button {
    position: relative;
    top: -64px !important;
    padding: 9px 20px 9px 40px;
    background-image: url("/wp-content/themes/rqipartners/assets/ArrowLeftSm.min.svg");
    background-repeat: no-repeat;
    background-position: left 12px center;
  }
  #theme-page-bg {
    background-size: cover !important;
  }
  .gform_wrapper .gform_footer input[type="submit"] {
    margin-left: auto;
    background-color: var(--darkred) !important;
    background-image: url("/wp-content/themes/rqipartners/assets/ArrowRightSm.min.svg");
    font-size: 0.6875rem;
    padding: 9px 40px 9px 20px !important;
    font-weight: bold !important;
    line-height: 1.25rem !important;
    letter-spacing: 1px;
  }
  .gform_wrapper.gravity-theme .gfield textarea {
    width: 100% !important;
  }
}