.c-indicator {
  @include cControl();
  @include cClickIconButtonLayout();
  border-radius: $controlCr;
  overflow: visible;
  position: relative;
  text-transform: uppercase;

  button {
    text-transform: uppercase;
  }

  &.no-minify {
    // For items that cannot be minified
    display: flex;
    flex-flow: row nowrap;
    align-items: center;

    > *,
    &:before {
      flex: 1 1 auto;
    }

    &:before {
      margin-right: $interiorMarginSm;
    }
  }

  &:not(.no-minify) {
    &:before {
      margin-right: 0 !important;
    }
  }
}

.c-indicator__label {
  // Label element. Appears as a hover bubble element when Indicators are minified;
  // Appears as an inline element when not.
  display: inline-block;
  transition: none;
  white-space: nowrap;

  a,
  button,
  .s-button,
  .c-button {
    // Make <a> in label look like buttons
    @include transition(background-color);
    background-color: transparent;
    border: 1px solid rgba($colorIndicatorMenuFg, 0.8);
    border-radius: $controlCr;
    box-sizing: border-box;
    color: inherit;
    font-size: inherit;
    height: auto;
    line-height: normal;
    padding: 0 2px;
    @include hover {
      background-color: rgba($colorIndicatorMenuFg, 0.1);
      border-color: rgba($colorIndicatorMenuFg, 0.75);
      color: $colorIndicatorMenuFgHov;
    }
  }

  [class*='icon-'] {
    // If any elements within label include the class 'icon-*' then deal with their :before's
    &:before {
      font-size: 0.8em;
      margin-right: $interiorMarginSm;
    }
  }
}

.c-indicator__count {
  display: none; // Only displays when Indicator is minified, see below
}

[class*='minify-indicators'] {
  // All styles for minified Indicators should go in here
  .c-indicator:not(.no-minify) {
    border: 1px solid transparent; // Hack to make minified sizing work in Safari. Have no idea why this works.
    overflow: visible;
    transition: transform;

    @include hover() {
      background: $colorIndicatorBgHov;
      transition: transform 250ms ease-in 200ms; // Go-away transition

      .c-indicator__label {
        box-shadow: $colorIndicatorMenuBgShdw;
        transform: scale(1);
        overflow: visible;
        transition: transform 100ms ease-out 100ms; // Appear transition
      }
    }
    .c-indicator__label {
      transition: transform 250ms ease-in 200ms; // Go-away transition
      background: $colorIndicatorMenuBg;
      color: $colorIndicatorMenuFg;
      border-radius: $controlCr;
      right: 0;
      top: 130%;
      padding: $interiorMargin $interiorMargin;
      position: absolute;
      transform-origin: 90% 0;
      transform: scale(0);
      overflow: hidden;
      z-index: 50;

      &:before {
        // Infobubble-style arrow element
        content: '';
        display: block;
        position: absolute;
        bottom: 100%;
        right: 8px;
        @include triangle('up', $size: 4px, $ratio: 1, $color: $colorIndicatorMenuBg);
      }
    }

    .c-indicator__count {
      display: inline-block;
      margin-left: $interiorMarginSm;
    }
  }
}

/* Mobile */
// Hide the clock indicator when we're phone portrait
body.phone.portrait {
  .c-indicator.t-indicator-clock {
    display: none;
  }
}
