@import "settings";
@import "settings--sky";

// Hero banner with full width.
.socialblue--sky {
  .cover-wrap {
    @include for-tablet-portrait-up {
      > .hero-footer {
        position: static;
      }
    }
  }

  .hero-footer {
    padding-bottom: 4em;
  }

  .hero-footer,
  .hero-footer__header {
    flex-wrap: wrap;
  }

  .hero__banner {
    .hero-footer__share {
      display: flex;
      justify-content: flex-end;
      align-items: center;

      @include for-phone-only {
        justify-content: flex-start;
      }

      > .card__title:empty,
      > .card__block {
        padding: 0;
      }

      > span {
        padding-right: 1.25rem;
        font-size: .875rem;
        font-weight: 600;

        [dir='rtl'] & {
          padding-right: 0;
          padding-left: 1.25rem;
        }
      }
    }

    .shariff.card__block {
      display: flex;
      flex: none;
      padding: 0;

      .orientation-horizontal {
        flex-wrap: inherit;
        margin: 0 -.5rem;

        li {
          margin: 0 .5rem;
        }

        li,
        li > a {
          width: 40px;
          height: 40px;
          border-radius: 50%;
        }

        a {
          display: flex;
          align-items: center;
          justify-content: center;
        }

        .fab {
          font-size: 1rem;
        }

        .fa-facebook-f {
          font-size: 1.25rem;
        }

        .shariff-button {
          &.twitter {
            a {
              background: url('../../components/04-organisms/hero/icons/icon-twitter-x.svg') no-repeat center/40px 40px;

              .fab {
                display: none;
              }
            }
          }
        }
      }
    }

    .hero-footer {
      .vote-widget {
        @include for-phone-only {
          width: auto;
        }
      }
    }

    .hero-footer__list ul:not(.dropdown-menu),
    .hero__info-list {
      margin: 0;
      padding-left: 0;
      list-style: none;

      li,
      li a {
        font-weight: 400;
      }

      li {
        display: flex;
        align-items: center;
      }
    }

    .hero-footer__list {
      ul:not(.dropdown-menu) {
        display: flex;
        flex-wrap: wrap;
        margin: 0 -23px;

        li {
          padding: 0 23px;
          margin-bottom: 15px;
        }

        li,
        li a {
          font-weight: 700;
        }
      }

      .dropdown-menu {
        &:not(.dropdown-menu--invite) {
          min-width: 100%;
        }

        a {
          font-size: .875rem;
        }
      }

      svg {
        width: 20px;
        height: 20px;
        margin-right: .5rem;

        @include for-tablet-landscape-up {
          width: 26px;
          margin-right: 10px;
        }
      }

      .meta-engage {
        align-items: center;
        margin-bottom: 0;
        flex-wrap: wrap;

        @include for-tablet-landscape-down {
          align-items: flex-start;

          > * {
            padding: 0;
          }
        }

        > *:first-child {
          padding-left: 0;
        }

        .badge--large {
          padding-left: 0;
          font-size: 1rem;
          font-weight: 700;
        }

        .hero-footer__list-left > *,
        > * {
          margin-right: 0;
          padding-right: 1rem;

          [dir='rtl'] & {
            padding-right: 0;
            padding-left: 1rem;

            @include for-tablet-landscape-down {
              padding-left: 0;
            }
          }

          &:last-child {
            padding-right: 0;
          }

          @include for-tablet-landscape-up {
            padding-right: 15px;

            &:last-child {
              padding-right: 0;
            }
          }
        }

        .hero-footer__list-left {
          position: relative;

          [dir='rtl'] & {
            margin-bottom: 0;

            @include for-phone-only {
              > * + * {
                padding-left: .5rem;
              }
            }
          }

          @include for-tablet-landscape-up {
            margin-bottom: 0;
          }

          > * {
            margin-bottom: 0;
          }

          &:before {
            @include for-tablet-landscape-up {
              content: '';
              position: absolute;
              height: 100%;
              width: 1px;
              right: 0;
              background-color: #adadad;

              [dir='rtl'] & {
                right: auto;
                left: 0;
              }
            }
          }
        }

        .hero_btn-group {
          display: flex;
          align-items: center;
          margin: 0 -10px 1rem;
          padding-left: 0;
          padding-right: 0;

          @include for-tablet-landscape-up {
            padding-left: 15px;
            margin-bottom: 0;

            [dir='rtl'] & {
              margin-bottom: 0;
            }
          }

          @include for-tablet-landscape-down {
            width: 100%;
            justify-content: space-between;
            margin: 0;
          }

          > * {
            padding: 0 10px;

            @include for-tablet-landscape-down {
              flex: 0 0 100%;
              max-width: 100%;
              padding: 0;

              + * {
                margin-top: 1rem;
              }

              .btn,
              .dropdown {
                width: 100%;
              }
            }
          }

          .btn {
            padding: 4px 15px;
            font-size: .875rem;
            font-weight: 600;
            border-radius: 5px !important;
            margin-bottom: 0;

            @include for-tablet-landscape-up {
              font-size: 1rem;
            }

            @include for-phone-only {
              font-size: .75rem;
            }

            .caret {
              margin-left: 10px;
            }

            + .dropdown-menu {
              top: 100%;
            }
          }

          .meta-addtocal {
            order: 0;

            .btn {
              margin: 0;

              @include for-tablet-landscape-down {
                width: 100%;
              }
            }
          }
        }
      }

      .meta-follow {
        margin-left: 0;
        flex-basis: auto;
        order: initial;
      }

      .metainfo__vote {
        .card__link {
          margin: 0;

          .btn {
            border-color: #adadad;

            &.voted {
              border-color: #f3f3f3;
              background: #f3f3f3;
            }
          }

          .vote__label {
            text-transform: initial;
          }
        }
      }

      .vote__count {
        font-size: 1rem;
      }
    }

    .badge {
      color: #4a4a4a;
    }
  }

  // Hero static
  .hero__banner--static {
    @include full-with-inside-container;
    background: #fff;
    padding: 60px 1em 0;
    z-index: 100;

    @include for-tablet-portrait-up {
      padding-bottom: 25px;
    }

    @include for-phone-only {
      padding-top: 30px;
    }

    .hero-header {
      margin-bottom: .25rem;

      [dir='rtl'] & {
        flex-direction: row-reverse;

        text-align: right;
      }

      > * {
        margin-right: 1rem;
        margin-bottom: .5rem;

        [dir='rtl'] & {
          margin-left: 1rem;
          margin-right: 0;
        }
      }
    }

    .teaser__title {
      margin: 0 0 1rem;
      max-height: none;

      @include for-tablet-landscape-up {
        font-size: 2.25rem;
      }

      a {
        color: #4a4a4a;
        font-weight: 700;
        line-height: 44px;
      }
    }

    .badge {
      vertical-align: middle;
    }

    .vote-like {
      margin-right: 0;
    }

    .metainfo {
      margin-bottom: 1.5rem;
      align-items: center;
    }

    .metainfo__content {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      margin-left: -5px;
      margin-right: -5px;
      line-height: 2;

      a {
        text-decoration: none;

        &:hover {
          text-decoration: underline;
        }
      }

      > * {
        padding-left: 5px;
        padding-right: 5px;
      }

      > div:not([class]),
      > div:last-child {
        flex: 0 0 100%;
        max-width: 100%;
      }

      .badge--large {
        line-height: 1.2;
        margin-bottom: 0;
      }
    }

    .page-title {
      width: auto;
      max-width: inherit;
      text-shadow: none;
      text-align: left;
      color: inherit;
      margin: 0;
      padding: 0 0 35px;

      [dir='rtl'] & {
        text-align: right;
      }
    }

    .cover-wrap {
      min-height: inherit;
      padding-top: 0;
      padding-bottom: 0;
    }

    .teaser__tag {
      font-size: 1rem;
      font-weight: 700;
      text-transform: uppercase;

      @include for-tablet-portrait-up {
        font-size: 1.25rem;
      }

      > * {
        font-weight: 700;
      }
    }

    .hero-footer {
      padding-top: 1rem;
      padding-bottom: 1.25rem;
      flex-direction: column;

      @include for-tablet-portrait-up {
        align-items: inherit;
        padding-bottom: 2.5rem;

        main:not(.is-navbar-secondary) & {
          padding-bottom: 20px;
        }
      }

      @include for-tablet-landscape-up {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
      }

      > * {
        margin-bottom: 1rem;
        flex: 0 0 100%;
        max-width: 100%;

        @include for-tablet-landscape-up {
          margin-bottom: 0;
          flex: 0 0 auto;
          max-width: inherit;
        }

        &:last-child {
          margin-bottom: 0;
        }
      }
    }

    &.no-image .hero-footer {
      border-top: 1px solid #d5d6d2;
    }

    .hero-footer__list {
      a {
        @include for-tablet-landscape-up {
          font-size: 1rem;
        }
      }
    }

    .hero__info-list {
      margin-bottom: -15px;

      &--icon {
        width: 20px;
        height: 20px;
        margin-right: 20px;
      }

      li {
        margin-bottom: 15px;
      }
    }

    .hero-footer__text {
      @include for-tablet-portrait-up {
        margin-left: 0;
        margin-right: 25%;
      }
    }

    .hero-footer__cta {
      flex: 0 0 100%;
      max-width: 100%;
      padding-top: 1rem;

      @include for-tablet-landscape-up {
        flex: 0 0 35%;
        max-width: 35%;
        padding-top: 0;
      }

      .btn-group,
      .btn:not(#edit-decline-invite) {
        @include for-phone-only {
          flex: 1;
        }
      }

      .btn {
        border-width: 2px;
        font-size: .875rem;
        text-transform: uppercase;
      }

      .dropdown-menu {
        min-width: auto;
        width: 100%;
        border-radius: 5px;

        a {
          font-weight: 700;
          text-align: center;
          text-transform: uppercase;
        }
      }

      form {
        display: flex;
      }
    }

    .back-link {
      display: flex;
      align-items: center;
      margin-left: -7px;
      margin-bottom: 1.25rem;
      font-size: 14px;
      line-height: 21px;

      svg {
        width: 24px;
        height: 24px;
      }
    }
  }

  &.gin--vertical-toolbar {
    .hero__banner--static {
      @include full-with-inside-container-gin-theme;
    }
  }

  // Hero banner static for event teaser pages.
  &.path-node:not(.page-node-type-topic) .hero__banner--static {
    @include for-tablet-portrait-up {
      padding-top: 75px;
    }

    .hero-image {
      margin-bottom: 3.5rem;

      @include for-phone-only {
        margin-bottom: 1.75rem;
      }
    }

    .metainfo {
      margin-bottom: 26px;
    }

    .hero-footer {
      padding-top: 0;
      border: 0;
    }

    .hero-footer__header {
      display: flex;
      flex-direction: column;
      padding-bottom: 2.5rem;
      margin-bottom: 1.25rem;
      border-bottom: 1px solid #d5d6d2;

      @include for-tablet-portrait-up {
        flex-direction: row;
        align-items: flex-end;

        [dir='rtl'] & {
          flex-direction: row-reverse;
        }
      }

      @include for-tablet-landscape-up {
        flex: 0 0 100%;
        max-width: 100%;
      }
    }

    .hero-footer__text {
      margin-top: 0;

      @include for-tablet-portrait-up {
        flex: 0 0 100%;
        max-width: 100%;
        margin-right: 0;
      }

      @include for-tablet-landscape-up {
        flex: 0 0 65%;
        max-width: 65%;
      }
    }

    .article__special-fields {
      padding: 0;
      border: 0;
      letter-spacing: .4px;

      // @depracated
      .article__special-field {
        position: relative;
        margin-bottom: 5px;
        padding-left: 30px;

        [dir='rtl'] & {
          justify-content: flex-end;

          @include for-phone-only {
            justify-content: flex-start;
          }
        }

        &:last-child {
          margin-bottom: 0;
        }
      }

      .event-date-advanced,
      .event-location-address {
        [dir='rtl'] & {
          justify-content: flex-end;

          @include for-phone-only {
            justify-content: flex-start;
          }
        }
      }

      // @depracated
      .article__special-fields-icon {
        top: -2px;
        @include for-tablet-portrait-up {
          width: 20px;
          height: 20px;
          top: -3px;
        }
      }

      // @depracated
      .article__special-fields-icon {
        position: absolute;
        left: 0;
        width: 20px;
        height: 20px;
      }
    }

    .hero-footer__cta {
      .btn {
        &:not(#edit-decline-invite):not(.btn-accent) {
          color: inherit;
        }

        &:not(#edit-decline-invite) {
          min-width: 195px;

          &[data-drupal-selector='edit-enroll-for-this-event'] {
            min-width: 250px;
          }

          &[data-drupal-selector='edit-feedback-user-has-enrolled'] {
            width: 100%;
          }
        }
      }
    }
  }

  main:not(.is-navbar-secondary) {
    .hero__banner--static {
      @include for-tablet-portrait-up {
        padding-bottom: 0;
      }

      .hero-footer {
        padding-bottom: 1.25rem;
      }
    }

    .hero__full {
      .hero-footer__bottom {
        @include for-tablet-landscape-up {
          padding-bottom: 20px;
        }

        padding-bottom: 20px;
      }
    }
  }

  //Profile Hero Banner.
  &.path-user {
    .cover-wrap {
      @include for-tablet-landscape-down {
        min-height: 160px;
      }
    }
  }

  //Profile/Group Hero Banner.
  &.path-user,
  &.path-group {
    .cover-wrap {
      max-width: 1200px;
      margin-left: auto;
      margin-right: auto;
    }
  }

  &.path-group {
    .cover-wrap:not(.cover-wrap--course-statistic) {
      padding: 0 2.25rem;

      .page-title {
        width: 100%;
        max-width: 100%;
        text-align: left;

        [dir='rtl'] & {
          text-align: right;
        }

        .badge {
          font-size: 12px;
          font-weight: 700;
          padding-left: 1em;
          padding-right: 1em;
        }

        .group-hero--wrapper {
          margin-top: 8px;
        }

        @include for-phone-only {
          display: flex;
          flex-direction: column;

          > * {
            align-self: flex-start;

            &:not(:first-child) {
              margin-top: 8px;
            }
          }
        }
      }

      h1 {
        font-size: 1.5rem;
        font-weight: 700;
        line-height: 32px;
        text-shadow: none;
        margin: 0;

        @include for-tablet-landscape-up {
          font-size: 2.25rem;
          line-height: 1.4;
        }
      }

      .teaser__tag {
        display: inline-block;
        width: auto;
        padding: 1px 1em;
        margin-bottom: 0;
        font-size: .75rem;
        color: #fff;
        border-radius: 2px;
        text-shadow: none;
        text-transform: inherit;

        &:hover {
          color: #fff;
        }
      }

      a[data-toggle='popover'].icon-before {
        display: inline-block;
        margin-top: 1rem;
        font-weight: 700;

        svg {
          margin-right: .5rem;

          [dir='rtl'] & {
            margin-right: 0;
            margin-left: .5rem;
          }
        }
      }

      .hero-footer {
        padding-top: 0;
      }

      .hero-footer__text {
        flex: 0 0 100%;
        max-width: 100%;
        margin: 0;
        text-align: left;
      }
    }
  }
}
