.branch-header {
  .ajax-progress-throbber {
    display: none;
  }

  .label-for-field-branch-hours {
    display: none;
  }

  .location-details {
    .phone {
      display: flex;
      flex-direction: column;
      line-height: 17px;
      padding: 17px 15px 10px;

      span {
        padding-bottom: 5px;
      }

      span:last-child {
        padding-bottom: 0;
      }
    }
  }

  .desktop {
    background-color: $purple;
    color: $white;
    padding: 15px 0;
    min-height: 70px;

    .column {
      margin-left: 60px;
      width: auto;
      @include breakpoint($screen-sm $screen-lg) {
        margin-left: 0;
        width: auto;
      }
      &:first-child {
        margin-left: 0;
      }
      &.address-wrapper {
        @include breakpoint($screen-sm) {
          max-width: 275px;
        }
        @include breakpoint($screen-md) {
          max-width: 310px;
        }
      }
      .field-phone a {
        @include cachet();
      }
      .ygs-branch-selector {
        margin-top: 22px;
        a {
          @include cachet();
        }
      }
    }

    h4 {
      font-size: 16px;
      line-height: 1.1;
      text-transform: uppercase;
      margin: 0 0 5px;
    }

    p {
      font-size: 16px;
      line-height: 1.1;
      margin: 0;
      @include cachet();
      @include breakpoint(768px 992px) {
        font-size: 14px;
      }
    }

    a {
      color: $white;
    }

    .wrapper-field-branch-hours {
      display: inline-block;
    }

    .today-hours {
      .today {
        margin-right: 10px;
      }
      .branch-hours {
        display: none;
        position: absolute;
        top: 120%;
        background: $pink;
        padding: 5px 15px;
        width: 240px;
        left: -15px;
        z-index: 1;
        td {
          padding: 0 10px 5px 0;
          &:first-child {
            white-space: nowrap;
          }
        }
      }
      .dropdown-toggle {
        @include cachet();
        position: relative;
        z-index: 0;
        span{
          pointer-events: none;
          position: relative;
          z-index: -1;
        }
        .hide-text {
          display: none;
        }
      }
      &.open {
        .dropdown-toggle {
          .show-text {
            display: none;
          }
          .hide-text {
            display: inline;
          }
        }
        .branch-hours {
          display: block;
        }
      }
    }
    .branch-header-inner {
      display: flex;
      justify-content: space-around;

      .branch-header__item {
        @include breakpoint($screen-lg) {
          margin-left: 0;
          float: none;
        }

        @include breakpoint($screen-sm) {
          margin-left: 0;
          float: none;

          flex-basis: 20%;
          padding: 0 5px;
        }

        p {
          line-height: 20px;
        }
      }
      .branch-header__directions {
        padding-top: 5px;
      }

      .save-link {
        align-self: center;

        @include breakpoint($screen-sm $screen-desktop) {
          align-self: flex-end;
        }
      }

      .ygs-branch-selector {
        margin-top: 0;

        a {
          display: inline-block;
        }
      }
    }
  }

  .mobile {
    background-color: $pink;
    color: $white;
    padding: 12px 0 0;
    position: relative;

    h4 {
      font-size: 14px;
      line-height: 1.2;
      margin: 0 0 3px;
    }

    p {
      font-size: 16px;
      line-height: 1.1;
      @include cachet();
      margin: 0 0 5px;
    }

    a {
      color: $white;
    }

    .ui-tabs {
      background: none;
      border-radius: 0;
      border: none;
      clear: both;
      padding: 0;

      .ui-tabs-nav {
        padding: 0;
        background: none;
        border-radius: 0;
        border: none;

        li {
          background: none;
          border: none;
          border-radius: 0;
          margin: 0 10px 0 0;
        }

        .ui-tabs-active {
          background: $pink;
        }

        .ui-tabs-anchor {
          color: #fff;
          font-size: 24px;
          outline: none;
          padding: 4px 20px;
        }
      }

      .ui-tabs-panel {
        background: $pink;
        border-radius: 0;
        color: $white;
        border: none;
        font-size: 16px;
        padding: 18px 15px;
        min-height: 80px;

        h4 {
          color: $white;
          font-size: 16px;
          line-height: 1.1;
          text-transform: uppercase;
          margin: 0 0 5px;
        }

        p {
          color: $white;
          font-size: 16px;
          line-height: 1.1;
          margin: 0;
          @include cachet();
        }
      }

      .today-hours {
        @include cachet();
        .today {
          margin-right: 10px;
        }
        .branch-hours {
          display: none;
          padding: 20px 0 12px;
          td {
            padding: 4px 10px 0 2px;
          }
        }
        .dropdown-toggle {
          color: $light-grey;
          position: relative;
          z-index: 0;
          span{
            pointer-events: none;
            position: relative;
            z-index: -1;
          }
          .hide-text {
            display: none;
          }
        }
        &.open {
          .dropdown-toggle {
            .show-text {
              display: none;
            }
            .hide-text {
              display: inline;
            }
          }
          .branch-hours {
            display: block;
          }
        }
      }
    }
    #save-location {
      position: absolute;
      right: 15px;
      text-align: right;
      top: 8px;
      max-width: 155px;
      line-height: 14px;
      a {
        color: $white;
        @include cachet();
      }
    }
  }
  .field-location-fax {
    display: inline;
  }
}

.label-for-field-branch-contacts-info {
  display: none;
}

.branch__updates_queue {
  @include rem(padding-top, 20px);

  @include breakpoint($screen-sm) {
    margin-bottom: 40px;
  }

  &.container {
    max-width: 100%;
    width: auto;
    padding: 0;
  }

  h1 {
    font-size: 28px;
    margin: 0 0 20px;
    @include breakpoint($screen-sm) {
      font-size: 40px;
      margin: 0 0 30px;
    }
  }
  .node--type-blog-post.node--view-mode-teaser {
    float: none;
    margin: 0 0 35px;
  }
  .branch__updates_queue__button {
    display: none;
  }

  .field-updates-queue-update {
    @include breakpoint($screen-xs $screen-sm) {
      width: 362px;
      margin: 0 auto;
    }
  }

  .node--type-blog-post.node--view-mode-teaser {
    width: 100%;
    .inner-wrapper {
      margin: 0;
    }
  }
  .slick-slider {
    margin: 0 15px 50px;

    @include breakpoint(0 $screen-xs) {
      margin: 0 0 50px;
    }
  }
  .slick-arrow {
    background: none;
    color: $light-blue;
    padding: 0;
    z-index: 1;
    height: 40px;
    width: 40px;
    margin-top: -15px;
    .fa {
      font-size: 30px;
    }
    &.slick-prev {
      left: -25px;
    }
    &.slick-next {
      right: -25px;
    }
  }
  .slick-dots {
    bottom: -15px;
    li {
      button {
        &:before {
          opacity: 1;
          color: $lighter-grey;
        }
      }
      &.slick-active {
        button:before {
          opacity: 1;
          color: $pink;
        }
      }
    }
  }
}

.branch-content {
  margin-top: 40px;
}

html.js {
  .branch__updates_queue__button {
    display: none;
  }
  @include breakpoint($screen-sm) {
    .branch__updates_queue {
      .cards:nth-child(7),
      .cards:nth-child(8),
      .cards:nth-child(9),
      .cards:nth-child(10),
      .cards:nth-child(11),
      .cards:nth-child(12) {
        display: none;
      }
    }
    .branch__updates_queue__button {
      text-align: center;

      a {
        font-size: 20px;
        padding: 16px 0;
        max-width: 360px;
        display: inline-block;
        width: 100%;
      }
    }
  }
}

#branch-sessions-form-wrapper {
  .container {
    @include breakpoint(0 $screen-sm) {
      padding: 0;
    }
  }
}
.ygs-branch-sessions-form {

  > h1 {
    margin: 0 15px 10px;
    font-size: 28px;

    @include breakpoint($screen-sm) {
      margin: 0 0 20px;
      font-size: 40px;
    }

    em.placeholder {
      font-style: normal !important;
    }
  }

  label {
    font-size: 14px;
    line-height: 1.6;
    @include cachet();
    color: $dark-grey;
    margin-bottom: 0;
    @include breakpoint($screen-sm) {
      margin-bottom: 5px;
    }
  }
  .elements-wrapper {
    padding: 20px;
    margin-bottom: 17px;
    position: relative;
    background-color: $sky-blue;
    @include breakpoint($screen-sm) {
      background-color: $lighter-grey;
      margin-bottom: 40px;
    }
  }
  .controls-wrapper {
    background-color: $sky-blue;
    padding: 10px 15px;
    a {
      padding: 3px 10px;
    }
  }
  .js-form-type-select {
    padding: 10px 0 5px;
    width: 100%;
    @include breakpoint($screen-sm) {
      padding: 0;
    }
     select {
       text-transform: uppercase;
       color: $dark-grey;
       @include cachet();
     }
   }
  .form-item-when-day {
    display: inline-block;
    @include breakpoint($screen-sm) {
      width: 130px;
    }
  }
  .form-item-when-hours {
    display: inline-block;
    margin-right: 20px;
    @include breakpoint($screen-sm) {
      width: 130px;
    }
  }
  .form-item-program {
    display: inline-block;
    @include breakpoint($screen-sm) {
      width: 200px;
    }
  }
  .at {
    display: inline-block;
    width: 44px;
    text-align: center;
  }
  .schedule-wrapper {
    margin-top: 10px;
    @include breakpoint($screen-sm) {
      margin: 27px -7px 0 0;
      float: right;
    }
    @include breakpoint($screen-md) {
      margin: 2px -7px 0 0;
      float: right;
    }
    a {
      font-size: 14px;
      padding: 10px 0;
      width: 100%;
      @include breakpoint($screen-sm) {
        font-size: 12px;
        padding: 9px;
        width: auto;
      }
      @include breakpoint($screen-md) {
        font-size: 20px;
        padding: 15px 0;
        width: 340px;
      }
    }
  }
  .schedule-wrapper-mobile {
    margin: 10px 15px;
    a {
      font-size: 18px;
      padding: 10px 0;
      width: 100%;
    }
  }
  .ajax-progress-throbber {
    position: absolute;
    left: 0;
    top: 0;
  }
  .selects-container {
    padding: 0 15px 15px;
    background-color: $sky-blue;
    @include breakpoint($screen-sm) {
      background-color: $lighter-grey;
      padding: 15px 20px;
    }
    .inner {
      border-top: 1px solid $default-grey;
      @include breakpoint($screen-sm) {
        border-top: none;
      }
    }
  }
  .js-form-submit {
    display: none;
  }
  .filters-main-wrapper {
    clear: both;
    background-color: rgba(0, 136, 208, 0.25);
    position: relative;
    @include breakpoint($screen-sm) {
      display: none;
    }
    > div {
      padding: 0 15px 15px;
    }
    .reset-wrapper {
      position: absolute;
      right: 35px;
      top: 4px;
      @include breakpoint($screen-sm) {
        top: 0;
        right: 0;
      }
      .clear {
        @include cachet();
        background: none;
        border: none;
        color: $blue;
        display: inline-block;
        font-size: 14px;
        height: 30px;
        line-height: 30px;
        padding: 0;
        @include breakpoint($screen-sm) {
          text-transform: uppercase;
        }
      }
    }
  }

  .filters-wrapper {
    padding-bottom: 5px;
    border-top: 1px solid $default-grey;
    padding-top: 5px;
    @include breakpoint($screen-sm) {
      padding-bottom: 0;
      padding-top: 0;
      border: 0;
    }
    .label {
      @include cachet();
      color: $dark-grey;
      display: block;
      font-size: 14px;
      line-height: 30px;
      margin-right: 20px;
      padding: 0;
      text-align: left;
      @include breakpoint($screen-sm) {
        display: inline-block;
      }
    }
    .filters {
      display: inline-block;
      .filter {
        @include cachet();
        background: $white;
        border-radius: 4px;
        color: $light-blue;
        display: inline-block;
        font-size: 14px;
        height: 30px;
        line-height: 30px;
        text-transform: uppercase;
        white-space: nowrap;
        padding: 0 10px;
        margin: 0 5px 10px 0;
        @include breakpoint($screen-sm) {
          margin: 5px 20px 5px 0;
          color: $dark-grey;
        }
        .remove {
          margin-left: 10px;
          line-height: 30px;
          @include breakpoint($screen-sm) {
            margin-left: 15px;
          }
          .fa {
            font-size: 13px;
            color: $blue;
            @include breakpoint($screen-sm) {
              font-size: 16px;
            }
          }
        }
      }
    }
  }
}

.branch-sessions-group {
  padding: 0;
  h3 {
    @include cachet-medium();
    font-size: 30px;
    line-height: 1.6;
    letter-spacing: -0.8px;
    color: $purple;
    margin: 0 15px 20px;
  }

  .row {
    margin-bottom: 40px;
  }

  .views-row {
    border: 1px solid $pink;
    margin: 0 30px;
    height: auto;
    max-width: 360px;
    text-decoration: none;
    position: relative
  }

  .inner {
    padding: 10px 18px 10px;
  }

  h4 {
    @include cachet();
    font-size: 14px;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: 2px;
    color: $dark-grey;
    margin: 10px 0 15px;
  }

  h3 {
    font-size: 22px;
    line-height: 1.2;
    color: $blue;
    margin: 10px 0 5px;
  }
  .time {
    font-size: 14px;
    margin-bottom: 10px;
    color: $default-grey;
  }
  .included-in-membership {
    background: url("../img/icons/included-in-membership.png") no-repeat 0 0;
    background-size: contain;
    position: absolute;
    top: 47px;
    right: 0px;
    height: 32px;
    width: 90px;
    @include breakpoint($screen-sm) {
      top: 66px;
      right: 0px;
    }
  }
  .field-body-no-summary {
    font-size: 15px;
    line-height: 1.5;
    color: $darker-grey;
  }
  .group_time {
    @include cachet();
    background: $white;
    border-bottom: 1px solid $pink;
    color: $purple;
    font-size: 18px;
    height: 48px;
    line-height: 56px;
    margin: -1px -2px 0;
    padding-left: 2px;
    @include breakpoint($screen-sm) {
      letter-spacing: -0.8px;
      font-size: 30px;
      line-height: 72px;
      height: 67px;
      padding-left: 0;
    }
  }
  .branch-sessions-group-slider {
    margin: 0 45px 35px;
    .slick-track {
      display: -webkit-box;
      display: -webkit-flex;
      display: -ms-flexbox;
      display: flex;
      flex-wrap: wrap;
    }
    .slick-arrow {
      background: none;
      color: $light-blue;
      padding: 0;
      z-index: 1;
      height: 40px;
      width: 40px;
      margin-top: 15px;
      @include breakpoint($screen-sm) {
        margin-top: 30px;
      }
      .fa {
        font-size: 30px;
      }
      &.slick-prev {
        left: -20px;
        @include breakpoint($screen-sm) {
          left: -13px;
        }
      }
      &.slick-next {
        right: -20px;
        @include breakpoint($screen-sm) {
          right: -13px;
        }
      }
    }
    .slick-dots {
      bottom: -40px;
      li {
        button {
          &:before {
            opacity: 1;
            color: $lighter-grey;
          }
        }
        &.slick-active {
          button:before {
            opacity: 1;
            color: $pink;
          }
        }
      }
    }
  }
}

.form__locations {
  background-color: $lighter-grey;
  height: 92px;
  display: table;
  width: 100%;
  padding: 35px 0px 17px;
  @media (min-width: $screen-md) {
    padding: 35px 25px 17px;
  }
  .form-group {
    @media (min-width: $screen-sm-min) {
      margin-bottom: 0px;
    }
  }
  label {
    text-transform: none;
    padding: 6px 8px;
    left: -1px;
    margin: 10px 10px 0 0;
    @media (min-width: $screen-md-min) {
      left: -20px;
      margin: 0 10px 0 0;
    }
  }
  input[type="checkbox"] {
    margin: 0 10px 0px 0;
    vertical-align: middle;
  }
  .btn-group-justified {
    border-spacing: 1px;
    margin: -1px -1px 5px 1px;
    min-width: 234px;
    @media (min-width: $screen-md) {
      border-spacing: 10px;
      margin: -10px -10px -10px 10px;
    }
  }
}

.tag_filters img {
  margin: -2px 0 0 3px;
  width: 13px;
}

.locations-list {
  margin: -20px;

  .views-row__wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    min-height: 100%;
  }

  .views-row {
    display: flex;

    flex-basis: 100%;

    @media (min-width: 600px) and (max-width: 1025px) {
      flex-basis: 50%;
    }

    @media (min-width: 1025px) {
      flex-basis: 33.33%;
    }

    .node--view-mode-teaser {
      flex-basis: 100%;
      align-self: stretch;
    }
  }
  header h1,
  header h2,
  header h2.h1 {
    padding-left: 20px;
    padding-bottom: 0px;
    clear: both;
    margin-top: 0;
    font-weight: bold;
  }
  h1.color-purple,
  h2.color-purple {
    color: $purple;
  }
  .field_location_state {
    float: right;
    top: 0;
    right: 0;
    position: absolute;
    padding: 5px;
    font-size: 10px;
    color: #231f20;
    width: 100px;
    height: 32px;
    vertical-align: bottom;
    background: #fcaf17;
    line-height: 1.2;
    font-style: italic;
    .fa {
      color: white;
      height: 32px;
      float: left;
      font-size: 16px;
      padding-right: 6px;
    }
    span {
      display: block;
    }
  }
  .field-branch-hours {
    h4 {
      font-size: 14px;
    }
  }
}

.node--location-content-type.node--view-mode-teaser,
.node--type-facility.node--view-mode-teaser,
.node--type-branch.node--view-mode-teaser,
.node--type-branch.node--view-mode-sidebar-teaser,
.node--type-branch.node--view-mode-class-location,
.node--type-camp.node--view-mode-teaser {
  border: solid 1px $light-grey;
  padding: 20px;
  min-height: 300px;
  margin: 20px;
  position: relative;
  font-size: 15px;
  [class*="sidebar"] & {
    height: auto;
    margin: 0 0 20px;
    border-color: #ccc;
    > span {
      display: block;
    }
    .location-item--title {
      display: inline-block;
      a {
        color: $purple;
      }
    }
    .edit-class-popup {
      display: inline-block;
      margin-left: 10px;
    }
  }
  .marker_tooltip & {
    border: 0 none;
    padding: 0;
    margin: 0;
    height: auto;
    min-height: auto;
  }
  .location-item--title {
    font-size: 22px;
    @include cachet();
    font-weight: bold;
    .marker_tooltip & {
      margin: 0 0 5px;
    }
    &+.node__content {
      margin: 33px 0 0;
    }
    &~.field-location-area,
    &~.field-location-state {
      margin: 20px 0 33px;
    }
  }
  .field-branch-hours {
    margin-top: 15px;
    td:first-child {
      padding-right: 10px;
    }
  }
  .field-location-area {
    position: static;
    top: 15px;
    font-family: $font-family-sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;

    @include breakpoint ($screen-sm-min $screen-desktop) {
      letter-spacing: 1.1px;
    }

    a {
      color: inherit;
      text-decoration: none;
    }
  }
  .label-for-field-address,
  .label-for-field-phone {
    display: none;
  }
}

.node--type-branch.node--view-mode-class-location {
  h2 {
    font-size: 15px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: normal;
    margin: 0;
  }
}

.paragraph--type--class-location.paragraph--view-mode--default {
  .empty-text {
    border: solid 1px $light-grey;
    padding: 20px;
    h2 {
      display: inline;
      font-family: $font-family-sans-serif;
      font-size: 14px;
      letter-spacing: 2px;
      margin: 0;
      text-transform: uppercase;
    }
  }
}

.node--view-mode-full {
  &.node--type-facility {
    margin-top: -20px;
    .label-for-field-location-address {
      display: block;
    }
    .associated-branch-title {
      display: inline-block;
      font-size: 22px;
      @include cachet();
      font-weight: bold;
      margin: 20px 0 33px;
      line-height: 1.1;
      color: inherit;
      a {
        color: $purple;
      }
    }
  }
  .wrapper-field-location-phone {
    letter-spacing: 2px;
    padding-bottom: 35px;
    .label-for-field-location-phone,
    .field-location-phone {
      display: inline;
    }
  }
  .label-for-field-location-address:after,
  .label-for-field-location-phone:after {
    content: ":";
  }
  h2 {
    font-size: 22px;
    margin-bottom: 33px;
  }
  .sidebar-card_h3 {
    position: absolute;
    margin-bottom: -20px;
    margin-left: 20px;
    margin-top: 18px;
  }
  .field-location-area {
    display: none;
  }
}
.sidebar-card_h3 {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    text-transform: uppercase;
    color: $default-grey;
    margin: 0 0 25px;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.2;
    letter-spacing: 2px;
}
.node--type-facility .field-collection-hours {
  .field-day-of-the-week,
  .field-start-end-time {
    display: inline;
    font-weight: normal;
    font-size: 14px;

  }
  .field-day-of-the-week+.field-start-end-time:before {
    content: ":";
    margin-left: -0.15em;
    margin-right: 0.25em;
  }
}

.marker_tooltip {
  color: $darker-grey;
  font-family: "Helvetica Neue", Verdana, sans-serif;
  line-height: 1.2;
  a {
    color: $blue;
  }
  article.node {
    h3.location-item--title {
      margin:0 0 0.5em;
      a {
        @include cachet;
      }
      ~ .field-location-area {
        margin: 0 0 0.4em;
      }
      & + .node__content {
        margin: 0;
      }
    }
    .node__content {
      address.wrapper-field-location-address {
        margin-bottom: 0.4em;
        .field-location-address {
          .address {
            font-size: 12px;
            font-style: italic;
            margin: 0 0 0.5em 0.4em;
          }
        }
      }
      .field-location-phone {
        display: block;
        margin-bottom: 0.4em;
        a {
          font-size: 12px;
        }
      }
      .field-branch-hours {
        h4 {
          font-weight: bold;
          margin-bottom: 0.35em;
          margin-top: 0;
        }
      }
      table {
        tr {
          td {
            font-style: italic;
            font-size: 12px;
            padding-left: 0.5em;
          }
        }
      }
    }
  }
}

.leaflet-container a.leaflet-popup-close-button {
  top: 3px;
  right: 3px;
}
