@import "../../mixins";

@import "../../variables-layout";

@import "../../../_vendor/node_modules/bootstrap/scss/functions";
@import "../../../_vendor/node_modules/bootstrap/scss/variables";
@import "../../../_vendor/node_modules/bootstrap/scss/mixins";
@import "../../scaffolding/helper-classes";
@import "../../../_fonts/fontawesome/scss/fontawesome";
@import "../../../_fonts/fontawesome/scss/regular";

@import "../../scss-variables";
@import "../../_theme/variables-layout";

html body {
  .ce_rsce_linkboxen {
    //margin-bottom: -1.5rem;

    .row.same-height {
      .link--box {
        min-height: 100%;
      }
    }

    .link--box {
      position: relative;
      transition: all 0.3s ease;
      display: flex;
      flex-flow: column nowrap;

      //cursor: pointer;

      > a,
      > span {
        display: block;
        width: 100%;
        height: 100%;
        position: absolute;
        z-index: 10;
        cursor: pointer;
      }

      > div {
        transition: all 0.3s ease-in-out;
      }

      &.style-1 {
        @include content-box(0px);
        @extend .bg-gradient;


        .box--upper {
          .image--holder {
            height: rfs-value(250px);
            border-radius: $border-radius $border-radius 0px 0px;
            overflow: hidden;

            &.image--holder {
              //border-radius: $border-radius;
            }
          }
        }

        .box-lower--wrapper {
          border-radius: 0px 0px $border-radius $border-radius;

          .box--lower {
            padding: rfs-value(15px 25px);
            display: inline-flex;
            flex-flow: row nowrap;
            //align-items: center;
            width: 100%;

            &.with-url {
              &:before {
                @extend %fa-icon;
                @extend .far;
                content: fa-content($fa-var-angle-double-right);
                vertical-align: baseline;
                @include font-size(28px);
                padding-right: 1rem;
              }
            }

            .headline--wrapper {
              flex: 1;

              .box--headline {
                color: var(--bs-primary);
                font-weight: $font-weight-bolder;
                @include font-size(22px);
                text-decoration: none;
                display: block;
                text-transform: uppercase;
              }

              .box--subline {
              }
            }
          }

          .box-lower--expand {
            &:not(.is-map) {
              padding: rfs-value(15px 25px 15px 25px);
            }

            &.is-map {
              iframe, embed {
                min-height: rfs-value(450px);
                border-radius: $border-radius;
              }
            }

            .box--longtext {
              padding-left: 0px;
              padding-right: 0px;
            }

            .button--wrapper {
              //margin-bottom: 1rem;
              padding-left: 0px;
              padding-right: 0px;
            }
          }
        }
      }

      &.style-2 {
        .box--lower {
          position: relative;
          @include padding(15px 25px 0px 25px);
          line-height: var(--bs-body-line-height);
          //transition: all .3s ease;

          &:not(.as-box) {
            color: var(--bs-body-color);
            @include font-size(16px);

            .box--headline {
              @include font-size(24px);
            }

            .box--subline {
              @include font-size(20px);
            }
          }

          * {
            transition: all 0.3s ease;
          }

          a {
            text-decoration: none;
            transition: none;
          }

          .headline--wrapper {
            width: 100%;
          }

          &.with-url {
            padding-right: 3rem;

            &:after {
              @extend %fa-icon;
              @extend .fal;
              content: fa-content($fa-var-long-arrow-right);
              position: absolute;
              right: rfs-value(20px);
              top: 50%;
              transform: translate(50%, -50%);
              @include font-size(25px);
              //transition: all .3s ease;
              z-index: 21;
            }
          }
        }

        .box-lower--expand {
          @include font-size(16px);
          line-height: var(--bs-body-line-height);
          @include padding(15px 0px 20px 0px);

          .box--expand-image {
            margin-bottom: 1rem;
          }
        }
      }

      &:hover {
        .box--upper .hover-text {
          opacity: 1;
        }
      }

      .box--upper {
        position: relative;
        overflow: hidden;

        .image--holder {
          height: rfs-value(225px);
          background-size: cover !important;

          &.is--video {
            height: auto;
            line-height: 0;

            video {
              max-width: 100%;
              height: auto;
            }

            video::-webkit-media-controls-mute-button {
              display: none !important;
            }

            video::-webkit-media-controls-fullscreen-button {
              display: none !important;
            }
          }
        }


        .design-element {
          position: absolute;
          height: 80%;
          width: 100%;
          bottom: 0;
          left: -75%;
          transform: skew(65deg);
          opacity: .7;
          display: block;

          @include media-breakpoint-up(xxl) {
            left: -65%;
          }
        }

        .box-upper--image-text {
          position: absolute;
          bottom: 0;
          left: 0;
          padding: .5rem .75rem;

          @include media-breakpoint-up(xxl) {
            padding: .75rem 1rem;
          }

          span {
            position: relative;
            z-index: 1;

            font-weight: $font-weight-bold;
            color: var(--bs-body-color-inverse);

            @include media-breakpoint-up(xxl) {
              @include font-size(18px);
            }
          }
        }

        .hover-text {
          position: absolute;
          left: 0;
          top: 0;
          width: 100%;
          height: 100%;
          opacity: 0;
          transition: all 0.3s ease;
          background-color: rgba(255, 255, 255, 0.8);
          display: flex;
          flex-flow: column wrap;

          .hover-text--inner {
            margin: auto;
          }
        }
      }

      .box-lower--wrapper {
        position: relative;
        flex: 1;
        display: flex;
        flex-flow: column wrap;
        background-color: $gray-100;

        .box--lower {
          //flex: 1;
          display: flex;
          flex-flow: row nowrap;

          //justify-content: center;
          span.box--headline {
            //font-weight: $font-weight-bold;
            line-height: var(--bs-body-line-height);
          }

          .ce--subline {
            color: inherit;
            margin-bottom: 0px;
            margin-top: 2px;
            @include font-size(15px);
          }

          &.as-box {
            background-color: $body-bg;
            color: var(--bs-body-color);
            box-shadow: $box-shadow;
            padding: 1.5rem 2rem;
            position: absolute;
            top: 0%;
            right: 50%;
            transform: translate(50%, -80%);
            border-radius: 0px;
            text-align: center;
            width: 100%;
            max-width: 75%;

            & + .box-lower--expand {
              padding-top: 2.25rem;
            }

            > .headline--wrapper > span.box--headline {
              color: var(--bs-body-color);
              @include font-size(22px);
            }
          }
        }

        .box-lower--expand {
          //padding-top: .75rem;
          min-height: rfs-value(42px);

          &.expandable {
            overflow: hidden;
            text-overflow: ellipsis;
            transition: all 0.75s cubic-bezier(0, 1, 0, 1);
            max-height: 42px;
            z-index: 20;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
          }

          &.hide-preview {
            max-height: 0px;
            min-height: 0px;
            overflow: hidden;
            padding: 0px;
          }

          .box--longtext {
            @include padding(0px 25px 0px 25px);

            &:last-child {
              padding-bottom: 0px;
            }

            iframe, embed {
              width: 100%;
            }

            &.p-0 {
              //line-height: 0;
            }
          }

          .button--wrapper {
            white-space: pre-line;
            text-align: center;
            @include padding(0px 25px 0px 25px);

            > .btn + .btn {
              margin-top: 0.75rem;
            }
          }
        }
      }

      &.with-link {
        &:hover {
          box-shadow: $box-shadow;

          .box-lower--expand {
            &.expandable {
              max-height: 800px;
              transition: all 1s ease-in-out;
              display: -webkit-box;
              -webkit-line-clamp: 99;
              //padding-bottom: rfs-value(15px);
            }
          }
        }
      }
    }
  }

  .linkboxModal {
    .modal-dialog {
      &.modal-xl,
      &.modal-lg {
        .modal-body {
          padding: 3rem 2.5rem 3rem 1.5rem;

          .btn--close {
            @include font-size(30px);
          }
        }
      }

      .flex-row-reverse {
        .image--wrapper .logo {
          left: 2rem;
          right: auto;
        }
      }

      .image--wrapper {
        position: relative;

        .logo {
          position: absolute;
          bottom: -1.5rem;
          right: 2rem;
        }
      }
    }
  }
}