.overlay-active {
  overflow: hidden;
  #shopify-section-header {
    display: none;
  }
  .portioning-guide-outer-wrapper:after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    z-index: 1;
    background: #000b;
  }

  @media screen and (max-width: 748px) {
    overflow: unset;
  }
}

body:not(.overlay-active) #shopify-section-pdp-portioning-guide {
  display: none;
}

// form:not(:has([data-portioning-options-visible])) span#portioning-guide-trigger {
//   grid-column: 1/5 !important;
// }

#shopify-section-pdp-portioning-guide {
  
  .portioning-guide-container {

    .portioning-guide-outer-wrapper {
      max-width: calc(77vw - 10rem);
      margin: auto;
    }

    .portioning-guide-inner-wrapper {
      background: #fff;
      padding: 1rem;
      margin: 1rem;
      overflow-y: scroll;
      scrollbar-width: thin;
      max-height: calc(100vh - 12rem);
      margin-block-start: 5rem;
    }

    .close-btn {
      color: #9B9B9B;
      cursor: pointer;

      &:hover {
        color: #000;
      }
    }
  }
  .guide-header {
    text-align: center;
  }

  .preparation-guide-items,
  .portioning-guide-items,
  .content-bottom-items {
    display: flex;
    height: 15rem;
    position: relative;
    margin-bottom: 2rem;
    background: #e9eaef;    
  }
  .preparation-guide-items,
  .portioning-guide-items {
    padding-inline-start: 2rem;

    .label-container .entry-content {
      font-size: 12px;
    }
  }
  .content-bottom-items {
    background: unset;
    .item-title {
      color: #2D4268;
      font-size: 18px;
      font-weight: 600;
      text-transform: uppercase;     
      justify-content: unset; 
      column-gap: 0.5rem;
    }
  }
   .content-top {
    position: relative;
  }

  .guide-header {
    font: 18px/20px Montserrat;
    margin-bottom: 1rem;

    h2 {
      font: 70px/72px GloucesterMT-ExtraCondensed, sans-serif;
    }
  }

  .preparation-guide-items:before,
  .portioning-guide-items:before {
    transform: rotate(-90deg) translate(-50%, -200%);
    text-transform: uppercase;
    position: absolute;
    text-align: center;
    align-self: center;
    align-content: center;
    top: -20px;
    left: -1.6rem;
    width: 15rem;
    height: 38px;
    color: #fff;
    background: #2d4268;
    font-size: 21px;
  }

  .preparation-guide-items:before, .portioning-guide-items:before {
    content: var(--guide-items-list-title);
  }

  .preparation-guide-items li,
  .portioning-guide-items li {
    .item-title {
      margin-block-start: 1rem;
    }
  }

  .preparation-guide-items li,
  .portioning-guide-items li,
  .content-bottom-items li {
    padding: 1rem 0;
    flex: 1;
    position: relative;
    margin-block-end: 2rem;

    span:has(svg.icon-snowflake) {
      display: inline-flex;
      align-items: center;
    }

    .entry-content {
      color: #5D5D5C;

      p {
        font-style: italic;
        font-size: 16px;
      }
    }
  }

  .entry-footnote {
    font-style: italic;
    color: #5D5D5C;
  }

  
  .preparation-guide {
    margin-bottom: 1rem;
    ul {
      margin-bottom: unset;
    }
    .entry-footnote {
      display: flex;
      justify-content: flex-end;
    }
  }

  .preparation-guide-items li:not(:last-child) .item-inner-wrapper,
  .portioning-guide-items li:not(:last-child) .item-inner-wrapper,
  .content-bottom-items li:not(:last-child) .item-inner-wrapper {
    border-right: 3px solid #2d4268;
  }

  .content-bottom-items {
    li .item-inner-wrapper {
      flex-direction: row-reverse;
      padding: 0 2rem; 
      column-gap: 1rem;
    }

    li:nth-child(2n) .item-inner-wrapper, li:first-child:last-child .item-inner-wrapper {
      flex-direction: row;
    }

    li:first-child:last-child .item-inner-wrapper {
      display: grid;

      grid-template: 
      "image-wrapper item-title item-title" auto 
      "image-wrapper entry-content entry-content" auto
      "image-wrapper entry-footnote entry-footnote" auto / 2fr 2fr 2fr;

      .image-wrapper {
        grid-area: image-wrapper;
        width: 100%;
        height: 100%;
        img {
          max-height: unset;
        }
      }
      .item-title {
        grid-area: item-title;
        align-self: self-end;
        margin-bottom: 1rem;
        color: #2D4268;
      }
      .entry-content {
        grid-area: entry-content;
        margin-bottom: 1rem;
      }
      .entry-footnote {
        grid-area: entry-footnote;
        justify-content: flex-start;
        column-gap: 0.5rem;
      }

      @media screen and (max-width:768px) {
        
        & {
          grid-template: 
            "image-wrapper item-title item-title" 1fr 
            "entry-content entry-content entry-content" auto
            "entry-footnote entry-footnote entry-footnote" auto / 2fr 2fr 2fr;
        }
      }

    }

    
  }

  .content-bottom-items li:not(:last-child):after {
    content: 'OR';
    display: block;
    position: absolute;
    right: -18px;
    top: calc(50%);
    color: #fff;
    background: #2d4268;
    padding: 0.2rem 0.4rem;
    border-radius: 50%;
    font: 30px GloucesterMT-ExtraCondensed, sans-serif;
  }

  .preparation-guide-items li span,
  .portioning-guide-items li span,
  .content-bottom-items li span {
    display: flex;
    justify-content: center;
  }
  
  .item-inner-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-block-start: 1rem;
  }

  .image-wrapper {
    width: calc(100% - 4rem);
    height: 8rem;
    display: flex;

    img {
      max-height: 8rem;
      margin: auto;
    }
  }

  .shellfish-guide-container {
    display: flex;
    flex-direction: column;
    background: #EEEEEE;
    .item-inner-wrapper {
        flex-direction: row !important;
        justify-content: space-around;
        .image-wrapper {
            height: unset !important;
            margin-inline-start: 1rem;
            width: unset !important;
            img {
                margin: unset !important;
                max-height: 50vh !important;
            }
        }
        
        .entry-content {
            margin-block-start: 5rem;
            padding-block-end: 1rem;
            ol {
                counter-reset: num;
                position: relative;
                li {
                    margin-bottom: 6rem;
                    counter-increment: num;
                    position: relative;
                    text-align: center;
                    display: flex;
                    flex-direction: column;
                    font-weight: 600;
                    font-size: 18px;
                    text-transform: uppercase;
                    color: #2E4269;
                    em {
                        display: block;
                        font-weight: 400;
                        text-transform: none;
                        font-size: smaller;
                        color: #69727b;
                    }
                    &:before { 
                        content: counter(num); 
                        position: absolute;
                        top: -4.5rem;;
                        left: calc(50% - 2rem);
                        color: #fff;
                        background: #2E4269;
                        width: 3.9rem;
                        aspect-ratio: 1/1;
                        display: flex;
                        flex-wrap: wrap;
                        align-content: center;
                        justify-content: center;
                        border-radius: 50%;
                        font-family: Gloucester MT Extra Condensed;
                        font-size: 40px;
                        line-height: 20px;
                        border: 2px solid #2E4269;
                        box-shadow: inset 0 0 0 #fff, inset 0 0 0 #fff, inset 0 0 0 2px #fff;
                    }
                    &:last-child {
                        margin-bottom: 0;
                    }
                }
            }
        }
    }
    
    .entry-footnote {
        text-align: center;
        color: #fff !important;
        background: #2E4269;
        font-size: 21px;
        text-transform: uppercase;
        font-style: normal !important;
        padding-block-start: 1rem;
        padding-block-end: 1rem;
    }
  }

  @media screen and (max-width: 768px) {
    .portioning-guide-container {

      .portioning-guide-outer-wrapper {
        margin: unset;
        max-width: unset;

        .portioning-guide-inner-wrapper {
          max-height: unset;
          margin: unset;
        }
      }
  
      .preparation-guide-items:before,
      .portioning-guide-items:before {
        transform: rotate(0deg) translate(0%, 0%);
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1;
      }
      
      .preparation-guide-items,
      .portioning-guide-items {
        flex-direction: column;
        height: unset;
        padding-inline-start: unset;
      }  
  
      .preparation-guide-items li,
      .portioning-guide-items li {
        padding: 0;
        margin-block-end: unset;
  
        .item-inner-wrapper {
          flex-direction: row !important;
          justify-content: space-between;
          padding: 1rem;
        }

        .image-wrapper {
          width: calc(100% - 6rem);
          padding-right: 0;
          padding-left: 2rem;
        }
  
        &:first-child {
          margin-top: 3rem;
        }
  
        &:nth-child(even) .item-inner-wrapper {
          flex-direction: row-reverse !important;
          .image-wrapper {
            padding-left: 0;
            padding-right: 2rem;
          }
        }
        &:not(:last-child) .item-inner-wrapper {
          border-right: unset;
        }
        .label-container {
          padding: 0;
          border-bottom: 1px solid #2E4269;
          position: relative;

          &:before, &:after {
            position: absolute;
            bottom: -4px;
            background: #2E4269;
            height: 8px;
            width: 8px;
            border-radius: 5px;
          }
  
          &:before {
            content: '';
            left: 0;
          }
          &:after {
            content: unset;
          }

        }
        &:nth-child(2n) .label-container {
  
          &:before {
            content: unset;
          }
          &:after {
            content: '';
            right: 0;
          }
        }
        span, .entry-content {
          position: relative;
          padding-left: 1rem;
          padding-right: 0;
          justify-content: unset;
        }
        
      }
  
      .content-bottom-items {
        flex-direction: column;
        height: unset;
        li .item-inner-wrapper {
          flex-direction: row;
          padding: 0 2rem; 
          column-gap: 1rem;
      
          p {
            flex: 1 1;
          }
        }
    
        li {
          &:not(:first-child) {
            padding: 1rem;
          }
          &:nth-child(2n) .item-inner-wrapper {
            flex-direction: row-reverse;
          }
  
          &:not(:last-child) {
  
            .item-inner-wrapper {
              border-right: unset;
              border-bottom: 3px solid #2d4268;
              padding-bottom: 3rem;
            }
  
            &:after {
              right: calc(50% - 2rem);
              top: unset;
              bottom: 0;
              padding: 0.5rem;
            }
          }
        }
  
      }
    }

    .shellfish-guide-container {
      .item-inner-wrapper {
          flex-direction: column !important;
      }
    }

  }
  
}