/* Accordion
----------------------------------------------------------------- */

.wp-block-acf-accordion {

  .block-accordion {
    cursor: pointer;
    padding: 1em 1.5em;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    transition: 0.15s;
    margin-top: 0.75em;
    position: relative;
    border-radius: 0px;
    background: var(--wp--preset--color--secondary);

    h5 {
      margin: 0px;
      font-weight: 600;
      color: white;
      padding-right: 5%;
    }

    .block-accordion-indicator {
      width: 0.8em;
      height: 0.8em;
      border-width: 0;
      border-bottom-width: 0.2em;
      border-bottom-style: solid;
      border-left-width: 0.2em;
      border-left-style: solid;
      transform: rotate(-45deg);
      transition: 0.15s ease;
      position: absolute;
      top: 29%;
      right: 1.25em;
      border-color: white;
    }

    &.block-accordion-active .block-accordion-indicator {
      transform: rotate(135deg);
      top: 38%;
    }
  }

  .block-accordion-panel {
    padding: 0 2%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.15s ease-out;
    margin-bottom: 0.5em;
    color: initial;
    background: #f6f6f6;
    width: 100%;

    .acf-innerblocks-container {
      padding: 0em;


      > :first-child {
        margin-top: 1em;
      }

      > :last-child {
        margin-bottom: 1em;
      }
    }
  }



  &.has-background .block-accordion {
    background: inherit;
  }

  &.has-text-color h5 {
    color: inherit;
  }

}


/* WP Editor Styles */
.editor-styles-wrapper .block-accordion-panel {
  max-height: unset;
  position: relative;
}

.editor-styles-wrapper .block-accordion-panel .acf-innerblocks-container,
.editor-styles-wrapper .block-accordion-panel .acf-innerblocks-container .wp-block-group.has-background {
  position: unset;
}



/* Email Campaign
----------------------------------------------------------------- */


.ecampaign-postcode-search {
  background: none;
  border-radius: 0.5em;
  max-width: 500px;
  margin: 0 auto;


  .ecampaign-postcode-search-inner {}

  form {


    input,
    input[type="text"]:focus,
    #input_3_1 {}

    #ec_elec {
      display: none;
    }
  }

  #gform_wrapper_2 {}

  #gform_2 {

    .gform-body {


      #gform_fields_2 {}

      #field_2_1 {


        .gfield_label {}
      }

      #field_submit {


        #gform_submit_button_2 {

          padding: 0.7em 1em;
        }
      }

    }

    .gform-footer {
      margin-top: 0em;
    }

  }
}





.ecampaign-email {

  max-width: 800px;
  margin: 0 auto;

  .ecampaign-email-inner {

    .ecampaign-inputbox,
    #input_1_7 {
      padding: 1.5em;
      color: var(--wp--preset--color--secondary);
      border-radius: 0.5em;
      border: solid var(--wp--preset--color--secondary) 1px;
      margin-bottom: 0.5em;
      font-weight: 400;
      font-size: 1em;

      &::placeholder {
        color: #ffffffa1;
        font-size: 1em;
      }
    }


    .message-swap {
      display: none;
    }

    label {
      color: var(--wp--preset--color--secondary);
    }

  }

  #gform_wrapper_1 {

    #gform_fields_1 {
      column-gap: 0.5em;
      row-gap: 1em;

      .ginput_container input {
        border-color: var(--wp--preset--color--secondary);
        border-radius: 0.5em;

        &::placeholder {
          color: #717171;

        }

        &.gfield-choice-input {
          border-radius: 0;
          padding: 0;
        }
      }

      label {
        color: var(--wp--preset--color--secondary);
      }
    }

    .gfield--type-submit {
      justify-content: right;
    }

    .gform-page-footer {
      margin-block-start: 0.5em;
    }

    #gform_page_2_1 {
      display: flex;
      column-gap: 0.5em;

      .gform_page_fields {
        flex: 1;
      }

      .gform-page-footer {
        margin-top: 0;
        align-self: flex-start;
      }


      .button {}
    }

    #gform_page_1_2 {

      .button {}
    }
  }

  .partial_entry_warning {
    display: none;
  }

  .progress-image {
    text-align: center;
    margin-top: 2em;
  }

  .progress-image img {
    max-width: 100%;
    height: auto;
    width: 150px;
  }

}


.ui-widget {

  &.ui-widget-content {
    border: 1px solid var(--wp--preset--color--secondary);
    z-index: 2;
  }

  &.ui-menu {
    border-top: 0;
    padding: 0 .6em;
    color: var(--wp--preset--color--primary);
    font-weight: 400;
    background: var(--wp--preset--color--secondary);
    list-style: none;
    margin: 0;
    width: 100%;
    max-width: 260px;
    border-radius: 0em;
    border: solid var(--wp--preset--color--secondary) 1px;

    .ui-menu-item {
      color: var(--wp--preset--color--primary);
      font-weight: 400;
      border-bottom: 1px solid var(--wp--preset--color--secondary);
      margin: 0;
      padding: .4em 0;
      padding-left: .4em;
      cursor: pointer;
      transition: border ease .2s;
    }

    .ui-menu-item-wrapper {
      position: relative;
      padding: 3px 1em 3px .4em;
    }
  }
}

.ui-helper-hidden-accessible {
  display: none;
}




#gform_fields_3 {
  row-gap: 1em;
}




/* Image Slider
----------------------------------------------------------------- */

.block-image-slider {
  position: relative;
  height: min(30em, 25vw);

  .block-image-slider-outer {
    width: 100vw;
    height: 100%;
    position: absolute;
    top: 0;
    left: calc(100% / 2);
    transform: translateX(-50%);
    overflow: hidden;

    .block-image-slider-inner {
      display: flex;
      flex-wrap: nowrap;
      width: max-content;
      height: 100%;
      position: absolute;
      top: 0;
      left: 0;
      z-index: 0;

      &.is-scrolling {
        animation-name: block-image-slider-scroll;
        animation-timing-function: linear;
        animation-iteration-count: infinite;
      }

      .image-slide {
        position: relative;
        flex: 0 0 calc((100vw - 6em) / 5);
        width: calc((100vw - 6em) / 5);
        height: 100%;
        margin-right: 2em;

        img {
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          max-width: none;
          object-fit: cover;
        }
      }
    }
  }
}

@keyframes block-image-slider-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(var(--slider-loop-distance) * -1));
  }
}

@media (prefers-reduced-motion: reduce) {
  .block-image-slider .block-image-slider-inner.is-scrolling {
    animation: none;
  }
}





/* Next Block..
----------------------------------------------------------------- */






/* Next Block..
----------------------------------------------------------------- */

/* WP Editor Styles */
.editor-styles-wrapper {}


/* MOBILE
--------------------------------------------- */

@media only screen and (max-width: 1024px) {}

@media only screen and (max-width: 768px) {
  .block-image-slider {
    height: min(30em, 33vw);

    .block-image-slider-outer .block-image-slider-inner .image-slide {
      flex-basis: calc((100vw - 2em) / 4);
      width: calc((100vw - 2em) / 4);
    }
  }
}

@media only screen and (max-width: 500px) {

  /* Accordion
----------------------------------------------------------------- */
  .block-accordion {
    padding: 0.5em 1em;
  }

}