viewswitcher {
  border-spacing: $base_padding / 2;

  &.narrow {
    margin-top: -$base_padding / 2;
    margin-bottom: -$base_padding / 2;
    min-height: $base_padding;
  }

  button.toggle {
    padding: 0;

    > stack > box {
      &.narrow {
        font-size: 0.75rem;
        padding-top: $base_margin;

        > label {
          min-height: 18px;
          padding-left: $base_padding / 2;
          padding-right: $base_padding / 2;
          padding-bottom: 2px;
        }
      }

      &.wide {
        padding: 2px $base_padding * 2;
        border-spacing: $base_padding;
      }
    }
  }
}

/**********************
 * AdwViewSwitcherBar *
 **********************/

viewswitcherbar actionbar > revealer > box {
  padding-left: 0;
  padding-right: 0;
  padding-top: $base_padding;
}

%viewswitcherbar-shrunk actionbar > revealer > box {
  // Not 0px because view switcher has negative margin
  padding-top: $base_padding;
}

/************************
 * AdwViewSwitcherTitle *
 ************************/

viewswitchertitle {
  margin-top: -$base_padding;
  margin-bottom: -$base_padding;

  viewswitcher {
    margin-left: $base_padding * 2;
    margin-right: $base_padding * 2;

    &.narrow {
      margin-top: $base_padding / 2;
      margin-bottom: $base_padding / 2;
    }

    &.wide {
      margin-top: $base_padding;
      margin-bottom: $base_padding;
    }
  }

  windowtitle {
    margin-top: 0;
    margin-bottom: 0;
  }
}

/*******************
 * AdwIndicatorBin *
 *******************/

indicatorbin {
  > indicator, > mask {
    min-width: 6px;
    min-height: 6px;
    border-radius: 100px;
  }

  > indicator {
    margin: 1px;
    background: gtkalpha(currentColor, .4);
  }

  > mask {
    padding: 1px;
    background: black;
  }

  &.needs-attention > indicator {
    background: $accent_color;
  }

  &.badge {
    > indicator,
    > mask {
      min-height: 13px;
    }

    > indicator > label {
      font-size: 0.6rem;
      font-weight: bold;
      padding-left: $base_margin;
      padding-right: $base_margin;
      color: white;
    }

    &.needs-attention > indicator {
      background: $accent_bg_color;

      > label { color: $accent_fg_color; }
    }
  }
}
