.page-template-coeur-on-demand-template {
  #on-demand-block {
    .on-demand-block__container {
      display: block;

      & #notif {
        display: flex;
        padding-bottom: 1rem;
        
        max-height: 400px;
        
        opacity: 1;
        transition: all 400ms ease-in-out;

        & .buttons {
          position: relative;
          display: flex;
          justify-content: center;
          align-items: center;
          background: white;
          border: 1px solid #00000080;
          border-radius: 16px;
          /* width: fit-content; */
          padding: 2rem 6rem;
          margin: 1rem auto 0;
          flex-wrap: wrap;
          & .buttons {
            border: none;
            padding: 0;
          }
        }
        &.hidden-notif{
            max-height: 0px;
            opacity: 0;
            overflow: hidden;
        }
        #closeNotif {
          cursor: pointer;
          position: absolute;
          top: 5px;
          right: 20px;
          color: var(--color-coeur-300);
        }
      }
      & .on-demand-block__filters {
        display: flex;
        padding-bottom: 1rem;
        & .nav-tab-wrapper.buttons {
          display: flex;
          max-width: 1080px;
          justify-content: center;
          padding: 2rem;
          margin: auto;
            flex-wrap: wrap;
           & button {
            flex: 0 1 170px;
          }
        }
      }

      /* For the logged in users */

      & .coeur-gallery {
        position: relative;
        max-width: min(100%, 1240px);
        max-width: min(100%, 1489px);
        /* min-height: 500px; */
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;
        justify-content: center;
      }

      & .coeur-gallery-load-more-wrap {
        flex: 0 0 100%;
        max-width: 100%;
        display: flex;
        justify-content: center;
        padding: 2rem 0;
      }

      & .coeur-gallery-load-more-wrap[hidden] {
        display: none !important;
      }

      & .coeur-gallery-load-more.is-loading {
        opacity: 0.6;
        pointer-events: none;
      }

      /* For the public view */
      & .coeur-gallery-free {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;
      }

      & .coeur-gallery-scroller {
        display: flex;
        max-width: min(100%, 1240px);
        width: 100%;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        gap: 1.5em;
        overflow-x: scroll;
        overflow-y: visible;
        scroll-snap-type: x mandatory;
        scroll-margin-inline-start: 1.5rem;
        scrollbar-width: none;
      }
      & .coeur-play-icon.mustlogin {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 3;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 40px;
        color: #fff;
        text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
        & .must-login-text {
          font-size: 14px;
          font-weight: 400;
          text-wrap: nowrap;
          color:white;
        }
      }

      & .coeur-gallery-item {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
        transition: opacity 0.78s cubic-bezier(0.2, 0.8, 0.2, 1),
          transform 0.78s cubic-bezier(0.2, 0.8, 0.2, 1),
          filter 0.78s cubic-bezier(0.2, 0.8, 0.2, 1),
          flex-basis 0.78s cubic-bezier(0.2, 0.8, 0.2, 1),
          max-width 0.78s cubic-bezier(0.2, 0.8, 0.2, 1),
          max-height 0.78s cubic-bezier(0.2, 0.8, 0.2, 1),
          margin 0.78s cubic-bezier(0.2, 0.8, 0.2, 1),
          padding 0.78s cubic-bezier(0.2, 0.8, 0.2, 1);

        will-change: transform, opacity, filter;
        scroll-margin-left: 1.5rem;

        & .coeur-gallery-item__image_container {
          position: relative;
          border-radius: 10px;
          overflow: hidden;

          & .coeur-gallery-item__image_link {
            display: block;
            text-decoration: none;
            color: inherit;
          }
        }

        & .coeur-gallery-item__text_container {
          margin-top: 7px;
          padding: 0 5px;

          & .coeur-gallery-item__category {
            color: black;
            font-weight: 600;
          }

          & .coeur-gallery-item__level {
            float: right;
            background: white;
            border-radius: 999px;
            padding: 2px 10px;
            font-weight: 400;
            text-transform: uppercase;
          }
        }

        /* hidden state */
        &.is-hidden {
          opacity: 0;
          transform: translateY(14px) scale(0.96);
          filter: blur(3px);

          flex-basis: 0 !important;
          max-width: 0 !important;

          max-height: 0 !important;
          margin: 0 !important;
          padding: 0 !important;

          overflow: hidden;
          pointer-events: none;
        }

        & .preview-block {
          overflow: hidden;
          display: block;
          position: relative;
          aspect-ratio: 13 / 8;
          width: 100%;

          &.preview-block-nolink {
            opacity: 0.7;
          }
          & small {
            white-space: nowrap;
          }

          & img,
          & video {
            position: absolute;
            width: 100%;
            height: 100%;
            inset: 0;
            object-fit: cover;
            display: block;
          }
          & .preview-img {
            opacity: 1;
            visibility: visible;
            box-shadow: inset 0 0 10px 2px #00000020;
            z-index: 1;
          }
          & .preview-vid {
            opacity: 0;
            visibility: hidden;
            transition: opacity 400ms ease-in;
            z-index: 2;
            background: #000;
          }
          &.has-preview-video:hover .preview-vid,
          &.has-preview-video:focus-within .preview-vid {
            opacity: 1;
            visibility: visible;
            transition: opacity 400ms ease-in;
          }
          &.preview-load-failed .preview-vid {
            display: none !important;
            opacity: 0 !important;
            visibility: hidden !important;
          }
          & .coeur-play-icon {
            z-index: 3;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 40px;
            color: #fff;
            text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
          }
          & .members-only {
            position: absolute;
            top: 50%;
            left: 50%;
              z-index: 3;
            transform: translate(-50%, -50%);
            font-size: 40px;
            color: #fff;
            text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
          }
        }
      }
      .vidcatFilterBtn {
        color:black; border-color:black;background:white;
        padding: 0.5rem 2rem; line-height: 0; text-transform:uppercase;
      }
      #renewMembership.button .text {
        font-size: 14px;
        font-weight: 600;
      }
      #renewMembership,
      .check-membership,
      .vidcatFilterBtn.selected_category{
         text-transform:uppercase;
          color:white; border-color:black;background:black;
          padding: 0.5rem 2rem;
      }

      & .video-gallery-text-content {
        padding: 2rem 0;

        & #video-gallery-title,
        & #video-gallery-description {
          overflow: hidden;
          max-width: max-content;
          text-align: center;
          margin: auto;
          padding: 0 4rem 2rem;
        }
        & .gallery-title__text {
          font-size: inherit;
          font-weight: inherit;
          font-family: inherit;
          color: inherit;
          display: inline-block;
          white-space: nowrap;
          transform: translateX(0);
          opacity: 1;
          transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
            opacity 0.32s ease;
        }
        & .gallery-description__text {
          font-size: inherit;
          font-weight: inherit;
          font-family: inherit;
          color: inherit;
          display: inline-block;
          white-space: nowrap;
          text-align: center;
          text-wrap: wrap;
          transform: translateX(0);
          opacity: 1;
          transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
            opacity 0.32s ease;
        }

        & .gallery-title__text.no-trans,
        & .gallery-description__text.no-trans {
          transition: none !important;
        }

        /* OUT */
        & .gallery-title__text.out-left,
        & .gallery-description__text.out-left {
          transform: translateX(-110%);
          opacity: 0;
        }

        & .gallery-title__text.out-right,
        & .gallery-description__text.out-right {
          transform: translateX(110%);
          opacity: 0;
        }

        /* IN start positions */
        & .gallery-title__text.in-from-right,
        & .gallery-description__text.in-from-right {
          transform: translateX(110%);
          opacity: 1;
        }

        & .gallery-title__text.in-from-left,
        & .gallery-description__text.in-from-left {
          transform: translateX(-110%);
          opacity: 1;
        }
      }

      & #prev-class,
      & #next-class {
        display: none;
        justify-content: center;
        align-items: center;
        padding: 2rem 5px;
        z-index: 1;
        border-radius: 5px;
        width: 25px;
        cursor: pointer;
        position: absolute;
        top: 50%;
        height: 50%;
        transform: translateY(-50%);
        & svg {
          width: 15px;
          height: 15px;
        }
      }

      & #next-class {
        right: 0;
      }
      & #prev-class {
        left: 0;
      }
    }
  }

  .hidden {
    display: none !important;
  }

  /* Modal to display the video */
  #coeur-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    max-height: 100vh;
    overflow: auto;
    & ul {
      list-style: disc outside;
      padding-left: 1.25rem;
      white-space: normal;
      & li::marker {
        color: white;
      }
    }

    & #coeur-video-modal-inner-container {
      position: relative;
      max-width: 100%;
      width: 900px;
      background: #000;
      & p {
        color: white;
      }

      & #coeur-video-modal-close-btn {
        float: right;
        background: rgba(0, 0, 0, 0.6);
        color: #fff;
        border: none;
        font-size: 24px;
        cursor: pointer;
        z-index: 2;
        padding: 5px;
        position:relative;
      }
      & #coeur-video-modal-player {
        width: 100%;
        aspect-ratio: 16 / 9;
        position: relative;
      }
    }
  }

  & .coeur-studio__introduction {
    padding-bottom: 0;

    .coeur-studio__introduction--container {
      display: flex;
      flex-direction: column;
      max-width: 880px;
      margin: auto;
      padding: 3rem 0;
      gap: 1rem;
    }
    .coeur-studio__introduction--container p {
      font-size: 22px;
      text-align: center;
      color: var(--color-coeur-700);
    }
  }
  & .stats-boxes-section {
    text-align: center;

    & .boxes-container {
      display: flex;
      gap: 2rem;
      padding: 1rem 0 2rem;
      justify-content: center;
      align-items: stretch;
      flex-wrap: wrap;
    }

    & .guide-box {
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      align-items: center;
      text-align: center;
      gap: 1rem;
      padding: 2rem 1.5rem;
      border-radius: 16px;
      background: white;
      aspect-ratio: 5 / 4;

      max-width: calc(25% - 2rem) !important;
      flex: 0 0 calc(25% - 2rem) !important;
      /* max-width: 280px;
                width: 100%; */
    }

    & .boxes-title-container {
      min-height: 4em;
    }
    & .box-title-container h3.box-text {
      color: var(--color-coeur-300);
    }
  }
}

@media (max-width: 900px) {
  .page-template-coeur-on-demand-template {
    & .coeur-gallery-item {
      flex: 0 0 calc(50% - 2rem) !important;
      max-width: calc(50% - 2rem) !important;
      /* padding:0 1rem; */
    }
    & #prev-class,
    & #next-class {
      display: flex !important;
    }
    & #video-gallery-title,
    & #video-gallery-description {
      padding: 0 0 2rem;
    }
  }
}
@media (max-width: 880px) {

    .page-template-coeur-on-demand-template {
    & .stats-boxes-section {
    & .boxes-container {
      padding: 1rem 1rem 1rem;
    }
    & .guide-box {
      max-width: calc(50% - 2rem) !important;
      flex: 0 0 calc(50% - 2rem) !important;
    }
  }}

}

@media (max-width: 800px) {
  .page-template-coeur-on-demand-template {
    #coeur-video-modal {
      align-items: flex-start;
    }
  }
}
@media (max-width: 680px) {
  .page-template-coeur-on-demand-template {
    & #on-demand-block {
      & .on-demand-block__container {
        & .video-gallery-text-content {

            padding: 1rem 0;
          #video-gallery-title,
          #video-gallery-description {
            padding: 0 0 2rem;
            & .gallery-title__text {
          white-space: pre-line;
          }

          .coeur-studio__introduction {
            padding-inline: 1rem;
          }
        }
      }
    }
  }
}
}
@media (max-width: 650px) {
  .page-template-coeur-on-demand-template {
    & #on-demand-block {
        padding: 1rem;
      & .on-demand-block__container {
        & .coeur-gallery {
          min-height: unset;
        }
        & .coeur-gallery-item {
          padding: 0;
          flex: 0 0 calc(100%) !important;
          max-width: calc(100%) !important;
        }
        & .coeur-gallery-scroller {
          gap: 1.1rem;
        }
      }
    }
  }
}

@media (max-width: 660px) {
  .page-template-coeur-on-demand-template {
    & .stats-boxes-section {
    & .boxes-container {
      padding: 1rem 1rem 1rem;
    }
    & .guide-box {
      justify-content: center;
      align-items: center;

      aspect-ratio: 5 / 5;

      max-width: calc(380px - 2rem) !important;
      flex: 0 0 calc(380px - 2rem) !important;

      padding: 3rem;
    }
  }}
}
@media (max-width: 330px) {
  .page-template-coeur-on-demand-template {
    & .guide-box {
      max-width: calc(100% - 2rem) !important;
      flex: 0 0 calc(100% - 2rem) !important;
    }
  }
}

@media (min-width: 880px) {
  .page-template-coeur-on-demand-template {
    .coeur-gallery-scroller.twoorless {
      justify-content: center;
    }
  }
}
